Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to read Unicode text files? Pin
Vladimir L.14-Nov-02 10:58
Vladimir L.14-Nov-02 10:58 
QuestionBorland C++?? Pin
Chip Rabinowitz14-Nov-02 10:25
Chip Rabinowitz14-Nov-02 10:25 
AnswerRe: Borland C++?? Pin
Selevercin14-Nov-02 12:10
Selevercin14-Nov-02 12:10 
GeneraleMbedded Visual C++ "Close" Button Pin
RebelCause14-Nov-02 9:07
RebelCause14-Nov-02 9:07 
GeneraleMbedded Visual C++ Scroll Bar Pin
RebelCause14-Nov-02 9:04
RebelCause14-Nov-02 9:04 
Generalfull screen dialog Pin
pnpfriend14-Nov-02 8:45
pnpfriend14-Nov-02 8:45 
GeneralRe: full screen dialog Pin
Joaquín M López Muñoz14-Nov-02 9:03
Joaquín M López Muñoz14-Nov-02 9:03 
GeneralGetParent when modeless Pin
john john mackey14-Nov-02 7:40
john john mackey14-Nov-02 7:40 
I have a modeless dialog that pops up a MODAL dialog. What I want to do is position that MODAL child relative to the "parent" modeless dialog - offset upper-left corner by +50.

What I can't do is get a pointer to the modeless (parent) dialog. My code just references the governing MainFrame window. Here is what I'm trying:

BOOL CPopUpDlg::OnInitDialog()
{
CDialog::OnInitDialog();

CRect pRect;
CWnd *pParentWnd;

pParentWnd = GetParent(); // tried GetParentOwner() too
pParentWnd->GetWindowRect(&pRect);

MoveWindow(pRect.left + 50, pRect.top + 50, 400, 400, NULL);
return (TRUE);
}


Can you help/explain how I reference the correct modeless parent I want?

Thanks.
John
GeneralRe: GetParent when modeless Pin
Ravi Bhavnani14-Nov-02 8:18
professionalRavi Bhavnani14-Nov-02 8:18 
GeneralRe: GetParent when modeless Pin
john john mackey14-Nov-02 10:20
john john mackey14-Nov-02 10:20 
GeneralRe: GetParent when modeless Pin
Ravi Bhavnani14-Nov-02 8:20
professionalRavi Bhavnani14-Nov-02 8:20 
GeneralRe: GetParent when modeless Pin
Neville Franks14-Nov-02 9:31
Neville Franks14-Nov-02 9:31 
GeneralRe: GetParent when modeless Pin
john john mackey14-Nov-02 10:13
john john mackey14-Nov-02 10:13 
GeneralRe: GetParent when modeless Pin
Neville Franks14-Nov-02 10:20
Neville Franks14-Nov-02 10:20 
GeneralRe: GetParent when modeless Pin
john john mackey14-Nov-02 10:48
john john mackey14-Nov-02 10:48 
GeneralRe: GetParent when modeless Pin
Ernesto Perales Soto14-Nov-02 11:07
Ernesto Perales Soto14-Nov-02 11:07 
GeneralRe: GetParent when modeless Pin
Neville Franks14-Nov-02 11:08
Neville Franks14-Nov-02 11:08 
GeneralRe: GetParent when modeless Pin
Ravi Bhavnani14-Nov-02 11:28
professionalRavi Bhavnani14-Nov-02 11:28 
GeneralMaking an ActiveX from MFC exe project ! Pin
Hadi Rezaee14-Nov-02 6:27
Hadi Rezaee14-Nov-02 6:27 
GeneralCWebBrowser2 Control and invalid URL Pin
olivier14-Nov-02 6:11
olivier14-Nov-02 6:11 
GeneralRe: CWebBrowser2 Control and invalid URL Pin
olivier18-Nov-02 1:59
olivier18-Nov-02 1:59 
GeneralModeless PropertySheet Pin
john john mackey14-Nov-02 5:41
john john mackey14-Nov-02 5:41 
GeneralRe: Modeless PropertySheet Pin
valikac14-Nov-02 7:07
valikac14-Nov-02 7:07 
GeneralRe: Modeless PropertySheet Pin
john john mackey14-Nov-02 7:32
john john mackey14-Nov-02 7:32 
Generaluppercase question Pin
NickOne14-Nov-02 5:19
NickOne14-Nov-02 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.