Click here to Skip to main content
15,908,455 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCStatic and Control Pin
1-Aug-01 23:26
suss1-Aug-01 23:26 
GeneralRe: CStatic and Control Pin
Tomasz Sowinski2-Aug-01 1:15
Tomasz Sowinski2-Aug-01 1:15 
GeneralDefine Pointer To Function Pin
Ghasrfakhri1-Aug-01 23:25
Ghasrfakhri1-Aug-01 23:25 
GeneralRe: Define Pointer To Function Pin
Michael Dunn1-Aug-01 23:43
sitebuilderMichael Dunn1-Aug-01 23:43 
GeneralCTreeView Pin
Ricky Berghold1-Aug-01 23:22
Ricky Berghold1-Aug-01 23:22 
GeneralRe: CTreeView Pin
Michael Dunn1-Aug-01 23:45
sitebuilderMichael Dunn1-Aug-01 23:45 
GeneralCDoc-CView-CDialog Pin
1-Aug-01 23:21
suss1-Aug-01 23:21 
GeneralRe: CDoc-CView-CDialog Pin
Tomasz Sowinski2-Aug-01 0:56
Tomasz Sowinski2-Aug-01 0:56 
The best solution to solve your problem would be passing the document pointer to dialog. You can add the pointer as a public member of dialog class:
class CYourDialog : public CDialog
{
// ...
CYourDoc *m_pDoc
// ...
};

Before calling DoModal, you should init m_pDoc:
// this assumes that you're opening the dialog
// in one of the view class methods
CYourDlg dlg;
dlg.m_pDoc = GetDocument();
if (IDOK == dlg.DoModal())
{
// ...
}

For more object oriented solution, make m_pDoc a private data member initalized in CYourDlg constructor.

Tomasz Sowinski -- http://www.shooltz.com
GeneralCPropertyPage and Titles Pin
1-Aug-01 23:10
suss1-Aug-01 23:10 
GeneralRe: CPropertyPage and Titles Pin
Tomasz Sowinski2-Aug-01 1:00
Tomasz Sowinski2-Aug-01 1:00 
GeneralLogin user name Pin
1-Aug-01 22:57
suss1-Aug-01 22:57 
GeneralRe: Login user name Pin
Michael Dunn1-Aug-01 23:50
sitebuilderMichael Dunn1-Aug-01 23:50 
GeneralRe: Login user name Pin
Serge A. Zhirko2-Aug-01 20:59
Serge A. Zhirko2-Aug-01 20:59 
GeneralBorland vs Microsoft Pin
Steve Thresher1-Aug-01 22:35
Steve Thresher1-Aug-01 22:35 
GeneralRe: Borland vs Microsoft Pin
Michael Dunn1-Aug-01 22:39
sitebuilderMichael Dunn1-Aug-01 22:39 
GeneralRe: Borland vs Microsoft Pin
Steve Thresher1-Aug-01 23:00
Steve Thresher1-Aug-01 23:00 
GeneralRe: Borland vs Microsoft Pin
Jamie Nordmeyer2-Aug-01 5:41
Jamie Nordmeyer2-Aug-01 5:41 
GeneralRe: Borland vs Microsoft Pin
Steve Thresher1-Aug-01 23:02
Steve Thresher1-Aug-01 23:02 
GeneralRe: Borland vs Microsoft Pin
Tim Deveaux2-Aug-01 4:44
Tim Deveaux2-Aug-01 4:44 
GeneralRe: Borland vs Microsoft Pin
Christian Graus2-Aug-01 13:13
protectorChristian Graus2-Aug-01 13:13 
GeneralCrystal Report 8.0 ... Pin
Hadi Rezaee1-Aug-01 22:30
Hadi Rezaee1-Aug-01 22:30 
GeneralRe: Crystal Report 8.0 ... Pin
2-Aug-01 3:20
suss2-Aug-01 3:20 
GeneralRe: Crystal Report 8.0 ... Pin
Hadi Rezaee3-Aug-01 17:59
Hadi Rezaee3-Aug-01 17:59 
GeneralScrollbar Pin
confalonieri1-Aug-01 22:10
confalonieri1-Aug-01 22:10 
GeneralRe: Scrollbar Pin
Tomasz Sowinski2-Aug-01 1:21
Tomasz Sowinski2-Aug-01 1:21 

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.