I want to create toolbar with 16bit color bitmap bar, I use toolbar MACRO in MASM32 toolkit, but I can't get the result I want, and I don't know how the backgrond color of bmp bar affect the outlook of toolbar?
the real style of toolbar, the above toolbar bmp was exacted from shell32.dll resource of winxp, test only!
This thead might contain some useful info:
http://www.asmcommunity.net/board/index.php?topic=183
Thomas
http://www.asmcommunity.net/board/index.php?topic=183
Thomas
Here's some code as well, straight from my PNGview program (see my website), in plain C.
tempBmp = LoadInternalPNG(hWnd, IDR_TOOLBAR);
hToolImageList =
ImageList_Create(24,24,ILC_COLOR32|ILC_MASK,TOOLBAR_IMAGES,0);
ImageList_AddMasked(hToolImageList, tempBmp, RGB(255,0,255));
DeleteObject(tempBmp);
hToolbar = CreateWindowEx(NULL,
TOOLBARCLASSNAME, NULL,
TBSTYLE_FLAT|WS_CHILD|WS_VISIBLE|
WS_CLIPSIBLINGS|WS_CLIPCHILDREN,
0,0,100,14,hWnd,(HMENU)ID_TOOLBAR,hInstance,0);
SendMessage(hToolbar,TB_BUTTONSTRUCTSIZE,sizeof(TBBUTTON),0);
SendMessage(hToolbar,TB_SETBITMAPSIZE,0,MAKELONG(24,24));
SendMessage(hToolbar,TB_SETIMAGELIST,0,(LPARAM)hToolImageList);
SendMessage(hToolbar,TB_ADDBUTTONS,TOOLBAR_BUTTONS,(LPARAM)tbarButtons);
SendMessage(hToolbar,TB_AUTOSIZE,0,0);