Hello all,
I'm trying to learn how to make just a basic windows app with some buttons and text windows to make the programs I normally create and interface with through DOS a little more interesting.
I'm following the tutorials at http://www.winprog.org/tutorial and http://www.functionx.com/win32/ .
I can manage to get the most basic stuff like creating windows and adding a menu bar. Next up, I want to try and get dialog boxes, similar to what you might see when you hit the About button on a window. Specifically, http://www.functionx.com/win32/Lesson04.htm outlines what I'm trying to do.
Well, since I understand almost nothing about what exactly the syntax for all of this is, from how to interface with functions to what I need to put in resource files, I'm first trying to copy-paste code and see if it works. Well, as far as I can tell, what I have should be working.
#include "resource.h"
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 "About this program...",IDC_STATIC,7,7,225,52
CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
IDC_STATIC,16,18,144,33
END
This is what I have in my resource file and when I go to compile, I get a syntax error on line 4, the STYLE line. Nothing I look up or read leads me to believe that the syntax here is incorrect, aside from the fact that this is the code given to me from a tutorial. I even tried deleting the STYLE line just to get something to compile and I get another syntax error on the DEFPUSHBUTTON line.
The main code in the .cpp file *should* all be fine, it's taken directly from these tutorials as well, but I'll post it if everything seems fine with this resource file code. Also, I'm compiling in Dev-C++.
If anyone knows what my problem might be and wants to help, I would really appreciate it. This isn't really something I *need* to do but it would be real interesting if I could figure it out.