Author Topic: New bitmap button example  (Read 885 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9726
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
New bitmap button example
« on: August 24, 2021, 02:21:14 AM »
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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: