;Autor: RASHAD ;http://www.purebasic.fr/english/viewtopic.php?p=469113#p469113 EnableExplicit LoadFont(0, "Arial", 10) LoadFont(1, "Arial", 14, #PB_Font_Bold) LoadFont(2, "Arial", 10, #PB_Font_Underline) Procedure WindowCB(hWnd,uMsg,wParam,lParam) Protected Result Protected SIZE.SIZE Protected x Result = #PB_ProcessPureBasicEvents Select uMsg Case #WM_CTLCOLORSTATIC Select lParam Case GadgetID(1) SetBkMode_(wParam,#TRANSPARENT) SelectObject_(wParam,FontID(0)) SetTextColor_(wParam,$0000FF) TextOut_(wParam,0,4,@"Text",4) GetTextExtentPoint32_(wParam,@"Text",4,SIZE) x = SIZE\cx + 4 SelectObject_(wParam,FontID(1)) SetTextColor_(wParam,$FF0000) TextOut_(wParam,x,0,@"Bold",4) GetTextExtentPoint32_(wParam,@"Bold",4,SIZE) x = x + SIZE\cx + 4 SelectObject_(wParam,FontID(2)) SetTextColor_(wParam,$00FF00) TextOut_(wParam,x,4,@"UnderLine",9) ProcedureReturn GetStockObject_(#HOLLOW_BRUSH) EndSelect EndSelect ProcedureReturn Result EndProcedure If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) TextGadget(1, 10, 10, 200, 40, "", 0) InvalidateRect_(WindowID(0), 0, 1) SetWindowCallback(@WindowCB()) Repeat Select WaitWindowEvent() Case #PB_Event_CloseWindow End EndSelect ForEver EndIf ; IDE Options = PureBasic 5.31 (Windows - x64) ; CursorPosition = 2 ; Folding = - ; EnableUnicode ; EnableXP ; EnableUser ; EnableCompileCount = 0 ; EnableBuildCount = 0