Archived

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

kamikazifreak

Changed: DirectX help?

Recommended Posts

I'm new to the forum and just getting started programming in C++. I've done a lot of programming for the TI-86 in basic, which I know is nothing like C++ and I don't expect it to work the same way. The thing I'm having trouble with is when I'm making win32 projects (in MS VC++). It puts in all the basic source code for a window, but I don't know what all these predefined functions and variables do! Does someone know how to make sense of all these things? eepoipoipoi! [edited by - kamikazifreak on October 27, 2003 8:33:26 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
are you talking about a project created via the MFC App Wizard? if so, then the docs have a complete write-up. just look in the table of contents and somewhere in there is everything you need to know about what the different classes are for and what code should go where. although a good book would serve you better since the docs are meant more as a reference than a learning tool.

but if you''re new to C++ I''d suggest staying away from MFC and window-based apps until you have a good understanding of both C++ and how MS Windows message processing works. try tackling some console apps first. that will get you far enough down the C++ road so that when/if you decide to create a window-based app, having to learn both C++ and Windows message processing won''t seem like such a daunting task.

Share this post


Link to post
Share on other sites
In win32 you start with winmain instead of main. You set up a windows class structure (WINCLASSEX) define parmaeters about your window, then you register your window, create the window and enter your main event loop which dispatches messages to your event handler function. There you process all your windows messages and react accordingly. Back in your mainloop you would include your maingamelogic().

Share this post


Link to post
Share on other sites
Yeah, I'm using the App Wizard. I'd use console apps, but I'm nut sure how to control it any more then just line by line output. How do you make text at specific spots? Do you need to get into graphics just to do that?
EDIT: I just got the DirectX SDK, because I'm assuming I'll need it for this, but all the instructions I've found are so broken up or compiler-specific I can't make sense of them. What main things need to be done to use DirectX stuff in console apps?

[edited by - kamikazifreak on October 24, 2003 9:16:11 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well, I''m no DirectX coder .. but I think it makes no sense using DirectX with console applications. You need a window to display your graphics (a device) ... don''t use console, choose "Win32 Application" and "Empty Project" and pick some tutorials, shouldnt be that hard

Share this post


Link to post
Share on other sites
I would start with simple console applications. They are much easier to understand and use, and it''s good for the people that don''t like to have files thrown into their program if they don''t know what they do

Start with console, maybe do a little window''s programming, then jump into DirectX or continue with windows.

Oh, and yea the TI-Basic is a bit simpler than C++. It''s also what I started with, but then I moved to z80 ASM for the TI-83+ and then to C++ soon afterwards.

Share this post


Link to post
Share on other sites