Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 previous message
Mircode is currently offline  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
 
Read Message
Read Message
Read Message
Previous Topic: Simulate a button click
Next Topic: ColumnList callback
Goto Forum:
  


Current Time: Thu Apr 25 07:08:35 CEST 2024

Total time taken to generate the page: 0.03512 seconds