I have made a small dialog based application in visual studio 2005 edition which has few buttons,edit boxes and static box etc . My problem is I want to make it full screen application irrespective of any monitor size it is running on . But whenever i m maximizing the application the dialog box hogs the whole of screen but the controls (edit box, buttons, static box etc) does remain rooted to its original position i.e it doesnot spread out uniformly to occupy the whole screen.
I have googled this problem and found some code but they are doing the same thing as maximizing the application.
Could somebody help me out please.
These are code i m using to maximize my application
CRect rcDesktop;
int SM_XVIRTUALSCREEN,SM_CXVIRTUALSCREEN,SM_CYVIRTUALSCREEN,SM_YVIRTUALSCREEN;
rcDesktop.left = GetSystemMetrics(SM_XVIRTUALSCREEN);
rcDesktop.right = rcDesktop.left + GetSystemMetrics(SM_CXVIRTUALSCREEN);
rcDesktop.top = GetSystemMetrics(SM_YVIRTUALSCREEN);
rcDesktop.bottom = rcDesktop.top + GetSystemMetrics(SM_CYVIRTUALSCREEN);
MoveWindow(rcDesktop, FALSE);
int cx, cy;
HDC dc = ::GetDC(NULL);
cx = GetDeviceCaps(dc,HORZRES) +
GetSystemMetrics(SM_CXBORDER);
cy = GetDeviceCaps(dc,VERTRES) +
GetSystemMetrics(SM_CYBORDER);
::ReleaseDC(0,dc);
SetWindowLong(m_hWnd, GWL_STYLE,
GetWindowLong(m_hWnd, GWL_STYLE) &
(~(WS_CAPTION | WS_BORDER)));
::SetWindowPos(m_hWnd, HWND_TOPMOST,
-(GetSystemMetrics(SM_CXBORDER)+1),
-(GetSystemMetrics(SM_CYBORDER)+1),
cx+1,cy+1, SWP_NOZORDER);