//------------------------------------------------------------------- HWND InitToolBar (HWND hwndParent, HINSTANCE hInst ) { int iNumButtons ; LPTBBUTTON ptbb ; instbak=hInst; ptbb = &tbb[21] ; iNumButtons = 15 ; hwndTB = CreateToolbarEx (hwndParent, dwToolBarStyles, 1, 15, hInst, IDB_TOOLBAR, ptbb, iNumButtons, 0, 0, 0, 0, sizeof (TBBUTTON)) ; // If requested, add to string list if (bStrings) ToolBar_AddString (hwndTB, 0, szTbStrings) ; // Store handle to tooltip control hwndToolTip = ToolBar_GetToolTips (hwndTB) ; // Set flat style to toolbar SetWindowLong(hwndTB, GWL_STYLE, GetWindowLong(hwndTB, GWL_STYLE) | TBSTYLE_FLAT); return hwndTB ; }
//------------------------------------------------------------------- HWND InitToolBar (HWND hwndParent, HINSTANCE hInst ) { int iNumButtons ; LPTBBUTTON ptbb ; //UINT uiBitmap; instbak=hInst; ptbb = &tbb[21] ; iNumButtons = 15 ; /* if (bLargeIcons) uiBitmap=IDB_STD_LARGE_COLOR; else uiBitmap=IDB_STD_SMALL_COLOR; hwndTB = CreateToolbarEx (hwndParent, dwToolBarStyles, 1, 15, HINST_COMMCTRL, uiBitmap, ptbb, iNumButtons, 0, 0, 0, 0, sizeof (TBBUTTON)) ; */ hwndTB = CreateToolbarEx (hwndParent, dwToolBarStyles, 1, 15, hInst, IDB_TOOLBAR, ptbb, iNumButtons, 0, 0, 0, 0, sizeof (TBBUTTON)) ; // If requested, add to string list if (bStrings) ToolBar_AddString (hwndTB, 0, szTbStrings) ; // Store handle to tooltip control hwndToolTip = ToolBar_GetToolTips (hwndTB) ; // Set flat style to toolbar SetWindowLong(hwndTB, GWL_STYLE, GetWindowLong(hwndTB, GWL_STYLE) | TBSTYLE_FLAT); return hwndTB ; }