Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Draw on a control
#7
Example with 3 splitters. Vertical transparent, horizontal yellow, vertical with arrows and icon.
Function Dialog137
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4 7"
str lb3 e4 e7
if(!ShowDialog("Dialog137" &Dialog137 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 ListBox 0x54230101 0x200 4 4 96 62 ""
;4 Edit 0x54231044 0x200 106 4 114 62 ""
;7 Edit 0x54231044 0x200 4 74 96 48 ""
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;5 QM_Splitter 0x54000000 0x0 100 4 6 62 ""
;6 QM_Splitter 0x54030000 0x0 4 66 216 8 ""
;8 QM_Splitter 0x54030000 0x0 100 74 8 48 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "*" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,DT_SetBackgroundColor(hDlg 0 0xB48246) ;;blue 70 130 180
,__GdiHandle-- hBrush=CreateSolidBrush(0xffff)
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_CTLCOLORSTATIC ;;probably from a splitter
,sel GetDlgCtrlID(lParam)
,,;case 5 ;;do nothing, it's transparent by default
,,case 6 ret hBrush ;;horz splitter
,,case 8 ;;draw something, if you have function draw_on_splitter_proc from "Draw on control" examples
#ifdef draw_on_splitter_proc
,,RECT ru; GetClientRect lParam &ru
,,draw_on_splitter_proc lParam wParam ru 0
#endif
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)