The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: z941998 on April 23, 2011, 02:30:34 AM

Title: Main application Tab Control question
Post by: z941998 on April 23, 2011, 02:30:34 AM
Hi all, I want to create an app that has Tab Control in the main clIEnt window area (ie. I do not want to use a dialog box).

I read in the SDK how to do this.  Everything is fine except that the SDK refers to WC_TabConrol as a extended window style.

When I tried to complie I get an error message indicating undefined extended style.  I searched the masm lib include files and did not find it.

What should be used to create a tab control within the main app?

Title: Re: Main application Tab Control question
Post by: Gunner on April 23, 2011, 02:33:55 AM
szWndClsTab             BYTE    "SysTabControl32", 0


is the class to use in CreateWindowEx
Title: Re: Main application Tab Control question
Post by: dedndave on April 23, 2011, 02:39:05 AM
also, win32 constants are case sensitive
so, if it were defined, it would be WC_TABCONTROL
in C programs, that is defined as the string that Rob showed you
that doesn't quite work the same way in ASM, so you need to define the string and, in the INVOKE parameter, use:
offset szWndClsTab
Title: Re: Main application Tab Control question
Post by: z941998 on April 24, 2011, 12:08:43 AM
I lost some hair on this one.  I was also refered to another post (search for Tabber.zip) that demon-strats what the both of your replys states.

My app is up and running now.

Thanks
Steve
Title: Re: Main application Tab Control question
Post by: dedndave on April 24, 2011, 01:46:29 AM
don't feel too bad
i am losing hair on a simple tooltip demo - lol
not the program, so much as getting it to work with a manifest

it's ok - a learning experience that will pay off in the future (if i don't forget it all)
Title: Re: Main application Tab Control question
Post by: Slugsnack on April 25, 2011, 11:27:23 AM
a few tips. when you create content windows for the tab, make them as children of the tab control, not the parent window. also if you do that you will notice some colour discrepancies. in this case you will find EnableThemeDialogTexture very useful..

also consider using resources instead of pure win32 api createwindow/ex. it's much the same unless you want to do something very complex and custom