BringWindowToFront does not work with Dragndrop
Ron Birk -- rbirk@ctp.com
Thursday, January 18, 1996
[Note: This is a 16-bit app, so make sure your answer takes this into
account.]
(Using MSVC 1.52c)
I have a MDI application with Drag&Drop support. When one drag a file from
explorer, for example, to our application a dialog pops up and ask the user
to confirm the action. The problem is if our application is behind explorer
the dialog thats pops up will also be behind explorer. Not good...
I tried (in my OnDropFiles procedure, WM_DROPFILES) to use AfxGetMainWnd()-
>BringWindowToTop() before opening the dialog, but without success. What is
going on here? I also tried SetWindowsPos, SetFocus etc etc. Nothing causes
my application to be the front one.
Ron
--
/\/\ Ron Birk Email: rbirk@ctp.com
/ /_ \ Horizontal Solutions Tel: +46 8 744 6119
\ / / Cambridge Technology Partners Fax: +46 8 744 9933
\/\/ Stockholm, Sweden Voicemail: +1 617 374 2081
Lee Thompson -- lee@usa.nai.net
Friday, January 19, 1996
I beleive you should be trying to use the SetWindowPos function in CWnd
with the wndTop parameter something like:
SetWindowPos(&wndTop,NULL,NULL,NULL,NULL,SWP_NOMOVE|SWP_NOSIZE)
or you can even force a window to stay on top of all other windows with
SetWindowPos(&wndTopMost,NULL,NULL,NULL,NULL,SWP_NOMOVE|SWP_NOSIZE)
(like DBWIN does) I hope this helps.
Lee Thompson
Chief cook and bottle-washer
Lee Services Software
| Вернуться в корень Архива
|