im able to put a combobox on a toolbar. the problem is my toolbar wont always have the same amount of buttons on it. so i need to get the total amount of buttons on the toolbar, multiply that amount by 16 (because thats the width of each of my buttons) and add 5 (just to make a little space between my comboxbox and the buttons) to that amount. this total will give me the location of where i need my combobox to start at on the toolbar. here is the code i was working with but it isnt working.
invoke SendMessage,hToolBar,TB_BUTTONCOUNT,0,0 ;get button count
shl eax, 8 ;multiply count by 16 to get length of buttons
add eax, 5 ;add 5 to the length to make a little space
mov len, eax ;mov the total into a variable to preserve
invoke CreateWindowEx, 0,
WS_CHILD + WS_VISIBLE,
To multiply by 16 use shl eax, 4
Also, you should not need the addr len. Just use len.