Archived

This topic is now archived and is closed to further replies.

glGreenhorn

err.. a Win-related question

Recommended Posts

I have to give this site an awful lot of credit! Just now did I browse through the posts and witnessed the fine percentage of them that get a satisfying answer!! Anyway, does anyone have an idea how to access the sort of Windows control you see when you choose advanced options in Unreal (for example). It looks cool and it's useful, too. Thanks a million! Oh yea, I forgot - I'm using BC5.02 Edited by - glgreenhorn on October 21, 2001 6:42:50 PM

Share this post


Link to post
Share on other sites
For that you need to learn Win32 programming.

I consider it to be the most annoying, boring, and repetitive thing about programming for Windows. Microsoft are the absolute worst API designers (don''t get me started on DirectX...).

Win32 is the native Windows 9x language. For some reason Microsoft happened to make the win32 API take a whole page of code to display a simple window.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
> For some reason Microsoft happened to make the win32 API take a
> whole page of code to display a simple window.

Oh, if you want to do a dialog like the extended-options one in Unreal, then it''s gonna take alot more than a single page of code...

Unfortunately, Terran is right, you''ll have to learn Win32, and you will hate it (because it is horrible), but it''s the only way displaying dialogs under Windows. There are some nice Win32 tutorials, you should have a look at them, but _please_ don''t go at MSDN or something like that, or you''ll get traumatized for the rest of your life...

Share this post


Link to post
Share on other sites
Lol, I now feel REALLLLY self-confident Thanksalot!!!

And why do you think they (Microsoft) are like that, Terran - they''re evil, that''s all. And as to programming - why do you think Win98 crashed when it was first introduced to public...

Ok, enough chit-chat - gonna go and read some Win32 tuts now (hehe, here''s where you laugh)...

Share this post


Link to post
Share on other sites
For a less-scary one try http://www.winprog.org/tutorial/ - that''s the one that calmed the fear in me

Share this post


Link to post
Share on other sites
On 2nd thought - I think I will return to plan A. Since I really do not have the time to go through all the new code and start learning something that is half alien to me - WinAPI -, what (file) format could I possibly find such a (FREE,UNCOPYRIGHTED) custom control in on the Net? One possibility, I know, is VBXs, but most of those are locked from unauthorised users and I don''t want to pirate or anything, I just need to use a copy of it


Keep cool!

Share this post


Link to post
Share on other sites
Hey, what's up with the Win32 bashing? It's not THAT bad...
And about MSDN, yes, it is hard to learn from, but it's great later on, when you need to find functions to do certain stuff...

I'd recommend getting a book like Tricks of the windows game programming gurus, or find someplace on the net that shows you the basics of win32 programming. Just how to open a window. Once you know that and really UNDERSTAND it, it's not very hard to do more advanced stuff. Just remember, everything is a window, they basicly works in same way...

And remember: The MSDN is you friend...

Edited by - Rudan on October 23, 2001 7:51:15 AM

Share this post


Link to post
Share on other sites
I agree with Rudan. It''s easy for guys like us because i personally, didnt even know opengl existed, and found myself playing around with win32 code and figured out what each function did. Sure, it takes way more than 2 hours to get used to it, its the api to an entire operating system, not the api of something like a simple graphics rendering library.

Quit bashing windows, nearly everyone uses it, who cares about the people who made it, it works good enough for me.

Share this post


Link to post
Share on other sites
Just to agree with previous two posts.

Personally I''d go for an online tute for Win32; I learnt Win32 from the tutorial I linked to above, and then took it further on my own. While I have a generic C++ book (which isn''t the best one around by a long way), I''ve never bought a Win32/OGL book.

However, and this is my point, once you''ve got the basics down, use MSDN as an everyday reference. Remember it''s a MS compiler you''re using and MSDN is effectively the Visual Studio help file - why on earth be afraid of your compiler''s documentation?

Spend an hour looking around MSDN and getting to know what lives where, and playing with the Advanced Search. Once you get used to the layout, MSDN is WONDERFUL. And it''s the definitive source.

Running away from such a wonderful free resource will limit you hugely to only learning what other people have distilled into tutorials.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If all you want to do are 3D OpenGL games, then forget about the Win-32 API - it''s useless. You will be learning for weeks or even months only to do a single dialog - a waste of time.
Why not doing it in OpenGL ? You could even do nice looking dialogs, instead of those boring Windows-crap-ones.

Share this post


Link to post
Share on other sites
quote:
If all you want to do are 3D OpenGL games, then forget about the Win-32 API - it''s useless.

That''s not true. If you ever try to make a game, there''s a good chance you''ll need a level editor. Win32 is great for that kind of stuff. I made a tile-map editor, using OpenGL for rendering and win32 for controls like buttons, menus and everything else...

I''d say that a programmer who knows nothing but OpenGL is a pretty useless programmer. I don''t mean that newbies should learn the win32-API before anything else, it''s hard to start with, but you should eventually learn it. Saying that it''s useless is just plain crazy...

Share this post


