Hi,
there's a way to declare following TBBUTTON struct to prevent error #2069: Initializer must be constant. ?
static CONST CHAR *szToolbar[] =
{ "New", "Select", "Previous", "Next", "Save", "Delete", "Close", "Print" };
static CONST TBBUTTON tbButton[TOOLBAR_BUTTON] =
{
{ NEW, IDM_NEW, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[NEW] },
{ SELECT, IDM_SELECT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[SELECT] },
{ PREVIOUS, IDM_PREVIOUS, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[PREVIOUS] },
{ NEXT, IDM_NEXT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[NEXT] },
{ SAVES, IDM_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[SAVES] },
{ DELETES, IDM_DELETE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[DELETES] },
{ CLOSE, IDM_CLOSE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[CLOSE] },
{ PRINT, IDM_PRINT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, (INT)szToolbar[PRINT] },
};
Thanks.