How can I have a window with thick frame but no resize?
-
Hi everybody :- ). Long time no postin'. I worked in other areas lately but now I'm back in C++ at a problem left unsolved some time ago. The problem is quite severe as in I am lacking some very important information (which apparently I can't find in MSDN). You see... I want to create a window which has a control box, minimize and close buttons and a thick frame, but NO RESIZE. So far, I used this: hwndThis = CreateWindowEx //Creating the window. ( NULL, //ExStyles. sClassName, //Class name. Created somewhere above. Title, //Window name. WS_OVERLAPPEDWINDOW &~ WS_THICKFRAME &~ WS_MAXIMIZEBOX, //Styles. X, //X. Y, //Y. W, //Width. H, //Height. NULL, //Parent. NULL, //Menu. hHost, //Parent. NULL //CreateStruct. ); As you can probably already guess, this does the job, but creates a window with a very thin border and I don't like that. If I remove WS_THICKFRAME, of course, it works but then I can resize it again. Soooooooooo? Any ideas anybody? :- ). Thank you in advance! -= E C H Y S T T A S =- The Greater Mind Balance
-
Hi everybody :- ). Long time no postin'. I worked in other areas lately but now I'm back in C++ at a problem left unsolved some time ago. The problem is quite severe as in I am lacking some very important information (which apparently I can't find in MSDN). You see... I want to create a window which has a control box, minimize and close buttons and a thick frame, but NO RESIZE. So far, I used this: hwndThis = CreateWindowEx //Creating the window. ( NULL, //ExStyles. sClassName, //Class name. Created somewhere above. Title, //Window name. WS_OVERLAPPEDWINDOW &~ WS_THICKFRAME &~ WS_MAXIMIZEBOX, //Styles. X, //X. Y, //Y. W, //Width. H, //Height. NULL, //Parent. NULL, //Menu. hHost, //Parent. NULL //CreateStruct. ); As you can probably already guess, this does the job, but creates a window with a very thin border and I don't like that. If I remove WS_THICKFRAME, of course, it works but then I can resize it again. Soooooooooo? Any ideas anybody? :- ). Thank you in advance! -= E C H Y S T T A S =- The Greater Mind Balance
You can handle the WM_SIZING message and simply modify the rect to the app size. onwards and upwards...
-
Hi everybody :- ). Long time no postin'. I worked in other areas lately but now I'm back in C++ at a problem left unsolved some time ago. The problem is quite severe as in I am lacking some very important information (which apparently I can't find in MSDN). You see... I want to create a window which has a control box, minimize and close buttons and a thick frame, but NO RESIZE. So far, I used this: hwndThis = CreateWindowEx //Creating the window. ( NULL, //ExStyles. sClassName, //Class name. Created somewhere above. Title, //Window name. WS_OVERLAPPEDWINDOW &~ WS_THICKFRAME &~ WS_MAXIMIZEBOX, //Styles. X, //X. Y, //Y. W, //Width. H, //Height. NULL, //Parent. NULL, //Menu. hHost, //Parent. NULL //CreateStruct. ); As you can probably already guess, this does the job, but creates a window with a very thin border and I don't like that. If I remove WS_THICKFRAME, of course, it works but then I can resize it again. Soooooooooo? Any ideas anybody? :- ). Thank you in advance! -= E C H Y S T T A S =- The Greater Mind Balance
-
You can handle the WM_SIZING message and simply modify the rect to the app size. onwards and upwards...
Not good because I will still see that annoying arrow-resize icon. There has to be another way. A style or something. Something I missed in the MSDN documentation. -= E C H Y S T T A S =- The Greater Mind Balance
-
Not good because I will still see that annoying arrow-resize icon. There has to be another way. A style or something. Something I missed in the MSDN documentation. -= E C H Y S T T A S =- The Greater Mind Balance