• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

BringWindowToTop() ??

I would like to bring my dialog on top of all other windows when a special event occur.... As a natural thing I´m using BringWindowToTop() in my dialog-class.... My question is:
Why doesn´t the dialog respond to this ?? Nothing happends...

When I´m using:
SetWindowPos(&wndTopMost,0,0,0,0, SWP_NOSIZE |SWP_NOMOVE;
SetWindowPos(&wndNoTopMost,0,0,0,0, SWP_NOSIZE |SWP_NOMOVE;

it works fine form me... but if i have set the dialog to be on top always then these 2 functions will unset that...

0
TYB
Asked:
TYB
  • 2
  • 2
1 Solution
 
NickRepinCommented:
Use SetForegroundWindow() instead of Bring....
0
 
TYBAuthor Commented:
Tnx.... Works fine now... Do you have any idea why BringWindowToTop() doesn´t work ??


0
 
NickRepinCommented:
It is for application private use. It doesn't affect other apps.
0
 
TYBAuthor Commented:
Ahhh..  Ok .. tnx a lot for the help...
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now