Skip to main content
gamedev.net
🔒 Locked

Stupid Windows!

Started by Sand_Hawk Nov 28, 2001 at 2:33 AM 1 replies 250+ views
Original Post
Sand_Hawk
Sand_Hawk
Hi there, I think this question can be added to the "dumb question top 10,000" but I''ll ask it anyway. I bought the book Tricks of The Windows Game Programming Gurus by andre Lamothe and I''m in the chapter where he starts with some simple GDI operations. So I wrote a simple program that does what the explained to me. Just to print some plain text in a random color in the window. But when I compile I get an undeclared symbol ''GetDC'' and ''ReleaseDC'' I included MMSYSTEM.H and WINMM.LIB in my workspace. I don''t use MFC(#define WIN32_LEAN_AND_MEAN). I use Visual C++ 6 Enterprise with Service Pack 5. I looked in the book, overlooked the sources provided on the CD, but I don''t get it! Sand Hawk Member of the Stupid Coders. http://www.stupidcoders.cjb.net -Earth is 98% full. Please delete anybody you can.
----------------(Inspired by Pouya)
JY
JY
How have you created your project? If you use the AppWizard to create a simple Win32 application you should have everything set up in the right way.

You should definitely have windows.h included somewhere in your code, but if you hadn''t, presumably more than just GetDC and ReleaseDC would be undeclared?

MMSYSTEM.H and WINMM.LIB are for multimedia stuff - I guess the book uses multimedia timers? You won''t need those just yet
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
Sand_Hawk
Sand_Hawk
I''m using Windows.H, Windowsx.H and stdio.H

I just created an empty work space and added a new (empty) project to it. Then I addede a source file, pasted the standard win program to register a class and open a window and handle events. Then I added the extra source for viewing text on the screen like hdc = GetDC(hwnd);

Suggestions?

SAnd Hawk
----------------(Inspired by Pouya)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.