flat assembler
Message board for the users of flat assembler.

Index > Windows > Buttons with bitmaps

Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 16 Apr 2006, 22:23
I know how to create buttons with bitmaps, but how to create them with both bitmap and text?
Please post some really simple source code.

Thanks!
Post 16 Apr 2006, 22:23
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 17 Apr 2006, 07:45
is a button ownerdraw? if so, then catch WM_DRAWITEM in lParam you will get DRAWITEMSTRUCT, in this structure you can found hdc, then use DrawText

ps. i am still working on my cool-buttons based on gif, bmp and without picture (current stage is porting it from c to asm - very booooring)
Post 17 Apr 2006, 07:45
View user's profile Send private message Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 17 Apr 2006, 15:37
Not an ownerdraw button, just a normal button with both bitmap and text.
Also, how to use bitmaps as buttons? I just draw them and use SetWindowLong to subclass and handle WM_LBUTTONDOWN messages?

Thanks
Post 17 Apr 2006, 15:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.