Need tutorial on Tab Controls in Windows API
Just wondering if there is any excellent tutorials on Tab Controls in Windows API?
I tried MSDN, but they don't really explain it well enough for me to learn it. A nice descriptive tutorial on this would be helpful.
If it helps, I'm trying to develop a dialog application that has a tabbed interface. This will officially be my first professional and most of all useful win32 program (if I ever get it working that is :)) I just need reliable resources for my learning experiences as I progress through this code. For now, I need information on tab controls :D
I have a big thing against MFC, I don't like how it works. That's my own personal opinion. So, that's why I like Windows API... :)
Again, thanks!
Re: Need tutorial on Tab Controls in Windows API
Quote:
Originally Posted by jbp2004
Don_PhrostByte,
I have submitted a copy of this tutorial here in CODEGURU but since it is still pending, let me give you the copy that I have uploaded to my website,
it's here
The link is dead and I have not succeeded in locating this tutorial in codeguru. Please point me to where this tutorial ended up? Thanks.
Re: Need tutorial on Tab Controls in Windows API
Quote:
Originally Posted by jkoutavas
The link is dead and I have not succeeded in locating this tutorial in codeguru. Please point me to where this tutorial ended up? Thanks.
EasyWin32 Library
Re: Need tutorial on Tab Controls in Windows API
Wow I made a post that earned 3,500+ views :)
Re: Need tutorial on Tab Controls in Windows API
You can see working sample of property sheet embedded in a window in this thread.
Re: Need tutorial on Tab Controls in Windows API
Could someone please post a zip file with the source code for this?
I can get it to compile but when I run it the program exits immediately after briefly flickering a dialog window.
Not sure if some of the code was left as an exercise to the student or what.
I figure getting a response to this is a long shot as this thread is rather old.
I previously used a tabbed dialog box to do this but I understand that using a property sheet should make saving the settings of all pages a snap which was previously very painful.
Thanks
Re: Need tutorial on Tab Controls in Windows API
See MSDN samples instead.
Re: Need tutorial on Tab Controls in Windows API
Quote:
Originally Posted by HwHack
I can get it to compile but when I run it the program exits immediately after briefly flickering a dialog window.
Could you be more specific? What can you get to compile? Did you do a debug build and see what is a reason for an application to exit prematurely?
Are you using Visual Studio? If yes, what version?
Quote:
Originally Posted by fred100
See MSDN samples instead.
Could you please elaborate? What sample?
Re: Need tutorial on Tab Controls in Windows API
Sorry for being vague- I had been working on this so long it became difficult to step back.
I did resolve this issue.
I was trying to get the code example posted early in the thread from Bond to work.
I created a win32 project, copied the code in and added comctl32.lib in the compile options in VC++ 2005.
I had a couple of compile errors first time around due to resources not being defined so I just defined them as constants which didn't work out for me. When I went back and created proper dialog resources everything seemed to work.
I stumbled across this thread looking for a refresher on tabbed dialogs. What caught my eye here was the save functionality. After getting this program to work and understanding it, I am disappointed in the save functionality.
I have 2 questions.
Is there a painless way to save the user inputs to dialog boxes without using MFC? My application will have hundreds if not thousands of inputs when I am through and to manually pull every control item out is not nice and prone to error. Preferably some way that can self discover the control items that need saving and do it autonomously.
Secondly, whats the advantage to using a property sheet over a tabbed dialog? I dont see any distinct advantage unless you needed to create a wizard.
Thanks
Re: Need tutorial on Tab Controls in Windows API
Quote:
Originally Posted by HwHack
Is there a painless way to save the user inputs to dialog boxes without using MFC? My application will have hundreds if not thousands of inputs when I am through and to manually pull every control item out is not nice and prone to error. Preferably some way that can self discover the control items that need saving and do it autonomously.
Newer frameworks have the concept of data binding which allow you to connect a control to a datasource (which usually is a collection of items). Typically this sort of framework has the ability to track changes to each item and mark the item(s) as dirty. The data transfer between the control and the underlying bound item is handled automatically and dirty items can then be saved as needed. It would be quite a bit of work, but you can replicate this functionality.
Quote:
Originally Posted by HwHack
Secondly, whats the advantage to using a property sheet over a tabbed dialog? I dont see any distinct advantage unless you needed to create a wizard.
The advantage is layout. For all but the simplest design it will be easier to keep track of the controls for each page (assuming you use the resource editor) rather than putting all the controls on a dialog and hiding/showing the controls based on the selected tab.