• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

## Recommended Posts

Im trying to add bitmap to a button in toolbar. I have this piece of code: TBADDBITMAP bitmap; HBITMAP hBmp; hBmp = LoadBitmap (hInst, MAKEINTRESOURCE (IDB_TOP)); bitmap.hInst = NULL; //predam rovnou handle bitmap.nID = (unsigned)hBmp; //handle bitmapy SendMessage (hTool, TB_ADDBITMAP, BUTTONS, (LPARAM)&bitmap); //cleanup... MSDN says, that if I pass NULL into the hInst member of TBADDBITMAP structure, then the nID member should contain valid bitmap handle. It contains (handle is OK - I tryied BitBlt into my client area and it is OK). But that what is displayed on the button is not looking even like my bitmap! (I tryied many formats of bitmap...). At LEAST it has bad size. (and also, as I said, it is some SHIT, no what I had drawn). Im getting little crazy about this - I`ve searched the MSDN, but it looks like it is correct - but as I can see - it is NOT. Does anyone see any mistake here? Oxygenium

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627689
• Total Posts
2978648

• 13
• 14
• 12
• 10
• 12