Re: Setting one modeless dialog on top of the other
I agree, it is redundant, but I'm trying to understand the problem.
To me, sibling windows should be able to go ontop of each other.
Here's the call from one window:
SetupDLF(&vdlf, DLG_OPENDLG | DLG_NOOPEN | DLG_NOCHDIR, &vhFile,
szExtension, _T("Open Dialog Box"), _T("Open PRG"), szHelp);
fSuccess = FALSE;
fSuccess = TRUE;
load_prg(vdlf.szFileName, FALSE, m_hWnd);
CProgramWnd * pProgramWnd = new CProgramWnd();
hwndOwner, ProgExecuteCommand, filename, fQuiet);
The other is opened (you might recognize this, as you're helping me
with this too):
CPrgEditorDialog* dlg = new CPrgEditorDialog;
dlg->ptrToMain = m_hWnd;
Both of these are launched from the same menu.
On Jul 30, 4:58 pm, "AliR \(VC++ MVP\)" <A...@online.nospam> wrote:
Are you calling SetForegroundWindow from within a WM_SETFOCUS handler?
I say that would be a little redundant.
Can you post any of the releavent code?
I say it errors due to the msdn article which states:
BOOL SetForegroundWindow( );
Nonzero if the function is successful; otherwise 0.
so I ran this in the setfocus():
this->SetForegroundWindow(); //returns 0 (which means error)
DWORD blah = GetLastError(); //returns 0 (which means no error?)
Which makes me really confused. Any ideas?- Hide quoted text -
- Show quoted text -