News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

New bitmap button example

Started by hutch--, August 24, 2021, 02:21:14 AM

Previous topic - Next topic

hutch--

I have wanted to do this one for a while, a bitmap button using the BS_BITMAP style so that you only need to feed it 2 bitmaps for the up and down images and in a fully self contained form. It is used in this form,

    invoke iButton,50,50,b1up,b1dn,hInstance,hWin,100
  ; ----------------------------------------------------
  ; tx          button top X coordinate
  ; ty          button top Y coordinate
  ; pBmp1       the UP button image
  ; pBmp2       the DOWN button image
  ; instance    the instance handle
  ; hparent     the parent window handle
  ; cID         the control ID for WM_COMMAND processing
  ; ----------------------------------------------------

I already have the module in the 64 bit library but for this example to run, it has a single lib file that contains the module. You have to do your own artwork and the two button images must be the same size. The win with this style of interface component is you can make it look like anything you want and you are no longer limited to the default Windows button.