Announcement

Collapse
No announcement yet.

BitBlt problem...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BitBlt problem...

    Forget it...found stupid bug seconds after having posted this

    Peter


    [This message has been edited by Peter P Stephensen (edited October 30, 2000).]
    [email protected]
    www.dreammodel.dk

  • #2
    Peter,

    This is in MASM but it should make sense, the only real trick is to get
    the SelectObject() calls right and reselect the old object when finished.

    Regards,

    [email protected]

    Code:
      ; #########################################################################
      
      Paint_Proc proc hWin :DWORD, hDC :DWORD
      
          LOCAL hOld :DWORD
          LOCAL memDC  :DWORD
      
          invoke CreateCompatibleDC,hDC
          mov memDC, eax
          
          invoke SelectObject,memDC,hBmp
          mov hOld, eax
      
          invoke BitBlt,hDC,10,10,166,68,memDC,0,0,SRCCOPY
      
          invoke SelectObject,hDC,hOld
          invoke DeleteDC,memDC
      
          return 0
      
      Paint_Proc endp
      
      ; ########################################################################
    ------------------


    [This message has been edited by Steve Hutchesson (edited October 30, 2000).]
    hutch at movsd dot com
    The MASM Forum - SLL Modules and PB Libraries

    http://www.masm32.com/board/index.php?board=69.0

    Comment


    • #3
      Steve--

      Thanks anyway!

      Peter

      ------------------
      [email protected]
      www.dreammodel.dk

      Comment

      Working...
      X