Problem with wndTopMost in Vista
-
Hi! I have a problem with TopMost window on Windows Vista. In Dialog's OnInitDialog method I try to set position by the following code
int cx, cy; HDC dc = ::GetDC(NULL); cx = GetDeviceCaps(dc,HORZRES) + GetSystemMetrics(SM_CXBORDER); cy = GetDeviceCaps(dc,VERTRES) + GetSystemMetrics(SM_CYBORDER); ::ReleaseDC(0,dc); //Put window on top and expand it to fill screen SetWindowPos(&wndTopMost, -(GetSystemMetrics(SM_CXBORDER) + 2), -(GetSystemMetrics(SM_CYBORDER) + 2), cx+5,cy+5, 0);
that works fine in XP - dialog is realy top most, but on Vista sometimes it is not - some active windows like Firefox can be above of my dialog. I can't understand where is the problem here and how can it be fixed? -
Hi! I have a problem with TopMost window on Windows Vista. In Dialog's OnInitDialog method I try to set position by the following code
int cx, cy; HDC dc = ::GetDC(NULL); cx = GetDeviceCaps(dc,HORZRES) + GetSystemMetrics(SM_CXBORDER); cy = GetDeviceCaps(dc,VERTRES) + GetSystemMetrics(SM_CYBORDER); ::ReleaseDC(0,dc); //Put window on top and expand it to fill screen SetWindowPos(&wndTopMost, -(GetSystemMetrics(SM_CXBORDER) + 2), -(GetSystemMetrics(SM_CYBORDER) + 2), cx+5,cy+5, 0);
that works fine in XP - dialog is realy top most, but on Vista sometimes it is not - some active windows like Firefox can be above of my dialog. I can't understand where is the problem here and how can it be fixed?hi i need some extra explains from u .. 1. What's the error u get it from Windows vista? 2. Which type of compiler u used like VS2005 r some thing..? give the answer for above questions.. and also try install service pack for windows vista and then u compile it i think it's may be working fine . Actually windows vista is one of the poor OS in this world ..but we ll try our level best!!
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
-
hi i need some extra explains from u .. 1. What's the error u get it from Windows vista? 2. Which type of compiler u used like VS2005 r some thing..? give the answer for above questions.. and also try install service pack for windows vista and then u compile it i think it's may be working fine . Actually windows vista is one of the poor OS in this world ..but we ll try our level best!!
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
hi, thanks for answer. 1. I did not get any visual errors, I've got only strange behavior of the windows on screen. I set for my window TOPMOST order, but in OS it actually appears under any current active window on the screen. 2. I use VC2005. I found some interesting topic on this problem: http://groups.google.com/group/microsoft.public.vc.mfc/browse_thread/thread/8c9333777d461126/c5ee093565701048[^]