Window properties in MFC
by Frank Hickman [MVP] » Sat, 29 Jan 2005 04:56:39 GMT
// You have to do all this to get what you want...
DWORD dwStyle= ::GetWindowLong( hWnd, GWL_STYLE );
dwStyle &= ~(WS_OVERLAPPEDWINDOW| WS_SYSMENU| WS_BORDER| WS_CAPTION);
::SetWindowLong( hWnd, GWL_STYLE, dwStyle );
DWORD dwExStyle= ::GetWindowLong( hWnd, GWL_EXSTYLE );
dwExStyle &= ~(WS_EX_OVERLAPPEDWINDOW);
::SetWindowLong( hWnd, GWL_EXSTYLE, dwExStyle );
WINDOWPLACEMENT wp;
::GetWindowPlacement( hWnd, &wp );
int x= wp.rcNormalPosition.left;
int y= wp.rcNormalPosition.top;
int cx= wp.rcNormalPosition.right - x;
int cy= wp.rcNormalPosition.bottom - y;
::SetWindowPos( hWnd, HWND_TOP, x, y, cx, cy, SWP_FRAMECHANGED );
// End added code...
As for not showing up on the task bar, the only thing I can think of is
maybe creating your window as a child window of the desktop.
--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.