如何得到想要的hwnd?
......
CMFCclassesApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CMFCclassesApp initialization
BOOL CMFCclassesApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CMFCclassesDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
CString szOutput;
szOutput.Format("key=%s,value=%s",name,ct.szVarMap[name]);
////////////
//问题 1:
//
//想在这里把dialog上的IDC_STATIC的文字设置成szOutput
//不知道怎么用SetWindowText(GetHWND(),szOutput);
// /\
// |
//这里怎么得到我想要的句柄---- |
////////////
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
问题 2:
怎么得到我想要的对话框的hwnd,以及对话框上的控件的hwnd?
怎么得到我的应用程序的hwnd(在vc中,不是c++)?