Do you use CW_USEDEFAULT? Or do you put your own values in it?
Do you use CW_USEDEFAULT? Or do you put your own values in it?
1978 Silver Anniversary Corvette
You can put either value, it is up to you.
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers
Of course you can, but what do you prefer?
1978 Silver Anniversary Corvette
I don't do too much straight GDI type stuff anymore, I mainly use DirectX. However when I do need to, I usually use CW_USEDEFAULT though.
Just our of curiosity (and a little off topic), where did you learn to program in DirectX? My buddy and I are going to start doing that, and I'm looking for some promising docs on it...
1978 Silver Anniversary Corvette
Pretty much just doing stuff on my own. They taught the basics at school but I had to learn some of the other components entirely on my own (i.e. Direct3D). I'm sure there are a lot of good tutorials out there...perhaps atOriginally posted by Garfield
Just our of curiosity (and a little off topic), where did you learn to program in DirectX? My buddy and I are going to start doing that, and I'm looking for some promising docs on it...
www.flipcode.com
www.gametutorials.com
Are you going to be doing DirectDraw stuff? Basic 2D game or something? If you need some specific help or a sample of something I can give you some of my old source code if you want. Well if you want to talk further about DirectX send me a private message and I can answer your questions.
A quick note about putting in your own values for positioning a window. Make sure that you do put some care into where you put your window. Most importantly, make sure it is on screen. HKEY_CURRENT_CONFIG\display\Setting has a key called Resolution. This is what I usually use when I want to put a window in the middle of someone's screen or something. Enjoy.
An easier way to get the screen res is
Code:hdc=GetDC(NULL); iWidth =GetDeviceCaps(hdc,HORZRES); iHeight =GetDeviceCaps(hdc,VERTRES); ReleaseDC(hdc); // or as a RECT hDesktop=GetDesktopWindow(); GetWindowRect(hDesktop,&DesktopRect);
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill