I've been searching a lot on google but can't seem to find a tutorial on making a menu to my window from scratch...would anyone pls tell me, or maybe someone had a link? Or a code where I could see how to do it?
I've been searching a lot on google but can't seem to find a tutorial on making a menu to my window from scratch...would anyone pls tell me, or maybe someone had a link? Or a code where I could see how to do it?
Here's a good tutorial about Win32 programming...
http://www.winprog.org/tutorial
[C++]
IDE: DevC++ 4.9.9.2 (GCC 3.4.2)
2nd compiler: g++ (GCC 3.4.3/4.0.0)
3rd compiler: Borland 5.5
[C#]
IDE: Microsoft Visual C# Express 2005
2nd IDE: SharpDevelop
2nd compiler: csc in Command Prompt
.NET Framework: 2.0
[PHP]
Core: 5.1.0 beta 3
IDE: PHPEdit
2nd IDE: Notepad
Favourite extensions: exif,gd2,mysql
Favourite PEAR packages: DB, XML_RSS, ID3
Favourite databases: SQLite, MySQL
Cool, thank you man!
Hmm...I've been reading through the tutorial, and are now trying to make a dialog menu. I'm using the Dev-C++4 compiler, and when I make the following code inside the Resource Editor, it says there's a parse error in line two...
Well, I can't find it...is there something wrong with my compiler or...?Code:201 DIALOG 0, 0, 239, 66 STYLE WS_VISIBLE | WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME CAPTION "My DialogMenu" FONT 8,"AboutFont" 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\r\n\r\nby theForger", IDC_STATIC,16,18,144,33 END
You don't need to write resourcecode unless you really love to do it .You can use additional software - I preffer ResEd: http://radasm.visualassembler.com/projects/ResEd.zip (direct link).
[C++]
IDE: DevC++ 4.9.9.2 (GCC 3.4.2)
2nd compiler: g++ (GCC 3.4.3/4.0.0)
3rd compiler: Borland 5.5
[C#]
IDE: Microsoft Visual C# Express 2005
2nd IDE: SharpDevelop
2nd compiler: csc in Command Prompt
.NET Framework: 2.0
[PHP]
Core: 5.1.0 beta 3
IDE: PHPEdit
2nd IDE: Notepad
Favourite extensions: exif,gd2,mysql
Favourite PEAR packages: DB, XML_RSS, ID3
Favourite databases: SQLite, MySQL
Tha'ts a really cool resource editor - thx, but my compiler still tells me there's a ****ing parse error! Just that now its in line 7:
I really think it's my compiler that just sucks...or is there annother explanation?Code:IDD_AboutDLG DIALOGEX 6,6,194,106 CAPTION "About SS - Tactical Shield" FONT 8,"MS Sans Serif" STYLE 0x10CF0080 EXSTYLE 0x00000001 BEGIN CONTROL "About this game...",About SS - Tactical Shield,"Button",0x50000007,4,1,186,100,0x00000000 CONTROL "",IDC_EDT1,"Edit",0x50010000,38,-6,0,0,0x00000200 CONTROL "About Storm Strategy - Tactical Shield",IDC_STC1,"Static",0x50000000,40,24,120,9,0x00000000 CONTROL "By Jacob Fishcer",IDC_STC2,"Static",0x50000000,62,44,76,8,0x00000000 CONTROL "OK",IDC_BTN1,"Button",0x50010000,82,64,38,11,0x00000000 END
I had the same problem, and i have the same ugly compiler...
I figured it out somehow..But i cant remember how..
I can just make guesses from my own recent RC scripts..
try to include on the top
#include <windows.h>
#include <winresrc.h>
Also remember to define your constants, but im sure you have allready done that.
Like if you shall use IDC_EDT1 in your CONTROL statement, do something like this first, on the top of your RC script:
Or you can simply write the integers you want to correspondent with the controlstatment, but things like IDC_EDT1 is easier to remember than pure integers.Code:#define IDC_EDT1 392 //(Then, IDC_EDT1 corresponds to 392)
And on line 7, or the first CONTROL line, is the secound parameter not a constant. Try defining it as ONE word, just like the others..
For example: "IDC_EDT1"..
http://livebad.com/nuka
Da-Nuka
OK - I'll try that, hope it works; but I'm not gonna try it out now, as I've just run into some stupid "Illegal Action" problems with my code, so I'll script it all over again.
Thx for the help.