-
March 6th, 2004, 09:46 PM
#1
Dont want new Modeless Dialogs to pop-up on top??
Hi gurus,
I have an application which among other things also provides a simple chat between users using modeless pop-up dialogs. Trouble is, while users are replying to a chat, if a new chat arrives the new chat dialog will pop-up above the current one which the user is typing thus interrupting the user. How do I ensure that the new pop-up will queue behind previous chat dialogs. I have tried quite a few combinations using ::SetWindowPos() but the best I got did queue the pop-up dialogs behind each other but it also sinks the whole application behind all other applications running at the same time...whenever a new chat arrives which is even worst...
Code:
CSMSDlg* pCSMSDlg=new CSMSDlg;
//some other codes
pCSMSDlg->Create(IDD_DIALOGSMS);
//some other codes
::SetWindowPos(pCSMSDlg->GetSafeHwnd(),HWND_BOTTOM,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_SHOWWINDOW|SWP_NOACTIVATE);
I have also tried setting the dialog to pop-up, child windows and overlapped....
Thanks for any help
Mustafa
______________________________
To err is human, it's the computer that causes blunders !!!
DO: Dazzle me with your intelligence
DON'T : Confuse me with your bullshit
-
March 7th, 2004, 03:12 AM
#2
partial solution
Hi All,
Ok I managed to partially solve-it..I discovered SWP_NOOWNERZORDER....that prevents the whole application from sinking right to the bottom of the z-order whenever it creates a new pop-up dialog...
But I am still stuck with one problem...
The new pop-up dialogs queued behind the last dialogs but still grabs focus when it does that...
How do I ensure that a newly created pop-up dialog does not grab focus away from the current dialog in focus???..
Any help please...
Regards
Mustafa
______________________________
To err is human, it's the computer that causes blunders !!!
DO: Dazzle me with your intelligence
DON'T : Confuse me with your bullshit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|