"i did use the search function if you are wandering" :grin:

I am tryin to make the 2 toolbars have a line drawn between them and i have tried RBBS_CHILDEDGE, and may
other combinations yet with "or" operations there can not really be many combinations. Anyway i still get a solid
rebar control.

Any suggestions?!! Please.

Black iCE

Ps. Nan, i like the FileMan v2 i got from your previous post to mike. Gonna use it for *some* of the api calls i need in my app. (got a nice and fast browsing... similar to what i want). Oh, no cut and past 4 me. gotto understand by coding and lookin up the errors/documenation.
Posted on 2004-04-22 21:22:11 by Black iCE
here is the code consirned with the above item.



WinMainGUI proc hWndOwner:HWND

LOCAL iccex:INITCOMMONCONTROLSEX
LOCAL rbi:REBARINFO
LOCAL rbbi:REBARBANDINFO
LOCAL tbb:TBBUTTON
LOCAL cCounter:BYTE

mov iccex.dwSize,SIZEOF INITCOMMONCONTROLSEX
mov iccex.dwICC,ICC_COOL_CLASSES or ICC_BAR_CLASSES
invoke InitCommonControlsEx,ADDR iccex

invoke CreateWindowEx,NULL,ADDR REBARCLASSNAME,NULL,WS_CHILD or WS_VISIBLE or\
WS_BORDER or CCS_TOP or CCS_NODIVIDER or WS_CLIPSIBLINGS or\
WS_CLIPCHILDREN or RBS_VARHEIGHT,
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
hWndOwner,NULL,g_hInstance,NULL
mov g_hWndRebar,eax
mov rbi.cbSize,SIZEOF REBARINFO
mov rbi.himl,0
invoke SendMessage,g_hWndRebar,RB_SETBARINFO,0,ADDR rbi
invoke RtlZeroMemory,ADDR rbbi,SIZEOF REBARBANDINFO
mov rbbi.cbSize,SIZEOF REBARBANDINFO
mov rbbi.fMask,RBBIM_CHILD or RBBIM_STYLE or RBBIM_CHILDSIZE
mov rbbi.fStyle,RBBS_NOGRIPPER or RBBS_VARIABLEHEIGHT or RBBS_USECHEVRON or\
RBBS_CHILDEDGE
invoke CreateWindowEx,NULL,ADDR TOOLBARCLASSNAME,NULL,WS_CHILD or WS_VISIBLE or\
TBSTYLE_TOOLTIPS or TBSTYLE_FLAT or TBSTYLE_LIST,
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
hWndOwner,NULL,g_hInstance,NULL
mov rbbi.hwndChild,eax
mov rbbi.cxMinChild,100
mov rbbi.cyMinChild,25
mov rbbi.cyMaxChild,25
mov rbbi.cyChild,100
mov rbbi.cyIntegral,100
invoke SendMessage,rbbi.hwndChild,TB_BUTTONSTRUCTSIZE,SIZEOF TBBUTTON,0
mov tbb.iBitmap,I_IMAGENONE
mov tbb.idCommand,1000
mov tbb.fsState,TBSTATE_ENABLED
mov tbb.fsStyle,TBSTYLE_AUTOSIZE or TBSTYLE_BUTTON
mov tbb.dwData,0
invoke SendMessage,rbbi.hwndChild,TB_ADDSTRING,NULL,ADDR szToolbar1
mov tbb.iString,eax
mov cCounter,6
.WHILE cCounter!=NULL
invoke SendMessage,rbbi.hwndChild,TB_INSERTBUTTON,-1,ADDR tbb
inc tbb.iString
dec cCounter
.ENDW
invoke SendMessage,g_hWndRebar,RB_INSERTBAND,-1,ADDR rbbi
invoke RtlZeroMemory,ADDR rbbi,SIZEOF REBARBANDINFO
mov rbbi.cbSize,SIZEOF REBARBANDINFO
mov rbbi.fMask,RBBIM_CHILD or RBBIM_STYLE or RBBIM_CHILDSIZE
mov rbbi.fStyle,RBBS_NOGRIPPER or RBBS_VARIABLEHEIGHT or RBBS_USECHEVRON or\
RBBS_CHILDEDGE or RBBS_BREAK
invoke CreateWindowEx,NULL,ADDR TOOLBARCLASSNAME,NULL,WS_CHILD or WS_VISIBLE or\
TBSTYLE_TOOLTIPS or TBSTYLE_FLAT or TBSTYLE_LIST,
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
hWndOwner,NULL,g_hInstance,NULL
mov rbbi.hwndChild,eax
mov rbbi.cxMinChild,100
mov rbbi.cyMinChild,25
mov rbbi.cyMaxChild,25
mov rbbi.cyChild,100
mov rbbi.cyIntegral,100
invoke SendMessage,g_hWndRebar,RB_INSERTBAND,-1,ADDR rbbi
ret
WinMainGUI endp


Hey i am getting better @ this - posting @ least
Posted on 2004-04-22 21:33:52 by Black iCE
While playing around with the source code, i've noticed that both toolbars are drawn over one-an-other. Odd, Rebar Controls are suppose to reposition them.

Even while using Olly, the output for each call looks ok. i'll keep lookin though. It wasn't this difficult last time.

Oh, Btw - Got WinAsm Studio.... So much more relieved
Posted on 2004-04-22 23:31:31 by Black iCE
Got it!!!!! add the line CCS_NOPARENTALIGN to each toolbar as by default they are alighned to the top of the client area.

Posted on 2004-04-22 23:37:51 by Black iCE
Correction, add it to the second toolbar. Because if added to both the drawin of the Rebar Ctrl Goes Real Weird
Posted on 2004-04-22 23:48:14 by Black iCE
Yes i am running a one man thread, so it seems.

Anyway now another problem has crept up and bit me in my ass.
i can't make the file-toolbar small enough without loosing out on the Rebar Ctrl's
custom drawing of the splitter line.

So how would i make it smaller and yet allow the rebar to draw the seperator?
Posted on 2004-04-23 18:31:49 by Black iCE
Got it.

2 individual rebars!!! both with the CCS_NOPARENTALIGN bits on. first Rebar y position is at -4 and then overlapp the second over the end of the first one. Sould have guessed it b4 cause file-menu it gonna have a hook procedure for the mouse tracking and a custom drawing implentation. (ie to complex with other bands where this will not b appicable)
Posted on 2004-04-23 22:22:59 by Black iCE