ManAtNext
asked on
Top most CDialog application - includes being over the taskbar
I have a dialog application, my user wants to be able to drag the dialog anyway on the screen and for it to remain on top.
When they drag it over the taskbar/start bar, the dialog goes behind the bar - how can I get it to go over the bar (in the same way as the task manager does)?
When they drag it over the taskbar/start bar, the dialog goes behind the bar - how can I get it to go over the bar (in the same way as the task manager does)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Well then have you tried calling SetWindowPos again for your dialog after creating new window ?
-MAHESH
-MAHESH
ASKER
Found it - the process control returns to the parent dialog, and when it does, the window stops being top most - I've re-grabbed it WM_MOUSEMOVE (naughty I know, but it works for what I want).
Thanks again for your help.
Thanks again for your help.
ASKER
However, my main dialog creates another window (derived from CWnd), when I do that your solution stops being effective. Also, I thought I'd try it out on the newly created CWnd derived class too - with that window it didn't work, the create process for that window looks like this:
BOOL result = CreateEx(0,
AfxRegisterWndClass(NULL, NULL, (HBRUSH)GetStockObject(NUL
_T(""), WS_POPUP | WS_BORDER,
CRect (0, 0, Size, Size),
&parentWnd, NULL, NULL);
Any ideas why?
PS: I will be awarding the points to you regardless is due course - your answer was spot on for my original question.