Archived

This topic is now archived and is closed to further replies.

Multiple Migs

Want to use DirectDraw in a Borland Windows Program, Fullscreen or Windowed?

Recommended Posts

Multiple Migs    122
Hey all, Over the last couple of weeks i''ve been teaching myself DirectX/OpenGL. But mainly I am trying to learn DirectDraw. I currently have a Borland C++ Builder 5 app that uses a lot of the Standard and Additional components provided by Builder eg. buttons, edit boxes, statictexts, etc. It also uses a paintbox that displays bitmaps. So to do this I have been using the TCanvas class in borland which uses GDI (I think), but it is very slow. So I wanted to start using DirectDraw in the application to speed things up. What is the best way to go about doing this? Do I integrate a DirectDraw window (windowed mode) into my current app? Or do I start DirectDraw in fullscreen mode and simulate all the buttons, statictexts, edit boxes, etc...(by the way I have no idea of how to go about doing this, If this is indeed the way to go I would appreciate a nudge in the right direction eg. article , book.). Also if my previous ideas are completely the wrong way to go about it, I would very much appreciate some other suggestions. If you made it this far in the post, thank you for reading through all of the b.s., and I hope that you can help me out in whatever way you can. Thank you. ZZZZZZZZZZZ... sleep is good

Share this post


Link to post
Share on other sites
Ok, although I have no experience with Borland - so I don''t know what the TCanvas class is - I will try to help you. I think it is no good idea to simulate buttons, statictexts, etc with DirectDraw. If you just want to display bitmaps I wouldn''t even use DirectDraw to do that. You should only think about using DirectX if you want to animate something. But if you still want to use DirectX in your application I would suggest that you integrate a DirectDraw window into your app.

Share this post


Link to post
Share on other sites
risingdragon3    382
Look at my library to see what I did... please note I am currently doing a visual GUI for DirectX ... what do you think of that? (And its properly derived custom form, u can access it from the File | New ... dialog box)
Basically, create components for fullscreen / windowed, then create GUI via TComponent. Use a derived form and register with the IDE, then override the Paint function in the form to update the form by calling the GUI component's paint function. But u have to check for whether the images referenced by the GUI components have been created by the linked imagelist component ... urgh ...

Oh yeah - the GUI components are done by me... not the TButton, etc.
------------------------------
BCB DX Library - RAD C++ Game development for BCB

Edited by - c++freak on March 20, 2001 5:22:19 PM

Share this post


Link to post
Share on other sites
PowerBoyAlfa    122
I used borland 5 for some quick direct draw 7 applications a few months ago. The good news is, there were a few source examples included with borland C++ builder that helped a lot. The examples used Direct draw 3, but the overall code is the same, just a few changes made it work fine. You do however have to use the special borland libs included with dxsdk instead of the usual ones. The bad news is, there were some problems getting a few things to work right. After much tinkering I was able to get around most of them, but it took awhile. In my opinion, the directx just doesn''t work as well with the borland compiler as it does with others, but don''t let that stop you.

Share this post


Link to post
Share on other sites