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
Returns whether GDI+ support is available.
C
void WINAPI SftTree_GetGDIPlusAvailable(HWND hwndCtl); void WINAPI SftTreeSplit_GetGDIPlusAvailable(HWND hwndCtl);
C++
BOOL CSftTree::GetGDIPlusAvailable() const; BOOL CSftTreeSplit::GetGDIPlusAvailable() const;
hwndCtl
The window handle of the tree control.
GetGDIPlusAvailable returns TRUE if GDI+ is available on the current system, otherwise FALSE is returned.
The GetGDIPlusAvailable function returns whether GDI+ support is available.
In order to use GDI+ images (see Sft_SetPictureGDIPlusImage), GDI+ support must be available. For information about distributing GDI+ with your application, please see "Distributing the Dlls".
// Sft_SetPictureBitmap(&Pic, a_bitmap_handle); // SftTree_SetItemLabelPicture(g_hwndTree, index, &Pic);/* Set a label picture */ /* Register the item pictures. These pictures are used */ /* for all items in the tree control. All three pictures */ /* must be the same size. */ Sft_InitPicture(&m_aThreeItemPictures[0]); Sft_InitPicture(&m_aThreeItemPictures[1]); Sft_InitPicture(&m_aThreeItemPictures[2]); if (SftTree_GetGDIPlusAvailable(g_hwndTree)) { // In this example, we are using GDI+ images. // Even though this is a C application, we can embed the images as resources // and use SftTree's SftTree_LoadGDIPlusImageFromResource function to load them // from a resource. // GDI+ images CANNOT be added as BITMAP resources. They are always added with // a custom resource type, in this example we use "PNG". m_FolderClosed = SftTree_LoadGDIPlusImageFromResource(g_hInst, TEXT("PNG"), MAKEINTRESOURCE(IDR_FOLDERCLOSED));
/* Register the item pictures. These pictures are used */ /* for all items in the tree control. All three pictures */ /* must be the same size. */ SFT_PICTURE aPic[3]; Sft_InitPicture(&aPic[0]); Sft_InitPicture(&aPic[1]); Sft_InitPicture(&aPic[2]); if (m_Tree.GetGDIPlusAvailable()) { // In this example, we are using GDI+ images. // GDI+ images CANNOT be added as BITMAP resources. They are always added with // a custom resource type, in this example we use "PNG". m_FolderClosed = (Gdiplus::Image*)SftTree_LoadGDIPlusImageFromResource(AfxGetApp()->m_hInstance, _T("PNG"), MAKEINTRESOURCE(IDR_FOLDERCLOSED)); m_FolderOpen = (Gdiplus::Image*)SftTree_LoadGDIPlusImageFromResource(AfxGetApp()->m_hInstance, _T("PNG"), MAKEINTRESOURCE(IDR_FOLDEROPEN)); m_FolderLeaf = (Gdiplus::Image*)SftTree_LoadGDIPlusImageFromResource(AfxGetApp()->m_hInstance, _T("PNG"), MAKEINTRESOURCE(IDR_FOLDERLEAF)); Sft_SetPictureGDIPlusImage(&aPic[0], m_FolderClosed);
See Also C/C++ API | Categories | Notifications