Start with the project you created in Low-Level DigitalPaint: Initializing and Freeing a Paint Handle. This tutorial will let you add code to set DigitalPaint information such as transformation, device context, bitmap canvas and restriction palette information.
static PAINTXFORM PntXForm ;
RECT rcDCRect ;
hPalette = L_CreatePaintPalette( hDC, &hBitmap ) ;
L_PntSetMetrics ( pPaint, hDC, &hBitmap, hPalette ) ;
DeleteObject(hPalette);
HDC hDC;
HPALETTE hPalette;
// set the toolkit transformations.
PntXForm.nZoom = nZoomFactor ;
PntXForm.nXOffset = - rcView.left ;
PntXForm.nYOffset = - rcView.top ;
L_PntSetTransformation ( pPaint, &PntXForm ) ;
// set the device context boundaries
SetRect ( &rcDCRect, 0, 0, LOWORD ( lParam ), HIWORD ( lParam ) ) ;
L_PntSetDCExtents ( pPaint, &rcDCRect ) ;
// set the toolkit transformations.
PntXForm.nZoom = nZoomFactor ;
PntXForm.nXOffset = - rcView.left ;
PntXForm.nYOffset = - rcView.top ;
L_PntSetTransformation ( pPaint, &PntXForm ) ;
// set the toolkit transformations.
PntXForm.nZoom = nZoomFactor ;
PntXForm.nXOffset = - rcView.left ;
PntXForm.nYOffset = - rcView.top ;
L_PntSetTransformation ( pPaint, &PntXForm ) ;