Modeless dialog always on top/forefront of the screen

Is there a reason why a modeless dialog is on the top/forefront of the
screen? Is there a way to prevent this? Also is there a way to minimize
the modeless child dialog when the parent is minimized? code examples
would be greatly appreciated. Thanks.

0
ratcharit (24)
2/21/2006 9:57:57 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
982 Views

Similar Articles

[PageSpeed] 43

If you are talking about the child dialog always being in front of the
parent dialog, that is how things are.  If you want the child to be placed
behind the parent, then the two dialogs have to be sibilings (meaning they
must both have the same parent).

void CParentDialog::BringUpChildDlg()
{
    m_ChildDialog.Create(CChildDlg::IDD,GetParent());
}

Now as far as the minimize and restore goes. catch the WM_SIZE message in
one of the dialogs and when it is for a minimize or restore tell the other
window to minimize or maximize.

void CParentDialog::OnSize(UINT nType,....)
{
    CDialog::OnSize(....);
    if (nType == SIZE_MINIMIZED)
   {
        m_ChildDialog.ShowWindow(SW_SHOWMINIMIZED);
   }
    else if (nType == SIZE_RESTORED)
    {
        m_ChildDialog.ShowWindow(SW_RESTORE);
    }
}


AliR.

<ratcharit@gmail.com> wrote in message
news:1140559077.153013.235750@f14g2000cwb.googlegroups.com...
> Is there a reason why a modeless dialog is on the top/forefront of the
> screen? Is there a way to prevent this? Also is there a way to minimize
> the modeless child dialog when the parent is minimized? code examples
> would be greatly appreciated. Thanks.
>


0
AliR3470 (3236)
2/21/2006 10:27:58 PM
Is also normal for a modeless dialog to be on the top/forefront of the
screen even if you swtich to another program? This seems to be the case
for me i.e. this one modeless child dialog that I've created is ALWAYS
on top of the screen even if I open another program. Thanks very much
for your inputs.

0
ratcharit (24)
2/22/2006 5:51:12 AM
Is also normal for a modeless dialog to be on the top/forefront of the
screen even if you swtich to another program? This seems to be the case
for me i.e. this one modeless child dialog that I've created is ALWAYS
on top of the screen even if I open another program. Thanks very much
for your inputs.

0
ratcharit (24)
2/22/2006 5:51:25 AM
Is also normal for a modeless dialog to be on the top/forefront of the
screen even if you swtich to another program? This seems to be the case
for me i.e. this one modeless child dialog that I've created is ALWAYS
on top of the screen even if I open another program. Thanks very much
for your inputs.

0
ratcharit (24)
2/22/2006 5:51:27 AM
Is also normal for a modeless dialog to be on the top/forefront of the
screen even if you swtich to another program? This seems to be the case
for me i.e. this one modeless child dialog that I've created is ALWAYS
on top of the screen even if I open another program. Thanks very much
for your inputs.

0
ratcharit (24)
2/22/2006 5:51:32 AM
Check the "System Modal" property in the Dialog Editor. If set to True, the 
dialog will have the TopMost style. Also check the Topmost property, 
although this works only with non-topmost windows.

Eddie.

<ratcharit@gmail.com> wrote in message 
news:1140587472.419188.83930@z14g2000cwz.googlegroups.com...
> Is also normal for a modeless dialog to be on the top/forefront of the
> screen even if you swtich to another program? This seems to be the case
> for me i.e. this one modeless child dialog that I've created is ALWAYS
> on top of the screen even if I open another program. Thanks very much
> for your inputs.
> 


0
drpazz (112)
2/22/2006 6:16:05 AM
Sorry.  This is a test only
"AliR" <AliR@online.nospam> wrote in message 
news:OtMKf.11094$rL5.5313@newssvr27.news.prodigy.net...
> If you are talking about the child dialog always being in front of the
> parent dialog, that is how things are.  If you want the child to be placed
> behind the parent, then the two dialogs have to be sibilings (meaning they
> must both have the same parent).
>
> void CParentDialog::BringUpChildDlg()
> {
>    m_ChildDialog.Create(CChildDlg::IDD,GetParent());
> }
>
> Now as far as the minimize and restore goes. catch the WM_SIZE message in
> one of the dialogs and when it is for a minimize or restore tell the other
> window to minimize or maximize.
>
> void CParentDialog::OnSize(UINT nType,....)
> {
>    CDialog::OnSize(....);
>    if (nType == SIZE_MINIMIZED)
>   {
>        m_ChildDialog.ShowWindow(SW_SHOWMINIMIZED);
>   }
>    else if (nType == SIZE_RESTORED)
>    {
>        m_ChildDialog.ShowWindow(SW_RESTORE);
>    }
> }
>
>
> AliR.
>
> <ratcharit@gmail.com> wrote in message
> news:1140559077.153013.235750@f14g2000cwb.googlegroups.com...
>> Is there a reason why a modeless dialog is on the top/forefront of the
>> screen? Is there a way to prevent this? Also is there a way to minimize
>> the modeless child dialog when the parent is minimized? code examples
>> would be greatly appreciated. Thanks.
>>
>
> 


