is there a magic trick to compile a dialog recource via dev-c++? I tried them from several sources and always got a 'parse error' message. I also studied the Forum-FAQ and searched the forum, found many threads to resources, but found nothing that might solve my challenge.
Here is the Compiler Log:
Compiler: Default compiler
Building Makefile: "C:\Main\Dev-Cpp\Makefile.win"
Fhrt make clean aus
rm -f wintestc++.o Projekt1_private.res Projekt1.exe
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Report Url Form"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "&OK",IDOK,70,25,50,14
PUSHBUTTON "&Cancel",IDCANCEL,124,25,50,14
//GROUPBOX "About this program...",IDC_STATIC,7,7,225,52
CTEXT "Url:",//An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
IDC_STATIC,5,10,9,33
END
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hmm.. strange, if I #define the dialog IDs in my programs they compile, but the dialogs don't appear, if I don't #define them everything works...
curiouser and curiouser...
b_a
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
is there a magic trick to compile a dialog recource via dev-c++? I tried them from several sources and always got a 'parse error' message. I also studied the Forum-FAQ and searched the forum, found many threads to resources, but found nothing that might solve my challenge.
Here is the Compiler Log:
Compiler: Default compiler
Building Makefile: "C:\Main\Dev-Cpp\Makefile.win"
Fhrt make clean aus
rm -f wintestc++.o Projekt1_private.res Projekt1.exe
g++.exe -c wintestc++.cpp -o wintestc++.o -I"C:/MAIN/DEV-CPP/include/c++" -I"C:/MAIN/DEV-CPP/include/c++/mingw32" -I"C:/MAIN/DEV-CPP/include/c++/backward" -I"C:/MAIN/DEV-CPP/include"
windres.exe -i Projekt1_private.rc -I rc -o Projekt1_private.res -O coff
windres.exe: resource.rc:20: parse error
make.exe: *** [Projekt1_private.res] Error 1
Ausfhrung beendet
-----
resource.rc20:
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
Is IDD_ABOUT defined anywhere withe a value?
did you #include <windows.h> in your resource file?
also, if you have #define IDD_ABOUT (some number) in your header file try taking it out.
Other than that, post a short example of a resource file that you can't get to work, might be just a syntax error...
b_a
IDD_ABOUT is defined in a resource.h file, I removed it and got an IDD_ABOUT undefined error directly.
The resource code looks like this:
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "My About Box"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,174,18,50,14
PUSHBUTTON "Cancel",IDCANCEL,174,35,50,14
GROUPBOX "Text..",IDC_STATIC,7,7,225,52
CTEXT "More Text",
IDC_STATIC,16,18,144,33
END
Add #include <windows.h> to the top of the file!
This is an part of my program for when I had the same error and fixed it!
#include <windows.h>
#define IDD_ABOUT 101
#define IDC_STATIC 102
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Report Url Form"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "&OK",IDOK,70,25,50,14
PUSHBUTTON "&Cancel",IDCANCEL,124,25,50,14
//GROUPBOX "About this program...",IDC_STATIC,7,7,225,52
CTEXT "Url:",//An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
IDC_STATIC,5,10,9,33
END
Thanks awesomescripts, that has done the trick. I had the windows.h in already, but the IDC_STATIC wasnt defined.
Thanks all for your quick replys+ help!
hmm.. strange, if I #define the dialog IDs in my programs they compile, but the dialogs don't appear, if I don't #define them everything works...
curiouser and curiouser...
b_a