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;
in win32, how do i access an a dialog edit box from its dialog proc?
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?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement