[Qt-interest] Anyone can help about skip taskbar under ms windows ?

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Sun Jun 26 07:29:14 CEST 2011


> Sent: Sunday, 26 June 2011 05:30 AM
> 
> Hi all,
> I've successfully implemented that under X11, but have 
> problem under MS Windows.
> Searched via MSDN but found nothing.
> Basically taskbar can be skipped by adding parent to new 
> window, but then qt 
> adds Qt::Tool into flags, and that window behaviour is same 
> as StayOnTop ...and 
> that's bad ... also I've tried to create an hidden Qt::Tool 
> win and ther set 
> that win as parent of my non-modal window, but then have 
> problem with z-order 
> after minimize/restore (but that partially works).
> Anyone  ?
> 
> Thanks.
> 
> zeljko

This works to hide the task bar for my splash screen during start up.  

Hope it helps!  

Tony.


<code>

#if defined (Q_OS_WIN)
#include <windows.h>
#include <winuser.h>
#endif

...

	// Get our splash screen going - you need a picture.... or NOTHING
displays
	QPixmap pixmap = splashImage();
	splash = new QSplashScreen( pixmap );

#if defined (Q_OS_WIN)
	int style = GetWindowLong( splash->winId(), GWL_STYLE );
	qDebug( "Splash style before = %8.8x", style );

	int exstyle = GetWindowLong( splash->winId(), GWL_EXSTYLE );
	qDebug( "Splash exstyle before = %8.8x", exstyle );

//	SetWindowLong( splash->winId(), GWL_STYLE, style & ~WS_POPUP );
	SetWindowLong( splash->winId(), GWL_EXSTYLE, 
//		(exstyle & ~WS_EX_TOOLWINDOW) | WS_EX_APPWINDOW );
		exstyle & ~WS_EX_TOOLWINDOW );

//	style = GetWindowLong( splash->winId(), GWL_STYLE );
//	qDebug( "Splash style after = %8.8x", style );

	exstyle = GetWindowLong( splash->winId(), GWL_EXSTYLE );
	qDebug( "Splash exstyle after = %8.8x", exstyle );
#endif

	splash->show();
	splash->activateWindow();
	splash->raise();
	qApp->processEvents();


</code>




More information about the Qt-interest-old mailing list