Board index » Visual Studio » Why I couldn't use this function?
|
Sera
|
Why I couldn't use this function?
Visual Studio49
Hello all: I create a single document,and a modelless dialog is called by menu,look: void CSampleView::OnTest() if(!D11.m_hWnd) { D11.Create(IDD_D11,this); D11.ShowWindow(SW_SHOW); } and now I want to get the printer of dialog,look: void CSampleView::OnLButtonDown(UINT nFlags, CPoint point) { CD11 *p=(CD11*)this->GetDlgItem(IDD_D11); if(p) MessageBox("you"); else MessageBox("null"); } but it always display "null", I know I can use the variable "D11" to get the dialog's function and member,but I want to know why I couldn't use this function GetDlgItem? (Maybe I want to get the pointer in class CMainFrame or other class,should I do) Thank you very much. - |
