Sign in to follow this  
dimovich

Win32 Main Window prototype

Recommended Posts

Hello! Is there any way to create a template for the main program window the same way we create for dialog boxes ? It's a pain in the ass creating all those buttons and client windows in WM_CREATE... :)... All the best!

Share this post


Link to post
Share on other sites
But how do comercial (i.e. BIG) applications create all those buttons for their main window ? I suppose they don't use dialog boxes (for their main window)... Probably there is a specific method under MFC, but I'm interested in pure Win32 (due to app. size limit).

Share this post


Link to post
Share on other sites
Quote:
Original post by dimovich
But how do comercial (i.e. BIG) applications create all those buttons for their main window ?


CreateWindow("button"...) ?

Share this post


Link to post
Share on other sites
Win32 layout facilities on the whole are pretty poor. I've always had really bad experiences with MFC. I have no idea what MS do internally but I feel sorry for their programmers if MFC is really it.

Anyway, you could create a modeless dialog box that pretty much acts like a window, but you won't get much in the way of dynamic layout help.

Share this post


Link to post
Share on other sites
dimovich,

Typical commerical apps would use subclassing and use this library to generate the widgets (Unless they have access to Vb or C#, then they can point and click their entire interface). In the end you spend a lot of time learning all the dirty little tricks to get your widgets to work, and if you stick with it you'll have a very handy widget api.

My widget api works well for my programs, but doesn't have all the features a typical package has to offer (ex FLTK). I have ~1k lines for all the widgets, for a comparison standpoint.

This article should get you started: here, and don't forget good 'ole msdn. It will be your best friend for windows development.

There are alot more resources out there, so you'll have to do your homework to find some good material.

Something else you should look into is XUL. I think this is a great way to represent widgets, and its XML driven.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this