[Qt-interest] Anyone can help about skip taskbar under ms windows ?
Zeljko
zeljko at holobit.net
Sun Jun 26 10:14:06 CEST 2011
Tony Rietwyk wrote:
>
>> 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!
>
That's something else :) I want only main window visible in taskbar, not other
non-modal forms opened from same app. As I can see from your code you are just
excluding WS_EX_TOOLWINDOW from hwnd ... maybe that can help for my code too
... I'll try. I'm unix user all of my life, so those winapi tricks are pretty
new for me :)
Thanks a lot.
zeljko
> 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