Here's what I've got. I only have two files. I am not using your header file (.h).
example1.cpp
d1.rc
First I use brc32 to compile the resource: brc32 d1.rc
Second, I run the following batch file z.bat by typing z at the command prompt:
bcc32 -c -W example1.cpp
ilink32/Tpe c0w32 example1.obj,example1.exe,,cw32.lib import32.lib,,d1.res
Code:
//Here is my example1.cpp:
#include <windows.h>
#include <tchar.h>
BOOL CALLBACK MainDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain( HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpszCmdLine,int nCmdShow ) {
DialogBoxParam(hInstance, "DIALOG1", NULL, (DLGPROC)MainDialogProc, 0);
return 0;
}
BOOL CALLBACK MainDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch( uMsg ) {
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch( wParam ) {
//case IDOK:
// EndDialog( hDlg, TRUE );
// return TRUE;
case 106:
EndDialog( hDlg, TRUE );
return TRUE;
case 107:
EndDialog( hDlg, TRUE );
return TRUE;
case IDCANCEL:
EndDialog( hDlg, TRUE );
return TRUE;
}
break;
}
return FALSE;
}
My d1.rc is the same as yours.
Mine compiles and links to an .exe. When I run, a dialog box appears with two buttons. If it still doesn't work, try compiling a simple c++ program with a main(), and see if you can compile it.