Author Topic: Dialog Box With Image Background  (Read 1168 times)

0 Members and 2 Guests are viewing this topic.

Charles Pegge

  • Guest
Dialog Box With Image Background
« on: January 25, 2019, 06:14:11 PM »
Demonstrating how to decorate dialog boxes with a background image. This example is based on Roland's translucent.o2bas

The technique is to load an image to the dialog's client area in response to a WM_ERASEBKGND message


Code: [Select]
    case WM_ERASEBKGND

      RECT r
      GetClientRect hDlg,r
      GetImage( hDlg,r,"../images/mud.jpg" )
      InvalidateRect( hDlg,@r,0 )
      return 1


This example will be included in Examples/WinDynDialogs
« Last Edit: January 26, 2019, 02:29:11 PM by Charles Pegge »