Jump to content
  • Advertisement
Sign in to follow this  
phil05

in win32, how do i access an a dialog edit box from its dialog proc?

This topic is 5400 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

As you see below, this is part of the dialog procedure of a dialog, obviously. I need the main source code to access IDC_MAINEDIT which is the name of the edit in the dialog. The idea is to set it blank, but right now its not recognizing with this error: error C2664: 'SetWindowTextA' : cannot convert parameter 1 from 'const int' to 'struct HWND__ *' Any idea on this?
					case IDR_FILENEW: 
						{
							if (MessageBox(NULL, "Are you sure you want to make a new document?", "New Document",
								MB_ICONQUESTION | MB_YESNO) == IDYES)
							{
									SetWindowText(IDC_MAINEDIT, "");
							}
						}
						break;

Share this post


Link to post
Share on other sites
Advertisement
anytime you see a HWND vs int error, you can always count on the menu and dialog functions. just a rule of thumb with Win32.

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!