-
error problem
i made one project in Dev C++
error say like that
4 C:\Dev-Cpp\Examples\ZZZZZZZZZZZZZZZZZ\resource.rc [Resource error] syntax error
C:\Dev-Cpp\Examples\ZZZZZZZZZZZZZZZZZ\Makefile.win [Build Error] [Project1_private.res] Error 1
this is resource.rc file
[QUOTE]
#include "resource.h"
[QUOTE]IDD_CONTROLSDLG DIALOG 260, 200, 180, 120[\QUOTE] //ERROR MESSAGE
STYLE WS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Windows Controls"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Close", IDCANCEL, 120, 100, 50, 14
END
[\QUOTE]
and this is Untitle3.cpp file
[QUOTE]
#include <windows.h>
#ifdef __BORLANDC__
#pragma argsused
#endif
#include "resource.h"
//---------------------------------------------------------------------------
HWND hWnd;
LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
//---------------------------------------------------------------------------
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_CONTROLSDLG),
hWnd, reinterpret_cast<DLGPROC>(DlgProc));
return 0;
}
//---------------------------------------------------------------------------
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
switch(Msg)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch(wParam)
{
case IDCANCEL:
EndDialog(hWndDlg, 0);
return TRUE;
}
break;
}
return FALSE;
}
//---------------------------------------------------------------------------
[\QUOTE]
and this is resource.h file
[QUOTE]#define IDD_CONTROLSDLG 101[\QUOTE]
-
Re: error problem
Please use code tags if you want people to help you. "[code] ["/"code] "
-
Re: error problem
What is WS_MODALFRAME?
Did you mean DS_MODALFRAME?