News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Subclass button, icon + text in button

Started by starzboy, May 14, 2009, 12:20:19 PM

Previous topic - Next topic

starzboy

I wish to subclass buttons such that they show an icon and text.
Is there an example available ?

ToutEnMasm


A button with BS_OWNERDRAW style will be enough.
Samples here http://asmedit.massmind.org/

BATSoftware

BS_OWNERDRAW will partially work - it has ONE significant drawback - no BS_DEFPUSHBUTTON. If 100% push-button support is required the alternative is: BS_BITMAP.
Create a memory bitmap, draw icon/bitmap image then draw text to memory bitmap. Use BM_SETIMAGE to place bitmap on button. Though the amount of coding is significantly more (approx 200 lines of code), the result is quite effective. This method will allow the programmer to draw anything on the button, UNICODE text, shapes, multiple colors - basically, if one can draw it to a bitmap, you can place it on the button.

PBrennick

Years ago, Ewayne Wagner wrote the attached utility that will generate code to create buttons using almost anything you can think of. It is a pretty kewl utility and I have never seen anything like it.

Paul


[attachment deleted by admin]
The GeneSys Project is available from:
The Repository or My crappy website

UtillMasm

oh my fo! Masm32v1:
include  L:\MASM32V1\PROGRAMS\AsmEdit\include\Windows.inc
include  L:\MASM32V1\PROGRAMS\AsmEdit\include\DSPMACRO.asm

:red

PBrennick

Is it too hard for you to change that to masm32 or GeneSys? Come on. He always carried all versions of masm32 and so that was his solution.

Paul
The GeneSys Project is available from:
The Repository or My crappy website