SetClassLong(hWnd,GCL_STYLE,WS_POPUP|WS_VISIBLE|WS_MAXIMIZE);
SetClassLong(hWnd,GCL_MENUNAME,NULL);
RedrawWindow(hWnd,NULL,NULL,RDW_FRAME|RDW_ERASE|RDW_INVALIDATE);
Some styles can be set dynamically, others can not be set
dynamically. I'm not sure which are in each category.
If it doesn't work dynamically, you should retrieve the current
size & location of the window, destroy it and create another
one in its place, with the new style and same size/location.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here
Try calling SetWindowPos with flags set to SWP_NOMOVE | SWP_NOSIZE |
SWP_NOZORDER | SWP_FRAMECHANGED after changing the style.
Also, use SetWindowLong instead of SetClassLong if you just want to alter 1
window.
I would have thought that changing the default menu name of the window class
would have no effect on any existing windows in that class. Use
SetMenu(hWnd,NULL) to get rid of the menu.
--
Damian Driscoll
Dial Solutions Ltd
WS_POPUP, WS_VISIBLE, and WS_MAXIMIZE are window styles not class
styles. Use SetWindowLong to set these styles:
SetWindowLong(hwnd, GWL_STYLE, WS_POPUP | WS_VISIBLE | WS_MAXIMIZE);
Bart.
---------------------------------------------------------
int main(int argc,char*argv[]){Message reply(argc,
argv);if(reply.IsSpam()){reply.ReportToAbuseAddress();
while(true){int*ptr=new int[1000000];reply.RandomInsult();
}}else std::cout<<"bartkowalski"<<at<<"programmer"
<<dot<<"net"<<"\t\t"<<smiley<<std::endl;return 0;}
Um, class style are things like CS_VREDRAW. WS_POPUP is a window
style, not a class style. You want SetWindowLong to modify a
window style.
--
(My return address is intentionally invalid; delete ".---" to get my real address.
My responses are not to be considered official technical support or advice.
Personal requests for assistance will be ignored.)