aight.. last question here about resizing win32 dialog items
The edit box in the dialog remains the same size when I max the dialog's window. So I'm figuring I'd use WM_SIZE to set the new width/height of the edit's ID: IDC_MAINEDIT. Now is there some function like ResizeDialogItem(IDC_MAINEDIT, width, height)?
case WM_SIZE: { hEditSize = GetDlgItem(IDD_WORDPROC, IDC_MAINEDIT); MoveWindow(hEditSize, 0, 0, 100, 100, TRUE); } break;
error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'const int' to 'struct HWND__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Quote:Original post by philvaira
*** Source Snippet Removed ***
error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'const int' to 'struct HWND__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
hEditSize = GetDlgItem(IDD_WORDPROC, IDC_MAINEDIT);
Should be:
hEditSize = GetDlgItem(hWnd, IDC_MAINEDIT); (I.e. use the hWnd passed to your dialog proc. It might be called hDlg, depends on your code)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement