flat assembler
Message board for the users of flat assembler.

Index > Windows > .res question.

Author
Thread Post new topic Reply to topic
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 14 Aug 2004, 08:33
Hi.

So i have another question again....
I'm useing visual studio to make the res. I made a simple dialog with a richtext control on it.
It load fine. looks good, but when i change the size of the windows, the richtext size isn't change at all.

I read from the MoveWindows and WM_SIZE and i understand it... But how can i use it with my precompiled res?

If i use cratewindowsex to make the dialog item, i get back the handle of the control to eax and i can use movewindows.

But when i use Dialogboxparam
Code:
invoke  DialogBoxParam,eax,100,HWND_DESKTOP,DialogProc,0    

it make dialog and all the element on it, and i dont know the handle of them.

So, how can i get the handle of an element, from a precompiled res?

Another questin again: how can i use tab control?

Thank you for the help.

Ps: Sorry for my bad english, and for my lame questions but i yust started fasm nad api yesterday ^^""
Post 14 Aug 2004, 08:33
View user's profile Send private message Reply with quote
siddhartha



Joined: 01 Jun 2004
Posts: 7
siddhartha 14 Aug 2004, 12:09
Maybe you can use GetDlgItem:

HWND GetDlgItem(
HWND hDlg,
int nIDDlgItem
);



/siddhartha
Post 14 Aug 2004, 12:09
View user's profile Send private message ICQ Number Reply with quote
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 14 Aug 2004, 12:31
ty! it woks Smile
Now i only need to use tab control somehow...
any idea?
Post 14 Aug 2004, 12:31
View user's profile Send private message Reply with quote
siddhartha



Joined: 01 Jun 2004
Posts: 7
siddhartha 14 Aug 2004, 14:32
I can't just tell you what's wrong, but have you made separate flat bordered dialogs for the different pages you use in your rc? You should after that dynamically link them to the tab control like this:

LOCAL ts:TCITEM ; initialize the tab control item structure


here you should fill in the structure


invoke SendMessage,hTab,TCM_INSERTITEM,0,addr ts ; after that insert the tab

invoke CreateDialogParam,hInstance,IDD_TABOPT1,hTab,addr TabOpt1Proc,0 ; and initialize it

Good luck!


/siddhartha
Post 14 Aug 2004, 14:32
View user's profile Send private message ICQ Number Reply with quote
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 14 Aug 2004, 22:23
uhhh... i'm realy new with this and not everything is clear to me... Can you send a little example with tab control?

It will help me a lot.
I'm writeing an IRC client and i like to make the canels to a mirc like style.
I think it's with tab control.
Post 14 Aug 2004, 22:23
View user's profile Send private message Reply with quote
siddhartha



Joined: 01 Jun 2004
Posts: 7
siddhartha 15 Aug 2004, 02:05
Try this:

http://board.win32asmcommunity.net/showthread.php?s=&threadid=18862&highlight=tab+control


If you don't get it then post a reply and I'll do an example for you.


/siddhartha
Post 15 Aug 2004, 02:05
View user's profile Send private message ICQ Number Reply with quote
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 15 Aug 2004, 10:33
Firts thanx for the help:)

I try to understand and use this example but i have a bug...
Code:
 invoke GetDlgItem, [hwnddlg], TMP_TAB
mov    [hTabControl], eax

MOV [TCI.iImage],0
MOV [TCI.lParam],0

mov    [TCI.mask], TCIF_TEXT
mov    [TCI.pszText],"Tab1"
MOV    [TCI.cchTextMax],14
invoke SendMessage, [hTabControl], TCM_INSERTITEM, 0, TCI
invoke CreateDialogParam, [hwnddlg], 103, [hTabControl], ChildDlgProc, NULL         

on
Code:
invoke SendMessage, [hTabControl], TCM_INSERTITEM, 0, TCI    
my program is die... i get a windows error msg...

Any idea?
Ps: nevermind. found it Razz
TCI.pszText is a pointer...
Post 15 Aug 2004, 10:33
View user's profile Send private message Reply with quote
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 15 Aug 2004, 11:57
ok. Question again ^^""

Code:
.wminitdlg_option:
invoke GetDlgItem, [hwnddlg], TMP_TAB
mov    [hTabControl], eax

MOV [TCI.iImage],-1
MOV [TCI.lParam],0
mov [TCI.lpReserved1],0
mov [TCI.lpReserved2],0
mov    [TCI.mask], TCIF_TEXT
mov    [TCI.pszText],_ping
mov    [TCI.cchTextMax],16
invoke SendMessage, [hTabControl], TCM_INSERTITEM, 0, TCI
mov    [TCI.mask], TCIF_TEXT
mov    [TCI.pszText],nick
invoke SendMessage, [hTabControl], TCM_INSERTITEM, 1, TCI

invoke CreateDialogParam, [hwnddlg], TMP_FRAME1, [hTabControl], ChildDlgProc,0
mov    [hCurrentDialog], eax
invoke ShowWindow, eax, SW_SHOW
    


sooo. i can make a tab control! Ty for it Smile
But i can't show my dialog on the tab.
I'm useing the visual studio to make dialogs. I sett TPM_FRAME1 (the dialog what i wan't to show) to a child process, i turn off title bar and the tool windows. But it not show at all this way.

Any idea?
Post 15 Aug 2004, 11:57
View user's profile Send private message Reply with quote
siddhartha



Joined: 01 Jun 2004
Posts: 7
siddhartha 16 Aug 2004, 01:47
Can you please post the source code if there is no problem for you. It's hard to work only with imagination Smile



/siddhartha
Post 16 Aug 2004, 01:47
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.