Jump to content
  • Advertisement

Archived

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

cyssis

Help! One simple request.

This topic is 6015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I have a request. I am trying to learn DirectX 8, and I''ve been trying to work through some code, but to no avail. I work best by looking through example code (how I learned HTML, C, QBASIC, PERL, etc.) but I can''t find a single complete sample to look at (trust me, I''ve been trying). All I want is a VC++ workspace/.cpp file that''ll initialize a window, and run through the OneTimeSceneInit(), InitDeviceObjects(), RestoreDeviceObjects(), FrameMove(), Render(), InvalidateDeviceObjects(), DeleteDeviceObjects(), & FinalCleanup(). All I need is a blank window. I have the DirectX 8 SDK, so I have all the library files, but please include any headers I''d need, etc. I just need something to sort of sift through. I''m sure some of ya have an old piece of code lying around. If it''s annotated, that''d be great (sparse or not, just a simple "//This makes it run" for whatever is important would be great.) Thanks alot. I hope this isn''t too annoying of a newbie request.

Share this post


Link to post
Share on other sites
Advertisement

  
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPevInst, LPSTR CmdLine, int CmdShow)
{
HRESULT ddrval;
MSG msg;

// Set up and register window class

WNDCLASSEX WndCls = { sizeof(WNDCLASSEX), CS_HREDRAW | CS_VREDRAW, WndProc, 0L, 0L,
hInst, LoadIcon(NULL, IDI_APPLICATION), LoadCursor(NULL, IDC_ARROW),
(HBRUSH) GetStockObject(BLACK_BRUSH), NULL, Classname,
LoadIcon(NULL, IDI_APPLICATION) };

RegisterClassEx(&WndCls);

g_hWnd = CreateWindowEx( WS_EX_TOPMOST, Classname, Title, WS_POPUP | WS_VISIBLE,
0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
NULL, NULL, hInst, NULL);
ShowWindow(g_hWnd,SW_NORMAL);
UpdateWindow(g_hWnd);

Share this post


Link to post
Share on other sites
Have you heard of DirectX 8 appwizard? I think it might be what you''re looking for.

Do you want specifically code that uses Common Files framework or any simple code?

There''s also some stuff on MSDN, I don''t know if it''s of any use to you.

Share this post


Link to post
Share on other sites
Umm.. Nope, I haven''t heard of dX appwizard... Sound''s good. As for the Common files/ code: By the common files do you mean the files in the mssdk/samples/multimedia/common/include or src? I just want something that will work on any machine that has DirectX 8 installed. Thanks.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
How about the samples included with the SDK?

Share this post


Link to post
Share on other sites
I''ve been looking through those, but they''re too advanced for me right now. I basically want to see what is necessary and what is not. What I''d really like is a barebones piece of code that''ll initialize a D3D window and shut it down. Just to find out what everything does and what is neccessary and what''s not.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!