Bitmaps on buttons

This forum is for eXpress++ general support.
Message
Author
User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: Bitmaps on buttons

#11 Post by Auge_Ohr »

look into c:\exp19\Source\Dclipx\_dcxbutt.prg

Code: Select all

  bCaption   := ::captionArray[i,1]
  nFGColor   := IIF(Valtype(::color)=='B',::fgColor,::captionArray[i,2])
  nStartRow  := ::captionArray[i,3]
  nStartCol  := ::captionArray[i,4]
  nEndRow    := ::captionArray[i,5]
  nEndCol    := ::captionArray[i,6]
  nAlign     := ::captionArray[i,7]
  cFont      := ::captionArray[i,8]
  cCaption   := ::captionArray[i,9]
  oFont      := ::captionArray[i,10]
...

  ELSEIF Valtype( cCaption ) == 'O' .AND. (cCaption:isDerivedFrom('XbpBitMap') .OR. cCaption:isDerivedFrom('XbpIcon'))

    oBitmap := cCaption
    aSource := {0,0,oBitmap:xSize,oBitmap:ySize}

    aTarget := { nStartCol, nStartRow, nEndCol, nEndRow }  // this is Pos - Size of Image

    IF oBitmap:isDerivedFrom('XbpIcon')
      oBitmap:draw( oPS, aTarget )
    ELSE
      oBitmap:draw( oPS, aTarget, aSource, ;
          IIF(lDisabled .AND. ::disabledBmp,GRA_BLT_ROP_PATCOPY,nil), GRA_BLT_BBO_IGNORE )   // abo service
    ENDIF
  ENDIF
greetings by OHR
Jimmy

Post Reply