this is what i have now,
it creates a Tabcontrol in my window
but how do i add Tab1,Tab2,Tab3 into the Tabcontrol ?  :shock:
i searched the examples and could not find any code using Tabcontrols in ObjectAsm
can someone please post a simple example for me ?

jpam


.const
STSTYLE equ WS_CHILD or WS_VISIBLE or WS_TABSTOP or TCS_TABS or TCS_FOCUSNEVER; or TCS_HOTTRACK
SetupTabCtrl TcDef {100, STSTYLE, 0, NULL, 0, 0, 295, 180}

Method OleDbApp.OnCreate, uses ebx esi, wParam:dword, lParam:dword
    SetObject esi

    mov .TabControl, $New(TabCtrl, Init, esi, .hWnd, null, offset SetupTabCtrl)
   
    xor eax, eax
MethodEnd


Posted on 2009-07-27 12:19:13 by jpam
Hi
Demo10 (examples folder) shows how to create and use tabs in a dialog.
The demo implements Setup Dialog in this way.

If you need step by step information i can guide you, but take a look at the demo first.

Regards,

Biterider
Posted on 2009-07-27 16:49:41 by Biterider
thanks for the repley biterider

i allready have study the demo10 example, but it uses the 'embed' function.
i don't want to use any dialog windows in my app
a step by step tutorial for tabs would be very helpfull for me  :)

Kind Regards
jpam

Posted on 2009-07-28 02:41:27 by jpam
Hi
Ok, no problem, but first you must tell me what do you want to achieve.
Most of the time, a tab control is related to a dialog where is is embedded. Clicking on each tab, a new modeless dialog child window is shown in the client area of the parent dialog, which acts as a frame.

The "Embed" macro simply reserves space in the hosting object for a given object which avoids unnecessary memory allocations. If you dont want to do it this way, you can use a pointer to the object and allocate it using the "New" macro.

Regards,

Biterider

Posted on 2009-07-28 02:50:58 by Biterider
my program needs 5 tabs
on the tabs i want to put listview edit radio and button controls

i allready wrote this program in AutoIt but i want to rewrite it in masm for speed and less KB

i think it's more complicated to use tabs in masm then i expected :)

Posted on 2009-07-28 09:58:18 by jpam
Hi
Attached is a skeleton that shows more clearly how to use the Tab Control.

Regards,

Biterider
Attachments:
Posted on 2009-07-28 11:24:30 by Biterider
Thanks Biterider ,that's a nice clean example for tabcontrols

i am study it right now :)

But how do i embed the tabcontrol in the main window without the dialog window ?
Posted on 2009-07-28 16:04:02 by jpam
Hi
There are 2 ways that come to my mind. First is to use the frame dialog as main window. The other way is to move the Tab control and its child windows to the SDI window like I did in the attached project. Both are OK, but it depends on what you want to do with them.

Regards,

Biterider
Attachments:
Posted on 2009-07-29 01:01:03 by Biterider
this is absolutely perfect !

many thanks for your effort Biterider

when study your example code,  it becomes more clear to me how its done

Kind Regards
jpam
Posted on 2009-07-29 11:18:19 by jpam