Click here to Skip to main content
15,915,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: can main() be overloaded?? Pin
Paul Michalik18-Aug-10 22:56
Paul Michalik18-Aug-10 22:56 
GeneralRe: can main() be overloaded?? Pin
Emilio Garavaglia19-Aug-10 9:38
Emilio Garavaglia19-Aug-10 9:38 
GeneralRe: can main() be overloaded?? Pin
Paul Michalik19-Aug-10 22:10
Paul Michalik19-Aug-10 22:10 
GeneralRe: can main() be overloaded?? Pin
Emilio Garavaglia19-Aug-10 22:38
Emilio Garavaglia19-Aug-10 22:38 
AnswerRe: can main() be overloaded?? Pin
englebart19-Aug-10 3:14
professionalenglebart19-Aug-10 3:14 
JokeRe: can main() be overloaded?? Pin
tsafdrabytrals19-Aug-10 4:44
tsafdrabytrals19-Aug-10 4:44 
GeneralRe: can main() be overloaded?? Pin
Paul Michalik19-Aug-10 22:14
Paul Michalik19-Aug-10 22:14 
QuestionHow to fetch "User must change password at next logon" through LDAP authentication in ADSI? Pin
Kushagra Tiwari17-Aug-10 23:57
Kushagra Tiwari17-Aug-10 23:57 
AnswerRe: How to fetch "User must change password at next logon" through LDAP authentication in ADSI? Pin
Garth J Lancaster18-Aug-10 0:34
professionalGarth J Lancaster18-Aug-10 0:34 
GeneralRe: How to fetch "User must change password at next logon" through LDAP authentication in ADSI? Pin
Kushagra Tiwari18-Aug-10 1:54
Kushagra Tiwari18-Aug-10 1:54 
GeneralRe: How to fetch "User must change password at next logon" through LDAP authentication in ADSI? Pin
Garth J Lancaster18-Aug-10 2:21
professionalGarth J Lancaster18-Aug-10 2:21 
AnswerRe: How to fetch "User must change password at next logon" through LDAP authentication in ADSI? Pin
Kushagra Tiwari23-Aug-10 0:27
Kushagra Tiwari23-Aug-10 0:27 
QuestionHelp needed about help (2) Pin
Anthony Appleyard17-Aug-10 23:45
Anthony Appleyard17-Aug-10 23:45 
AnswerRe: Help needed about help (2) Pin
Moak18-Aug-10 1:10
Moak18-Aug-10 1:10 
QuestionRe: Help needed about help (2) Pin
David Crow18-Aug-10 3:03
David Crow18-Aug-10 3:03 
AnswerRe: Help needed about help (2) Pin
Eugen Podsypalnikov18-Aug-10 3:34
Eugen Podsypalnikov18-Aug-10 3:34 
AnswerRe: Help needed about help (2) Pin
KarstenK18-Aug-10 4:14
mveKarstenK18-Aug-10 4:14 
GeneralRe: Help needed about help (2) Pin
Niklas L18-Aug-10 5:26
Niklas L18-Aug-10 5:26 
JokeRe: Help needed about help (2) Pin
Moak18-Aug-10 5:31
Moak18-Aug-10 5:31 
JokeRe: Help needed about help (2) Pin
Niklas L18-Aug-10 5:40
Niklas L18-Aug-10 5:40 
GeneralRe: Help needed about help (2) Pin
Rick York18-Aug-10 6:57
mveRick York18-Aug-10 6:57 
GeneralRe: Help needed about help (2) Pin
Niklas L18-Aug-10 7:49
Niklas L18-Aug-10 7:49 
GeneralRe: Help needed about help (2) Pin
Rick York19-Aug-10 20:17
mveRick York19-Aug-10 20:17 
GeneralRe: Help needed about help (2) Pin
Niklas L19-Aug-10 23:15
Niklas L19-Aug-10 23:15 
QuestionHow to update the CMDIView window in the mode dialog? Pin
wangningyu17-Aug-10 23:45
wangningyu17-Aug-10 23:45 
Hello everyone !

The test dialog will showing ,when the mouse double clicked on the MDIView.

Now I want to get the CMDIView's pointer in test dialog member function,and then to call "CMDIView::OnDraw" to update the windows.

the code like this:

/////////////////////////////////////////////////////////////////
// MDIView.h

#include "TestDlg.h"

class CMDIView : public CView
{
public:
CTestDlg *m_pTestDlg;
CWnd *m_pWnd;
}

CMDIView::CMDIView()
{
m_pTestDlg = new CTestDlg();
m_pTestDlg.Create(IDD_TEST_DLG,this);
m_pTestDlg.ShowWindow(SW_HIDE);
m_pTestDlg.UpdateWindow();
}

void CMDIView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
m_pTestDlg.InitDlg("Hello",this);
m_pTestDlg.ShowWindow(SW_SHOWNORMAL);
}

CMDIView::OnDraw(CDC *pDC)
{
//Here will get the document pointer to draw the element.
GetDocument()->DrawAllItem(..);
}
// MDIView.h over.
/////////////////////////////////////////////////////////////////


now here is the dialog's member function:

/////////////////////////////////////////////////////////////////
class CTestDlg : public CDialog
{
public:
CWnd *m_pWnd;
//......
}

CTestDlg::InitDlg(CString strTitle,CWnd *pWnd)
{
SetWindowText(strTitle);
m_pWnd = pWnd;
ASSERT( m_pWnd != NULL);
}

void CTestDlg::OnBtnEdit()
{
//Now I want to get the CMDIView's pointer,and then to call CMDIView::OnDraw
//Then how to write?
......
}

I try to use this way ,but failed too,please help me...

m_pWnd->Invalidate();
m_pWnd->UpdateData(FALSE);


Thanks for you reply !

Best Regards !

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.