Jump to content
  • Advertisement


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



This topic is 5533 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I`m 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). I`m 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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!