المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Getting the handle of a PictureBox in MFC



C++ Programming
09-12-2011, 12:30 AM
Hi,
It's been a while since I've posted in here.

A friend and I have a problem with MFC,
We're trying to get the handle of a PictureBox in MFC,
but the code we use keeps returning null.

Here is a code snippet we're using
CStatic* pCStatic = (CStatic*) GetDlgItem(IDC_STATIC1); HWND hWnd = pCStatic->m_hWnd;
We're trying to get the handle of the PictureBox so we put a DirectX into the control.

Many Thanks
Tom