S
Also ich habe doch noch ein Problem. Ich beziehe mich jetzt auf das Faq.
Ich kann jetzt ein Button hinzufügen aber nicht mehr.
bit.hInst = HINST_COMMCTRL;
bit.nID = IDB_STD_SMALL_COLOR;
SendMessage(hwndToolbar, TB_ADDBITMAP, 0, (LPARAM)&bit);
bit.hInst = NULL;
bit.nID = (UINT_PTR)LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDB_PROGGEN),
IMAGE_BITMAP,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
LR_DEFAULTCOLOR | LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
mypictures[9].iBitmap = SendMessage(hwndToolbar,TB_ADDBITMAP,0,(LPARAM)&bit);
bit.hInst = NULL;
bit.nID = (UINT_PTR)LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDB_KOMPILE),
IMAGE_BITMAP,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
LR_DEFAULTCOLOR | LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
mypictures[10].iBitmap = SendMessage(hwndToolbar,TB_ADDBITMAP,0,(LPARAM)&bit);
bit.hInst = NULL;
bit.nID = (UINT_PTR)LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDB_INSERT),
IMAGE_BITMAP,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
LR_DEFAULTCOLOR | LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
mypictures[11].iBitmap = SendMessage(hwndToolbar,TB_ADDBITMAP,0,(LPARAM)&bit);
SendMessage (hwndToolbar, TB_ADDBUTTONS, (WPARAM)sizeof(mypictures)/sizeof(mypictures[0]), (LPARAM)(TBBUTTON*)&mypictures);
So hab ich's versucht aber wie gesagt wird nur das erste angezeigt.
Irgendwie wenn ich hier
TBBUTTON mypictures[] =
{
{STD_FILENEW , ID_TOLLBAR_NEW, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{STD_FILEOPEN, ID_TOOLBAR_OPEN, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{STD_FILESAVE, ID_TOOLBAR_SAVE, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0},
{STD_UNDO, ID_TOOLBAR_UNDO, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{STD_REDOW, ID_TOOLBAR_REDOW, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0},
{STD_FIND, ID_TOOLBAR_FIND, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{STD_HELP, ID_TOOLBAR_HELP, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0},
{0, 0, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{0, 0, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0},
{0, 0, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE | TBSTYLE_BUTTON, 0, 0}
};
Halt hinten noch son Seperator reinmach wird nur ein halber angezeigt und wenn ich 2 reinmach wird garnichts mehr angezeigt.
Hoffe ihr wisst was.
MfG schirrmie