0
2/24/2006 10:26:39 AM
Reply:

Similar Artilces:

Outgoing message screening
Hi All, have just been asked by the MD to urgently implement some kind of outgoing message screening for a possible rogue employee. The MD wants a copy of all this employees incoming and outgoing mail sent to him. Does anyone know how to achieve this in Exchange 2003 running on SBS 2003? I have used the "Delivery Options" in AD to specifiy all incoming mail to be delivered to the original and alternate address but am unable to see where I can set this attribute for outgoing or sent mail. Thanks in advance. Chris I am not sure this is possible in SBS. In E2K3 Enterprise, I...

top ten ranking
I have 20 category in each category I have random 1 to 500 items with sales units and Sales $ metric for each items. How can filter and rank it will show up top 10 items of combination for Sales Units and Sales $ Cat 10 Item Sale units Sales $ Rank bread 10 12 Cake 12 20 Cookies 8 10 "" "" "" &quo...

making adjustment for the start bar on the side of the screen
I want my 2 windows to be tiled vertically. Window1 is on the left and needs 25% of the screen Window2 is on the right and needs 75% of the screen I've done this with something like the code below, but this doesn't take into account if the user has the start bar on the side. Is there a way to tell if it is, and how many pixels it's taking up? thanks, southernatheart lngHorizontal = System.HorizontalResolution lngVertical = System.VerticalResolution 'RESIZE THE EXISTING DOCUMENT Application.WindowState = wdWindowStateNormal Application.Move Left:=0.2 * lngHorizon...

Dialog-based MDI ?
Hi! I'm having a real problem here trying to figure out what I have to do. What I want is a "parent" window, like the one you get when you create a new MDI app in VC++ (only has a menu bar and the body is dark grey), but I dont want those "documents", I want to use multiple dialogs instead. As I see this, since I've never worked with MDI, they seam to be used for programs that use always a same document archiecture, like Notepad could use these so you can open multiple text files or even Photoshop since you only create Pictures... But I am making a kind of ...

MS OUTLOOK e-mail does not always auto-delete stored mail on exiti
My MS OUTLOOK e-mail does not always delete mail stored in the Deleted Items folder automatically when I close down even though I have ticked the box in Tools/Options/Other/General dialogue box to "empty the Deleted Items folder upon exiting". Any answers would be most appreciated to pj.ireland@tinyworld.co.uk. Thanx Pete Please advise your version of Outlook and type of mail accoun. Thank you! -- Kathleen Orland Please support me in my efforts: SPCA Friends for Life 2010 Walk-A-Thon http://ontariospca.akaraisin.com/p/kathleenorland.aspx "Pierre" &l...

Modifying Automatically Generated Dialog Constructors -- A question (or 2) of philosophy
I have a modal dialog whose class is CBaseDialog. When this runs and the user hits a specific button the dialog needs to run a subsidiary dialog CChildDialog. I've done this many times and it works just fine. BUT ... in the latest program, one of CChileDialog's initialization routine, CChildDialog::OnInitInstance(), needs access to some of the data members of CBaseDialog. Okay, I've even done this before, creating new data members in CChildDialog that either hold the values of these variables or (gasp!) pointers to them so they can be modified. [Yes, I know there's another...

How can I view all of my tabs in one screen? Can I layer them?
Afraid not. You can make the display wider, but invariably at some point it is not wide enough. -- HTH Bob Phillips "Angelica" <Angelica@discussions.microsoft.com> wrote in message news:442BF163-9C71-41CB-B2C5-A5952CBCCE4A@microsoft.com... > One trick I use..........I have a workbook with 36 Sheets, I hide them all and create a new one (not hidden) named MainMenu and make an attractive list of all of them and create macros to each just by clicking on the name..............then on each sheet, I put a "Return to MainMenu" button which hides the sheet ag...

