flat assembler
Message board for the users of flat assembler.
Index
> Windows > Tabcontrol use |
Author |
|
OzzY 17 Apr 2005, 20:33
Hi! How to use tabcontrol?
I just build a resource file with my resource editor and put a tabcontrol on the dialog, but how to use it? Thanks! |
|||
17 Apr 2005, 20:33 |
|
coconut 17 Apr 2005, 21:22
in masm syntax:
http://win32assembly.online.fr/files/TabbedDialog.zip in tasm: http://win32assembly.online.fr/files/TabTutorial.zip fasmw also uses a tab control, you may want to browse thru the source |
|||
17 Apr 2005, 21:22 |
|
veach1 18 Apr 2005, 06:24
in fasm (without resources):
_________________ dream of mind creates a monster |
|||||||||||
18 Apr 2005, 06:24 |
|
JohnFound 18 Apr 2005, 07:16
veach1 wrote: in fasm (without resources): Just replace the first line of source with: Code:
include '%fasminc%\win32ax.inc'
|
|||
18 Apr 2005, 07:16 |
|
veach1 19 Apr 2005, 18:09
sorry...
fasminc.ini (combined common 'includes' from version 1.56 with added ODBC32.DLL structures + constants and API calls)
_________________ dream of mind creates a monster |
|||||||||||
19 Apr 2005, 18:09 |
|
Reverend 25 Apr 2005, 14:22
The prototype (not checked) would look like this:
Code: FIRST_CHILD_WINDOW_ID = 1 ;... uglobal ChildWindowHandles: .Child1 dd ? .Child2 dd ? .Child3 dd ? .Child4 dd ? ;... .Childn dd ? NB_OF_WNDS = (($-ChildWindowHandles)/4) endg ;... ; creating all windows push esi edi ebx mov edi, ChildWindowHandles ; all window handles will be stored there mov esi, NB_OF_WNDS ; counter mov ebx, FIRST_CHILD_WINDOW_ID ; windows' IDs @@: invoke CreateDialogParam, [hInstance], ebx, [hMainWindow], ChildWndProc1, 0 stosd inc ebx dec esi jnz @B pop ebx edi esi ;... invoke ShowWindow, [ChildWindowHandles.Child1], SW_SHOW ;... ; in window procedure cmp [.uMsg], WM_NOTIFY jz .notify ;... ; check if notify message is about tab control .notify: mov eax,[.lParam] cmp [eax+NMHDR.code], TCN_SELCHANGE jz .selchange return .selchange: ; hide last window mov eax, [LastShowedTab] invoke ShowWindow, [ChildWindowHandles+eax*4], SW_HIDE ; show newly selected window invoke SendMessage, [hTabControl], TCM_GETCURSEL, 0, 0 mov [LastShowedTab], eax invoke ShowWindow, [ChildWindowHandles+eax*4], SW_SHOW return |
|||
25 Apr 2005, 14:22 |
|
kasake36 20 Apr 2006, 12:50
This thread was very helpful for me, and finally i could compile the tabctrl example of veach1, which helped me a lot! But i have a question regarding the child-windows of the tabs. Veach1 creates elements by invoking CreateWindowEx, but since you often have more content in those child-windows than a button or an edit-box, i wanted to create the child-windows by invoking DialogBoxParam... which crashes successfully.
So could anyone please give me a hint of how one can create "complex" child-windows using resources? Thank you! P.S. I ALREADY had a look into the Fresh-editorhost.asm file. |
|||
20 Apr 2006, 12:50 |
|
kasake36 20 Apr 2006, 20:31
EUPHORIA!! I have now found out how to include "resource"-dialogs into the different tabs: For that i invoke the function CreateDialogParam.
The program "Sorting algorithms in Assembler", found on this site: http://www.codingcrew.de/marty/win32asm.php helped me out! Thank you dear program |
|||
20 Apr 2006, 20:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.