Q: How to move a CDialog before calling DoModal() 
Author Message
 Q: How to move a CDialog before calling DoModal()

Hi.

I want to create a CFileDialog that I can reposition before it turns
visible with DoModal()! (I want it to popup elsewhere) How do I do
this? (Without creating a new class that is based on CFileDialog)

Thanks   / Rob

--------------------------------------------------------------
        // Set Filter & open a file dialog
        CString csFilter;
        csFilter.LoadString(IDS_AOLECARD_IMAGEFILT);

        CFileDialog dlg(TRUE,"jpg",NULL, OFN_HIDEREADONLY |
                OFN_FILEMUSTEXIST | OFN_OVERWRITEPROMPT,
                csFilter, this);

        // Move the dialog to upper left corner of parent
//      CRect pPos;
//      pPos.SetRect(20,20,420,320);
//      dlg.MoveWindow(pPos, FALSE);            // ASSERT FAIL

        if (dlg.DoModal() == IDOK)
        {
                ...
                ...
        }
...



Tue, 22 Jan 2002 03:00:00 GMT  
 Q: How to move a CDialog before calling DoModal()


Fri, 19 Jun 1992 00:00:00 GMT  
 Q: How to move a CDialog before calling DoModal()
That's going to be a good trick. You want to change the position
of a window before it *has* a position.  I think you need to do
some more thinking about your design.

Possibly what you want to do is have the dialog come up in a
particular spot on the desktop?
--
Dan Evens
Standard disclaimers etc. No spam please.



Quote:
> I want to create a CFileDialog that I can reposition before it turns
> visible with DoModal()! (I want it to popup elsewhere) How do I do
> this? (Without creating a new class that is based on CFileDialog)



Tue, 22 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using DoModal from CDialog when called from a DLL

2. Calling CDialog::DoModal crashes

3. CDialog::DoModal(), CDialog::EndDialog() Design Flaw

4. Qs on Function Call on Array

5. Q: CDialog::DoModal () fails

6. CDialog::DoModal

7. CDialog.DoModal problem

8. Help. CDialog::DoModal Fail in _beginthreadex

9. CDialog::DoModal() Behaviour

10. Invalid Page Fault from CDialog.DoModal()

11. CDialog::DoModal()

12. CDialog::DoModal() keyboard messages?????

 

 
Powered by phpBB® Forum Software