![]() IDM_NEW, IDM_OPEN, and IDM_SAVE are application-defined command constants. SendMessage(hWndToolbar, TB_SETIMAGELIST, Select commands you wish to add from the column on the left and click the Add > button to move them to the Quick Access Toolbar. ILC_COLOR16 | ILC_MASK, // Ensures transparent background. In Office 2007, make sure the drop-down menu under 'Customize Quick Access Toolbar:' is set to For all documents (default). G_hImageList = ImageList_Create(bitmapSize, bitmapSize, // Dimensions of individual bitmaps. HWND hWndToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, Declare and initialize local constants.Ĭonst DWORD buttonStyles = BTNS_AUTOSIZE HWND CreateSimpleToolbar(HWND hWndParent) The following example code creates the toolbar shown in the illustration, using standard system icons. You must send the TB_AUTOSIZE message after all the items and strings have been inserted into the control, to cause the toolbar to recalculate its size based on its content. Add buttons to the toolbar by using the TB_ADDBUTTONS or TB_INSERTBUTTON message. ![]() The resulting toolbar initially contains no buttons. ![]() To create a toolbar, use the CreateWindowEx function, specifying the TOOLBARCLASSNAME window class.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |