RE: Can you force a modal dialog to be topmost?

Eric Brown <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <74F1087038AF6D4D91AAC7EC89968A4B134E5F46@BL2PRD0102MB014.prod.exchangelabs.com>
That's rather user-hostile.  Your application window is disabled while the dialog is running, so the user can't proceed while your modal dialog is visible.

What exactly do you need to do here?

From: [email protected] [mailto:[email protected]] On Behalf Of Angus Comber
Sent: Sunday, October 25, 2009 2:54 PM
To: [email protected]
Subject: Re: [wtl] Can you force a modal dialog to be topmost?



I found one easy way to achieve what I want. Simply check the system modal and set foreground checkboxes in the dialog resource.

I don't see any problems with this approach so fixed.

----- Original Message -----
From: Angus Comber
To: [email protected]<mailto:wtl%40yahoogroups.com>
Sent: Sunday, October 25, 2009 6:00 PM
Subject: [wtl] Can you force a modal dialog to be topmost?

Hello

I am creating a modal dialog. eg:
CLoginDlg dlg;

if (dlg.DoModal() == IDOK)

...

In the OnInitDialog in CLoginDlg I am doing this:

SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);

Which does return TRUE. But it is not topmost.

Can I somehow make this dialog window topmost? If so, how?

Angus

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.