ListBox Size and Screen Resolution
Hi! I am having difficulty with an ActiveX listbox on a worksheet and differing screen resolutions. The listbox keeps changing sizes depending on the screen resolution. For example, I created a new workbook while in 1440x900 mode, added a listbox control, and saved the workbook and closed Excel. Next, I changed to 1920x1200 and reopened the workbook. Now, clicking in and out of "Design Mode" causes the font size in the box to continually get bigger until all that is left is a black box where the listbox was. Next, I saved the workbook, changed back to 1440x90...

pxa27x_lcd driver screen displaced
Hi everybody!! I am developing an image for a pxa270, which has a 640*480 screen. The driver I am using is the pxa27x_lcd.dll, but the screen is displayed displaced. I mean, the left corner is hidden, and in the right hand there=B4s an empty area. It seems to be like an offset in the screen placement on the display. Is the driver configured incorrectly??Is there something missing or incorrect in the registry??? Please helppp!!!!!!!!! Thanks for the attention. Best regards! On 3/15/2010 6:09 PM, Julen wrote: > Hi everybody!! > > I am developing an image for a pxa2...

Split screen #2
How can I show two excel screens at the same time? Half of each, side by side? Thanks in advance, Ed English Ed, From the menu : Window / Arrange -- Regards, Auk Ales * Please reply to this newsgroup only * * I will not react on unsolicited e-mails * "Ed" <ee15803@att.net> wrote in message news:3fc36fa5.12792214@netnews.worldnet.att.net... > How can I show two excel screens at the same time? Half of each, side > by side? Thanks in advance, > > Ed English Ed First, you'll need to select Window/New to create a new window to 'arrange' with!! ...

How do I make hyperlink target scroll to the top-left of spreadshe
I can't remember the setting to make Excel automatically scroll my hyperlinked cell to the top-left. For example, if my hyperlink is in cell A1 and the hyperlink destination is cell Z30, when you click the hyperlink in A1 the cell Z30 is now displayed in the top-left of the spreadsheet. It seems like there was a checkbox in the Options dialog box, but now I can't find it. I did this awhile ago, but forgot to write down the information. Hi Lori Tools>Options On the Transition tab Transition navigations keys -- Regards Ron de Bruin http://www.rondebruin.nl "Lori W....

Always show new record
Hi. I have a form for user input. The form activates when the dbase is opened. I would like to beable to have the field that they are inputting automatically go to a new record (blank ready to be entered) as soon as it the form is activated. Currently, it shows the first record. Is there a way to bring the form to "new record" view instead of a current or last input record? TIA! ...

Excel 2002
Running XP with Excel 2002. Excel seems to be functioning okay but I cannot access the DIALOG BOX normally opened by clicking TOOLS then OPTIONS. Anyone know how this could have happened and/or how to restore this function? I have worked my way through every step listed on John Walkenbach's site at - http://j-walk.com/ss/excel/usertips/tip076.htm and every other site I can find. HELP! You can still click on Tools? I'd try this: tools|customize|toolbars tab select Worksheet menu bar click the Reset button. taborsghost wrote: > > Running XP with Excel 2002. Excel s...

