SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
The PrintBitmap function displays/prints a device dependent bitmap.
C
BOOL CALLBACK SftPrintPreview_PrintBitmap( HBITMAP hBitmap, HDC hDCPrinter, int xPrinter, int yPrinter, int wPrinter, int hPrinter, int widthBitmap, int heightBitmap);
C++
static BOOL CSftPrintPreview::PrintBitmap( HBITMAP hBitmap, HDC hDCPrinter, int xPrinter, int yPrinter, int wPrinter, int hPrinter, int widthBitmap, int heightBitmap);
hBitmap
The bitmap handle of the bitmap to be printed.
hDCPrinter
The printer device context.
xPrinter
The horizontal offset in printer coordinates, where the bitmap is printed.
yPrinter
The vertical offset in printer coordinates, where the bitmap is printed.
wPrinter
The width of the printed bitmap (in printer coordinates).
hPrinter
The height of the printed bitmap (in printer coordinates).
widthBitmap
The width of the bitmap (in pixels, screen coordinates).
heightBitmap
The height of the bitmap (in pixels, screen coordinates).
The return value is TRUE if successful, FALSE otherwise.
The PrintBitmap function displays/prints a device dependent bitmap.
Device dependent bitmaps (screen bitmaps) can be printed using the PrintBitmap function. Screen bitmaps cannot usually be printed using BitBlt. The PrintBitmap function is used to print bitmaps instead. When printing a screen bitmap, the width and height of the bitmap need to be scaled to retain their approximate original dimensions once printed.
The GetBitmapSize function retrieves the display and print size of a device dependent bitmap.
C
// Print a bitmap int wPrinter, hPrinter, w, h; // get bitmap size SftPrintPreview_GetBitmapSize(m_MainBitmap, hDCPrinter, &wPrinter, &hPrinter, &w, &h); // print bitmap, horizontally centered SftPrintPreview_PrintBitmap(m_MainBitmap, hDCOutput, 0, 0, wPrinter, hPrinter, w, h);
C++
// Print a bitmap int wPrinter, hPrinter, w, h; // get bitmap size CSftPrintPreview::GetBitmapSize(m_MainBitmap, hDCPrinter, &wPrinter, &hPrinter, &w, &h); // print bitmap, horizontally centered CSftPrintPreview::PrintBitmap(m_MainBitmap, hDCOutput, 0, 0, wPrinter, hPrinter, w, h);
See Also C/C++ API | C++ Classes | Notifications