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 GetBitmapSize function retrieves the display and print size of a device dependent bitmap.
C
BOOL CALLBACK SftPrintPreview_GetBitmapSize( HBITMAP hBitmap, HDC hDCPrinter, int* wPrinter, int* hPrinter, int* wScreen, int* hScreen);
C++
static BOOL CSftPrintPreview::GetBitmapSize( HBITMAP hBitmap, HDC hDCPrinter, int* wPrinter, int* hPrinter, int* wScreen, int* hScreen);
hBitmap
The bitmap handle of the bitmap, for which the dimensions are returned.
hDCPrinter
The printer device context.
wPrinter
A pointer where the printed width of the bitmap (in pixels) is returned.
hPrinter
A pointer where the printed height of the bitmap (in pixels) is returned.
wScreen
A pointer where the screen width of the bitmap (in pixels) is returned.
hScreen
A pointer where the screen height of the bitmap (in pixels) is returned.
The return value is TRUE if successful, FALSE otherwise.
The GetBitmapSize function retrieves the display and print size of a device dependent bitmap.
Device dependent bitmaps (screen bitmaps) can be printed using the PrintBitmap function. Screen bitmaps cannot usually not 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.
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