Adding Toolbars to a Dialog-Based Application
Hi: I'm trying to add a toolbar to a vc++6.0 dialog-based application. I tried to follow the instructions in the DLGCBR32 Sample, but they didn't work. I created a dialog-based project, MyProg and, as instructed in the sample, I added the following code to CMyProgDlg::OnInitDialog(): CRect rcClientStart; CRect rcClientNow; GetClientRect(rcClientStart); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, reposQuery, rcClientNow); CPoint ptOffset(rcClientNow.left - rcClientStart.left, ...

modify selection grayed out for all items in Customize dialog
Excel XP - can't change keyboard shortcut, name, etc. for any menu or button item in Excel. "Modify Selection" is grayed out without exceptions. Recent activity: Reinstalled Office XP and Downloaded Office XP service pack 3. Thanks for any input. ...

Automatic login screen in Win7?
Win7 is constantly asking me to login in after a period of inactivity. I have gone to User Accounts, unchecked Users must login and put my user name and password in the "Automatically login" dialog box. Win7 still wants me to login. Any suggestions? Thanks in advance... Bob On 21/12/2009 00:38, Bob Newman wrote: > Win7 is constantly asking me to login in after a period of inactivity. > I have gone to User Accounts, unchecked Users must login and put my user > name and password in the "Automatically login" dialog box. Win7 still > wants me to...

How do I display a dialog box that pops up when you first open exc
I am trying to display a dialog box that pops up when you first open an excel file. I want it to say... Starting June 2005 we will be receiving a print out list of ATS (Application Toolig Solutions) invoices that paid sales tax. This will be reported quarterly. This should be applied to the credit sheet I want it to have an "ok" button to close the dialog box. How do I do this? Hi, Erin. Open your file. Hit Alt+F11 or Tools-->Macro-->Visual Basic Editor. Double-click ThisWorkbook. Paste the following code, hit the Save diskette, and close and reopen your workbook to ...

text to appear at top of cell
in every cell I am tapping Alt and return so all the text appears in one box when the box is filled i manually drag the box down so all text is diaplayed rather half of it 1. Is there a shortcut way to apply this to all cells so that the text will display in one cell automatically in all cells and it automaitcally returns down so all text is diaplayes 2. When doing this in all cells the text displays in the bottom how can i set it so the text displays in the top Hit ctrl-a (twice in xl2003) to select all the cells. Then Format|Row|Autofit (You could also just select the rows you want...

sharing variables between dialog boxes
Hi all, I have a dialog based application where i want to share variables between 2 dialog boxes. More specifically, i have a dialog box with a menu option settings. On pressing that a new dialog box is invoked. This new dialog box has a edit box and save button. User will write into that edit box and press save button. When ever he presses save, the dialog box will close. Now i want the contents of the edit box into the main dialog box from where that dialog box was invoked. How should i go about that??? thanks kunal The class that wraps the 2nd dialog and displays the edit control ...

Visit my website
Please Visit my website - Must be in the Top 100 best. Feel free to send any ideas to me via valid email: P.s. Please sign guestbook on my homepage , and leave addy for contact. many thanks Milney ...

? Customize Notifications Dialog (XP), CListCtrl, CListBox
Hi, I know this is a bit of a long shot but I have a question about the Customize Notifications dialog in Windows XP. It allows you to select the display behavior of tray items. My interest in it is that when you click on an item in the list control, the behavior column shows a listbox which allows you to select the option for that item. When you click a different item or a deselect the item, the list box either moves or goes away. I know there are ways to embed controls in a list control but I was wondering if anyone knew exactly how Microsoft went about doing it in this inst...

Print dialog
The problem that I have is that when a user prints an email from outlook (without opening the message) a dialog box pops up breifly saying that the document is being printed. What I need to do is turn this off so that there is no print notification. Any suggestions much appriciated Thanks Paul <paul.harris@herbertsmith.com> wrote: > What I need to do is turn this off so that there is no > print notification. Why is this a "need"? What ill effects does the user suffer when this dialogue box appears briefly? Since the print widget is a Windows construct and i...

Getting keystrokes in a control on a dialog
Hi everyone, It truly is a Monday :) I am having a tough time getting keys stroke messages in a CWnd derived control that is placed on a dialog box! I am catching WM_CHAR, WM_KEYDOWN, and even took over PreTranslateMessage, but nothing. How do I get my dialog box to send me the keyboard messages? AliR. Where did you write the PreTranslateMessage? It needs to be on the dialog object for you to trap it. ----------- Ajay Kalra ajaykalra@yahoo.com UINT CEditExtended::OnGetDlgCode() { return CEdit::OnGetDlgCode() | DLGC_WANTALLKEYS; <<< Important Bit } void CEditExtended::OnChar(...

I want to add scroll bar functionality in my screen capture utility
hi all, i have developed an application that shows a list of all running windows and allows user to capture their screens. I want to add scroll bar functionality in this app. I have add the scrollbar. scroll bars move but they dont scroll the image. please help me thanks & regards shoeb shoeb ali wrote: > hi all, > i have developed an application that shows a list of all running windows and > allows user to capture their screens. I want to add scroll bar functionality > in this app. I have add the scrollbar. scroll bars move but they dont scroll > the image. please ...

Excel ALWAYS locks up-little white cross-& I need to reboot HELP!
I have been having lots of trouble with my Excel "locking" up on me. It is so bad that I basically can't use the software. I click into my worksheet and a little white cross appears. Then it appears to "stick" and I need to go into my Task Manager to exit. HELP! Hi, Bunky Girl. Try the following: http://www.officearticles.com/excel/troubleshooting_microsoft_excel.htm ******************* ~Anne Troy www.OfficeArticles.com "Bunky Girl" <Bunky Girl@discussions.microsoft.com> wrote in message news:24BF52E0-94BD-4578-AB07-16FB62AF0EE1@microsoft.com...