I'm also curious how one goes about changing the '4003' and '4005' into something equally meaningful to the compiler and yours truly
The way I do it is to manually change the .h and .rc files.
So in the .h file,
#define ID_EXIT 4005 // EXIT button
#define ID_GENERATE 4004 // OK button
#define ID_TEXT 4003 // Text Box
And in the .rc file make the changes to reflect what you've done in the .h file.
The Generate button becomes ID_GENERATE, the text box becomes ID_TEXT and the Exit button becomes ID_EXIT.
For example.
CONTROL "Generate", ID_GENERATE, "Button", BS_DEFPUSHBUTTON|WS_TABSTOP, 56, 76, 40, 24
This will send "Hello" to the text box.
case WM_COMMAND:
switch (GET_WM_COMMAND_ID(wParam, lParam))
{
case ID_GENERATE:
SetWindowText(GetDlgItem(hwndDlg, ID_TEXT), "Hello");
break;
case ID_EXIT:
EndDialog(hwndDlg, TRUE);
return FALSE;
}
break;
John