hi all,

more than one time i find differences in structures members, from one to another include files.

Now i'm asking, what of the following structs is the correct to ise for toolbars creation ?





STRUC TBBUTTON
iBitmap dd ?
idCommand dd ?
fsState db ?
fsStyle db ?
dwData dd ?
iString dd ?
ENDS

or

STRUC TBBUTTON
iBitmap dd ?
idCommand dd ?
fsState db ?
fsStyle db ?;
_wPad1 dw ?
dwData dd ?
iString dd ?
ENDS



many thx.. B7

Just fixed a typo so the formatting worked.
Posted on 2002-02-07 06:40:06 by Bit7
Bit7,

From memory the larger one is for a later windows version.

Regards,

hutch@movsd.com
Posted on 2002-02-07 07:03:14 by hutch--
Can you even define structs like that in MASM?? I thought the "struct" must be at the end of the line:

TBUTTON STRUC
...
...
TBUTTON ENDS


NaN
Posted on 2002-02-07 08:39:01 by NaN
I think he's using TASM...
Posted on 2002-02-07 08:59:37 by JCP
right, i'm using Tasm IDEAL mode.

The real problem is that I discover that this function is responsible to paralize the PC only in W95/98. In NT everything works fine:



proc CreateTBar uses ebx esi edi, hWnd:DWORD, hTbar:DWORD

call CreateToolbarEx, [hWnd], \
WS_CHILD or WS_BORDER or WS_VISIBLE or TBSTYLE_TOOLTIPS or \
CCS_ADJUSTABLE, IDB_TOOLBAR01, TB01_NR_OFBMP, [hInstance], \
IDB_BMP_TBUTT01, offset tb, TB01_NR_OFBUT, \
16, 16, 16, 16, size TBBUTTON
mov [hTbar],eax

ret

endp CreateTBar



I've checked, after the call the stack pointer come back to the correct position.

First thing i tought was about the TBBUTTON structure, if i'm using the right one....

But it 's very strange... the function completely block the PC. I have to shut-down by power key.

I've check meny times parameters, eveything seems correct...

I'm calling CreateToolbarEx in a sub procedure... The PC is paralizing come after returning from this procedure....

If some help... THX B7
Posted on 2002-02-07 13:36:13 by Bit7
SOLVED !

as my sentence at the bottom of the page says.....

after 212 posts and many application coded i remain stupid.


:stupid:


I was doing




call CreateToolbarProc, param

but

proc CreateToolbarProc uses ebx esi edi, PARAM1:DWORD, PARAM2:DWORD

call CreateToolbarEx ,...

ret

endp CreateToolbarProc



so i was calling proc with jus 1 param and the function need 2.
Posted on 2002-02-07 13:52:55 by Bit7