1/17/2024 0 Comments Purebasic new gadget color![]() HyperLinkGadget(#HyperLink, 160, 152, 160, 16, "Url Disabled > Blurred Text!", #Blue) SetWindowTheme_(GadgetID(#Checkbox_Disable), "", "") DrawIconEx_(*lvCD\nmcd\hDC, subItemRect\left + 5, (subItemRect\top + subItemRect\bottom - GetSystemMetrics_(#SM_CYSMICON)) / 2, hIcon, 16, 16, 0, 0, #DI_NORMAL) FillRect_(*lvCD\nmcd\hDC, *lvCD\nmcd\rc, hBrush) If GadgetType(Gadget) = #PB_GadgetType_ListIcon Or GadgetType(Gadget) = #PB_GadgetType_ExplorerList Gadget = GetDlgCtrlID_(*lvCD\nmcd\hdr\hWndFrom) If IsWindowEnabled_(*lvCD\nmcd\hdr\hWndFrom) = #False My Attempt to Color the ListIconGadget and ExplorerListGadget When Disabled. SetWindowLongPtr_(GadgetID(#ExplorerList), #GWLP_WNDPROC, WaitWindowEvent()ĭisableGadget(#ExplorerList, GetGadgetState(#Checkbox_Disable))ĭisableGadget(#Checkbox, GetGadgetState(#Checkbox_Disable)) SetWindowTheme_(GadgetID(#CheckBox), = GetWindowLongPtr_(GadgetID(#ExplorerList), #GWLP_WNDPROC) SetWindowTheme_(GadgetID(#Checkbox_Disable), 160, 152, 160, 16, "Disabled > Blurred Text!") SetWindowTheme_(GadgetID(#ExplorerList), "Explorer", 0)ĬheckBoxGadget(#Checkbox_Disable, 20, 150, 110, 20, "Disable Gadget") SetWindowTheme_(GadgetID(#ExplorerList), "DarkMode_Explorer", 0) SetGadgetColor(#ExplorerList, #PB_Gadget_BackColor, BackColor) SetGadgetColor(#ExplorerList, #PB_Gadget_FrontColor, #White) If OpenWindow(#Window, X, Y, Width, Height, "Draw Disable Gadget Color", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)ĮxplorerListGadget(#ExplorerList, 20, 20, 300, 120, "") Procedure Open_Window_0(X = 0, Y = 0, Width = 340, Height = 180) ![]() Debug "How to draw transparent icons for ExplorerList items?" If GadgetType(Gadget) = #PB_GadgetType_ListIcon Or GadgetType(Gadget) = #PB_GadgetType_ExplorerListįillRect_(*lvCD\nmcd\hDC, *lvCD\nmcd\rc, hBrush) Debug "How to avoid the CheckBox blurred text ?" Protected Result = #PB_ProcessPureBasicEvents Procedure WinCallback(hWnd, uMsg, wParam, lParam) ![]() If *pnmCDraw\rc\right > *pnmCDraw\rc\leftĭrawText_(*pnmCDraw\hdc, Len(Text), *pnmCDraw\rc, #DT_CENTER | #DT_VCENTER| #DT_SINGLELINE | #DT_END_ELLIPSIS) *pnmCDraw\rc\bottom - 1 : *pnmCDraw\rc\right - 1įillRect_(*pnmCDraw\hdc, *pnmCDraw\rc, hBrushTitle) *pnmCDraw\rc\left + 1 : *pnmCDraw\rc\top + 1ĭrawFrameControl_(*pnmCDraw\hdc, *pnmCDraw\rc, #DFC_BUTTON, #DFCS_BUTTONPUSH) Text = GetGadgetItemText(Gadget, -1, *pnmCDraw\dwItemSpec)ĭrawFrameControl_(*pnmCDraw\hdc, *pnmCDraw\rc, #DFC_BUTTON, #DFCS_BUTTONPUSH | #DFCS_PUSHED) Select *pnmCDraw\dwDrawStage Determine drawing stage If *pnmHDR\code = #NM_CUSTOMDRAW Get handle to ListIcon header control Protected Gadget = GetDlgCtrlID_(hWnd), Text.s, *pnmHDR.NMHDR, *pnmCDraw.NMCUSTOMDRAW Protected Result = CallWindowProc_(OldListIconProc, hWnd, uMsg, wParam, lParam) Procedure ListIconProc(hWnd, uMsg, wParam, lParam) Other 3D environments such as the Irrlicht Engine are unofficially supported.Global hBrush = CreateSolidBrush_(BackColor), hBrushTitle = CreateSolidBrush_($323232) PureBasic supports and has integrated the OGRE 3D Environment. PureBasic supports inline assembly, allowing the developer to include FASM assembler commands within PureBasic source code, while using the variables declared in PureBasic source code, enabling experienced programmers to improve the speed of speed-critical sections of code. ![]() Programs developed without using the platform-specific application programming interfaces (APIs) can be built easily from the same source file with little or no modification. ![]() PureBasic compiles directly to IA-32, x86-64, PowerPC or 680x0 instruction sets, generating small standalone executables and DLLs which need no runtime libraries beyond the standard system libraries. As cited on the website, the first PureBasic user (who registered in 1998) still has free access to new updates and this is not going to change. PureBasic has a "lifetime license model". Windows, Linux, macOS, Raspberry Pi OS, AmigaOS ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |