Jump to content
  • Advertisement
Sign in to follow this  
phil05

aight.. last question here about resizing win32 dialog items

This topic is 5464 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)?

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!