You can make your app to handle WM_DISPLAYCHANGE message and use GetSystemMetrics() to get the screen size. To resize your window, either you can maximize it, or in a dialog base app, use CResizeCtrl by Herbert Menke http://www.codeproject.com/dialog/resizectrl.asp[^] Hope this will help Allen
Allen Sun
Posts
-
User interface size and monitor resolution -
Code Project Sister SiteI would like to see a site like sourceforge devoted to MFC, ATL... etc programming where people can start some small projects and LEARN from working on the projects. I have a name for it, too - codersproject.com :)
-
Windows GUI in 2005I was reading an article by Paul DiLascia on MSDN ( http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0198/coolmenu.htm ) And here is what he has to say about the GUI in 2005: "Soon, the world will catch up to my advanced taste—I predict that before the year 2005, Windows will revert to its 3.1 look." Cheers!
-
FarscapeAnybody here remember the Space:Above and Beyond (SAAB)? Too bad it was killed by the FOX network after only aired one season. I'm still waiting FOX to revive the series tho.. :)
-
Arrow keys in CDialogOK, I just found out the answer. The problem was in the WM_GETDLGCODE. Apparently window dosn't trust anybody but him self to handle the arrow key and tab keys. What I did was just simply return DLGC_WANTMESSAGE in the the OnGetDlgCode() function. (Thanks, MSDN, for burying this tiny IMPORTANT notice in MILLIONS of articles)
-
Arrow keys in CDialogDoes any have the problem processing the VK_LEFT\VK_RIGHT key in CDialog? I was trying to do an animation in dialog which a small bitmap will move around the dialog box when an arrow key is pressed (super mario style :) ), however I'm having problem processing the arrow keys in the OnKeyDown(). I tried to trace the messages, and it seems the window is getting the the WM_KEYDOWN message when an arrow key is pressed, but it just ignores it!! (No problem with keys like VK_DELETE, VK_END.. etc., tho). Is there anything special I should know about processing the arrow keys in a dialog box? Thanks!
-
Microsoft Has Balls Of SteelM$ WebBrowser component is popular doesn't mean they SHOULD be part of the OS. It exists becasue IE depends on it, not the OS. Have you tried Mozilla ActiveX component? It does pretty much the same thing as the M$ WebBroser component.
-
Next 'Star Wars' movie has been named.I think "Jedis Must Die" would be more accurate :)
-
Another evil plot from Microsoft......Why kill people with swords when you can have a machine gun? :) Everybody(guys) in our office has Counter-Strike installed and we usually play it after work. CStrike is a pretty old technology (in another word, cheap!), but it's FUN! Don't like your co-workers? Just get a shotgun and blow his head off!! (Don't do this in real life tho :) )
-
Creating WebserversHave you try apache? www.apache.org
-
Disposable PhonesYou should see the paper computer they came up.. :)