Link to post
Share on other sites
MSDN is good for reference I think, and when you want to start playing with things like ListBoxes, or having a tray icon for your app, but if you know zilch about WinApi, eighter get a Book (almost any game prog book has basic winapi) or find a tutorial, basic things like the message pump, and the Winproc Function are not covered in detail there.

Share this post


Link to post
Share on other sites
Why you don''t use Borland C++ Builder ?
It''s simple to use and does Win32 and you may port your source to Linux via Kyrix (not sure).
You can make as many Win32-Controls as you want using Borland''s VCL.

I''m working on porting NeHe''s Framework to BC++Builder.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
[quote}
That''s not true. If you ever try to make a game, there''s a good chance you''ll need a level editor. Win32 is great for that kind of stuff. I made a tile-map editor, using OpenGL for rendering and win32 for controls like buttons, menus and everything else...


3DSmax, Maya, Softimage, Blender, Milkshape.

quote:

I don''t mean that newbies should learn the win32-API before anything else, it''s hard to start with, but you should eventually learn it. Saying that it''s useless is just plain crazy...



I don''t think so. Fact is: If you do a 3D game, esp. using OpenGL, what Win32 functions do you use ? Hmm ?? You open a windows, get a rendering context, and close that window when the game ends. That''s it. Games using external option menus written under the Win-API (such as the mentioned Unreal ext. options) are extremly rare, normally everything is done in the games environment.

Things are different if you''re writting a Windows application, ofcourse. But, I''m sorry, if you write a game, it *is* useless to learn Win32.

quote:

I''d say that a programmer who knows nothing but OpenGL is a pretty useless programmer.


Oh really ? Suppose you want to code Quake4 or whatever. Then please tell me (being an OGL pro, but no clue about the Win32 API, so a useless programmer following your definition) what Win32-API functions do *you* exactly need for such a game ??? Besides opening a window, closing a windows, minimal event handling and multitreading ? Note that DirectX is *not* Win32...







Share this post


Link to post
Share on other sites
quote:
3DSmax, Maya, Softimage, Blender, Milkshape.
You''re right to a certain extent. Those programs are great for making models and maybe levels, but there''s no way you''ll be able to, for example, make a editor for tile-maps with any of those. And there''s other kind of editors to. Maybe one for making NPC:s for a RPG (I''m not talking about the models, but their stats, inventory and so on. Might be nice to have an easy-to-use interface for that). The point is that some sort of editors does not exist, and you might have to do them yourself. Sure, it''s possible to use other things for that, but the win32-API is good for that kind of stuff.

quote:
being an OGL pro, but no clue about the Win32 API, so a useless programmer following your definition

ok, I agree that was a bad choice of words from my side. What I mean is that a programmer should know more than one thing. Windows is so common, it might be a good idea to actually being able to use the Win32-API. Once again I return to the editor-stuff. It''s a fact that for a big project you''ll need good editors. And if you, like most people here, isn''t a proffesional game-developer, you''ll probably have to do it yourself, since there''s a good chance there''s no ''Tools-programmer'' in you group.

quote:
Note that DirectX is *not* Win32...

Heh, nice try. I actually knew that already...

quote:
If all you want to do are 3D OpenGL games, then forget about the Win-32 API - it''s useless. You will be learning for weeks or even months only to do a single dialog - a waste of time.

(I don''t know if this is the same AP as the last one, but it really doesn''t matter)
What I find really strange is that everyone say Win32-coding is so damn hard. Yes, it''s hard if you''re just starting to learn about programming, but if you, AP, is a OpenGL pro like you said, you probably now quite a lot of C/C++ too, right? If that''s the case, I promise you''ll be able to learn enough to do a pretty nice, useful windows-program in a few days...

Sorry if I offended anyone with my last post, that was not my intention.

Share this post


Link to post
Share on other sites
I do not have any numbers but I think almost all more advanced GUI code for Windows is using MFC or VCL. You have some free alternatives like V and wxWindows(?) but I do not know how good they are.
MS and Borland have lot of tools and templates for this.

OpenGL is certainly much more fun than GUI programming.

Share this post


Link to post
Share on other sites
quote:
I do not have any numbers but I think almost all more advanced GUI code for Windows is using MFC or VCL. You have some free alternatives like V and wxWindows(?) but I do not know how good they are.
MS and Borland have lot of tools and templates for this.

You're right about that... I didn't say there's no alternetives to Win32, I was just trying to point out that it is useful for game-programming....

quote:
OpenGL is certainly much more fun than GUI programming

I definitly agree with you about that!


Edited by - Rudan on October 24, 2001 11:49:14 AM

Share this post


Link to post
Share on other sites
Thanks for the debate.

I WAS actually looking forward to an easy way out. I mean I know the basics in WinAPI, I''m not a total stranger. I just thought maybe someone knew a way to access such a cotrol without having to mess around with creating it...

Obviously I''m gonna have to resort to something simpler (since I really-really-REALLY don''t have the time to spend on creating a custom control from scratch - you know, school and stuff and all...).

As to game-programming, well - it depends on the type of game. In most genres, i definitely agree with the ogl-proponents here, OpenGL and DX beat the standard Win32 API, even if it is not something bigBigBIG and 3D

Share this post


Link to post
Share on other sites