Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Change window style
Change window style [message #37523] |
Sun, 14 October 2012 18:43 ![Go to next message Go to next message](theme/default/images/down.png) |
Mircode
Messages: 17 Registered: September 2012
|
Promising Member |
|
|
Hi there!
I want my mainwindow to have no button in the taskbar and only appear with a little trayicon. Furthermore, there should be no maximize or close button, only minimize.
I am working on windows and I tried to work with GetWindowLongPtr and SetWindowLongPtr, GWL_STYLE and GWL_EXSTYLE, WS_MINIMIZEBOX and WS_EX_TOOLWINDOW.
At the end of the constructor of my main class I wrote:
LONG_PTR ws;
ws=GetWindowLongPtr(KeyBuddy2::GetHWND(),GWL_STYLE);
ws = ws | WS_MINIMIZEBOX;
SetWindowLongPtr(KeyBuddy2::GetHWND(),GWL_STYLE,ws);
I also tried different style attributes, nothing had any effect.
What seems to be the problem here?
Thanks in advance,
Mirko
|
|
|
|
Re: Change window style [message #37535 is a reply to message #37523] |
Mon, 15 October 2012 07:03 ![Go to previous message Go to previous message](theme/default/images/up.png) |
|
Hi Mirko,
What about using Ctrl::Frameless() ? IIRC it should make your window borderless - no title bar, no min/max/close buttons. Then you can create the minimize button yourself as a regular Button that will minimize/close/hide the window as you need.
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Sun Sep 01 07:43:44 CEST 2024
Total time taken to generate the page: 0.02303 seconds
|