|
A real gooooooood way to learn the win 32 bit APi |
BAF
Member #2,981
December 2002
|
any good ways, i want to make a win32 allegro game. Any good tutorials for beginners? also, i am looking for a cheap copy of MSVC 6 +. Anny Suggs???:-/ |
23yrold3yrold
Member #1,134
March 2001
|
Go buy Charles Petzold's Programming Windows: Fifth Edition. Pricey, but you'll save money if you use MinGW instead of MSVC 6 Maybe I should start a Win32 series in Pixelate ... -- |
Synapse Jumps
Member #3,073
December 2002
|
23 said: Maybe I should start a Win32 series in Pixelate ... MAYBE!? |
brain21
Member #1,208
December 2000
|
Quote: Maybe I should start a Win32 series in Pixelate ... I think that would be a great Idea!! I am now trying to do this, but finding it very slow. Bobby Ferris: You can get a free learners copy of VC++ 6.0 from many "Learn how to program in C++" books. I have about 5 copies from the books I have. |
23yrold3yrold
Member #1,134
March 2001
|
Quote: MAYBE!? Sorry; I had no idea you were so opposed to the idea EDIT: Heh heh -- |
StevenVI
Member #562
July 2000
|
I am opposed to the idea. http://www.winprog.org/tutorial/ Also, I second the motion to buying Petzold's book. It's a wonderful book. -Steve __________________________________________________ |
Thomas Harte
Member #33
April 2000
|
Quote: also, i am looking for a cheap copy of MSVC 6 +. Anny Suggs As an owner of MSVC 5, I thought a nice way to save money would be to buy only the upgrade edition of 6 - which was £10 (about €7 / the same in US$) on ebay, less than 1/4 what people seem to pay for the non-upgrade edition. Having done so, I discovered that buying the upgrade edition is a good way for everyone to save money. The box warns that proof 'may be required' of ownership of an earlier version, but in fact it is not required. I have installed MSVC 6 on a machine that has never had any MSVC before from only these discs. And you get all the hardcopy and MSDN stuff too, so... [My site] [Tetrominoes] |
BAF
Member #2,981
December 2002
|
nice! what books have the starter version? a am looking on ebay for it now too. |
Thomas Harte
Member #33
April 2000
|
You don't need the starter version, as I said, but nevertheless I know that it comes with the more recent 'Secrets of the Game Programming Gurus' books. [My site] [Tetrominoes] |
A J
Member #3,025
December 2002
|
msdn.microsoft.com ___________________________ |
StevenVI
Member #562
July 2000
|
Quote: msdn.microsoft.com Yes, MSDN has a wonderful section on learning win32 programming . Not to be lashing out here or anything, but how is MSDN gonna help someone learn Windows programming if they know squat about it? If you already know a function name and need the prototype with an explaination, yes, that'll help, but I fail to see how MSDN would be even remotely useful in learning how to write a win32 program. Follow the link I posted, or buy the book by Charles Petzold (or do both). Don't look to MSDN for anything helpful for a beginner. -Steve __________________________________________________ |
Thomas Fjellstrom
Member #476
June 2000
|
I learned from MSDN. And a few howtos on some of the tings I didnt quite get.. Like how to use the ListView. But thats it. -- |
Synapse Jumps
Member #3,073
December 2002
|
I'm sure this has been asked before, but how do you make a radio button or check box in Win API, can someonone point me to a tutorial or give me a code snippit? I've been searching for a while and the only one I found used MFC, so if you know how, please let me know |
23yrold3yrold
Member #1,134
March 2001
|
Radio buttons and check boxes are just the standard Win32 "button" class. You need to use the right 'button style'; BS_AUTORADIOBUTTON or BS_AUTOCHECKBOX, etc. when you create it. There's quite a few button styles; just search for keywords beginning in BS_ -- |
Synapse Jumps
Member #3,073
December 2002
|
Can't I just put a radio button in while the window is being created? In my WindProc thing, when WM_CREATE is passed, like I do with my menus? Sorry, all this windows stuff is SOO confusing to me, and recourse scripts don't make much sense either... |
23yrold3yrold
Member #1,134
March 2001
|
Yes, you pass the BS_* in the CreateWindow function. It's a Window style (like the WS_* styles) reserved for the button class. You can either pass it directly to CreateWindow when you call it (presumably during the WM_CREATE event) or use it in a resource script for dialog boxes. I agree resource scripts are not well doc'ed IMHO. I will definitely devote a whole article to deciphering them ^_^ -- |
Thomas Fjellstrom
Member #476
June 2000
|
Yup. You can create windows (using CreateWindow(), CreateWindowEx(), CreateMenu(), etc...) whenever/whereever you feel like. As for resource scripts, they can be handy, allowign you to keep the layout for your dialogs, your menu layout, localized text for widgets, Icons, bitmaps, any kind of resource really. IMO its best to get a graphical resource editor... I still haven't bothered to learn all the ins and outs of resource files. (thier syntax etc..) -- |
Synapse Jumps
Member #3,073
December 2002
|
I know this sounds newbish... because it is, completley newbish, but how do I do that? Like when I created the menus in my WM_CREATE event I used functions, could you please just point me to the functions I should use? Thanks!! |
23yrold3yrold
Member #1,134
March 2001
|
Menus should be declared in the resource file since it's so much easier and cleaner (unless you have a really compelling reason not to) ... And check out the link Harry posted. Should help a little ... -- |
Thomas Fjellstrom
Member #476
June 2000
|
Synapse: How do you create windows? CreateWindow, or CreateWindowEx. I told you that in my last post. 23: I have a reason, I don't know the syntax. -- |
23yrold3yrold
Member #1,134
March 2001
|
Ignorance is no excuse Menus are probably the easiest resource to "script"; you can see here how to make menus several ways, including the method you probably use. I think we can agree the scripts are much less ugly -- |
Thomas Fjellstrom
Member #476
June 2000
|
I have another reason: In my filfilter project thing, each plugin gets a menu item under the "plugins" menu. All nice and dynamical. -- |
23yrold3yrold
Member #1,134
March 2001
|
Okay, that's a good enough reason Not sure if you can so easily manipulate scripted menus, but anyway I doubt SJ is doing anything like that. -- |
Synapse Jumps
Member #3,073
December 2002
|
Yea, umm... I didn't even know that this was possible, but the compiler says I have a parse error in my resource file. Here is the line where the error is: STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU And in case it matters, here's the entire resource file, since it's short: 911 DIALOG DISCARDABLE 0, 0, 100, 50 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Controls One" FONT 8, "MS Sans Serif" BEGIN LTEXT "Filename to be generated: ",IDC_STATIC,7,10,14,8 EDITTEXT 1,25,7,120,14,ES_AUTOHSCROLL LTEXT "Include at least ",IDC_STATIC,10,30,23,8 EDITTEXT 2,75,27,21,14,ES_NUMBER LTEXT "% of directrory.", IDC_STATIC,80,30,23,8 END
I pretty much just stole that and guessed at the values... |
23yrold3yrold
Member #1,134
March 2001
|
Try losing DS_CENTER. It's the only one I don't immediately recognize, and my help file says it's Win95 only (if that matters). Not like it's a really important style Any you aren't defining the dialog in the .c file; you're defining it right there. The numbers are the location and dimensions of the windows. All you have to do is write a WndProc function for it and call DialogBox() to create it. -- |
|
|