Hi all...
I can not load an external bmp to be associated with a toolbar buttons
I tried to do so, it does not work:
[code]
TBBUTTONINFO tbInfo;
TBADDBITMAP tbab;
HBITMAP hBmp;
hBmp = LoadImage(NULL, "Path BMP", IMAGE_BITMAP, 16, 16, LR_LOADFROMFILE | LR_SHARED);
tbab.hInst = BCX_hInstance;
tbab.nID = (UINT_PTR)hBmp;
tbInfo.cbSize = sizeof(TBBUTTONINFO);
tbInfo.dwMask = TBIF_TEXT | TBIF_COMMAND | TBIF_IMAGE;
tbInfo.pszText = "Btn1";
tbInfo.idCommand = 1;
tbInfo.iImage = SendMessage (hwndtb, TB_ADDBITMAP, 1, (LPARAM)&tbab);
SendMessage(hwndtb, TB_SETBUTTONINFO, (WPARAM)indice, (LPARAM)&tbInfo);
}
[/code]
Thanks.
Comments