Lamest .rc problem
I know this is lame, but I've spent the whole night searching for an answer, and found nothing (maybe the problem's with me?...).
Okay, so here it is:
MinGW throws a syntax error at line 2 (STYLE...), and I can't figure out why.
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"
GROUPBOX "About this program...",IDC_STATIC,7,7,225,52
CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
Thx in advance
Try adding this to your resource file (I think). If this is totally wrong, I apologize. Leaving right now and didn't have much of a chance to check this out.
What a dumb idiot I am. Including windows.h solved it.
But YET it throws another syntax error at the line with GROUPBOX. Really sorry for these stupid questions, I'm quite new to programming.
Just #include <afxres.h> - it's a dummy version of the ms header of the same name which just #includes <windows.h> as MacGyver helpfully suggested previously and defines IDC_STATIC for you.
in your resource script.
#if !defined IDC_STATIC
#define IDC_STATIC -1
Not to discourage you in the least, but if you're new to programming, I would suggest sticking with practicing writing console based applications before moving on to writing GUI based programs. GUI programming in general requires knowledge and familiarity with lots of concepts and language features, which are considered slightly advanced to a brand new beginner (ie. pointers, dynamic memory, etc....)
Console programming lets you get good at the language without worrying about too many more details as to what window is doing what when.
I'm trying to make a (very simple) GUI for one of my existing programs, and if I find it too hard, I'll stick with the console of course. And thanks for your advice :)