CWnd和HWND句柄的区别
CWnd只能对本控件的属性进行操作, HWND还可以对子控件进行操作
CWnd*转化为HWND
CWnd* pWnd = GetDlgItem(IDC_BUTTON2); HWND hWnd = pWnd->GetSafeHwnd();//CWnd*转化为HWND ::SetWindowText(hWnd,_T("测试"));
标签:控件,MFC,句柄,pWnd,GetSafeHwnd,HWND,CWnd From: https://www.cnblogs.com/liming19680104/p/16924235.html