views:

99

answers:

1

I have a dialog box developed in mfc for a Windows CE device and want it to occupy the entire screen. I used the following code to center my dialog box on the lcd screen of the device:

CWnd* pWnd = GetDesktopWindow();
CenterWindow(pWnd);

However, I still get a tiny sliver of space on the left side of the dialog box, resizing the dialog merely makes it overflow on the right side of the LCD while the tiny space on the left remains (I can see the blue of the win CE desktop behind.)

Are there any suggestions to solve this problem? I checked the margin settings for this dialog box in my .rc files and leftmargin and topmargin are both set to 0. I was wondering if I could get the coordinates of the center of the screen and then place my window one or two points to the left to deal with the current offset. A messy approach I know!

A: 

How to create "full screen applications". I've used similar code for PocketPC and WM 6.x devices.

http://support.microsoft.com/kb/266244

Hernán