I have for example IDC_EDIT1 C++ MFC Controls , How Can I get its handle ? By which Windows API , Can I done it ?
CWnd-derived objects have a GetSafeHwnd member function to retrieve the Windows handle of that object, so if your control is in a dialog you can retrieve the handle like this:
HWND hwnd = GetDlgItem(IDC_EDIT1).GetSafeHwnd();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With