Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TextBox Color.
#1
How to put/change color in TextBox or ComboBox Background using macro?
#2
Dialog background color
#3
but how to put color only in specific item? mean not all of textbox/combo
thanks alot.
#4
Function Dialog357
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54030080 0x200 8 10 96 14 ""
;4 Edit 0x54030080 0x200 8 32 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,GdiObject-- brush1=CreateSolidBrush(ColorFromRGB(240 240 100))
,GdiObject-- brush2=CreateSolidBrush(ColorFromRGB(128 128 255))
,
,case WM_CTLCOLOREDIT
,;wParam is handle to the device context of the control
,;lParam is control handle
,sel(GetWinId(lParam))
,,case 3
,,SetBkMode wParam TRANSPARENT
,,SetTextColor wParam ColorFromRGB(0 0 255)
,,ret brush1
,,case 4
,,SetBkMode wParam TRANSPARENT
,,SetTextColor wParam ColorFromRGB(255 0 0)
,,ret brush2
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Macro that shows the dialog
Code:
Copy      Help
str controls = "3 4"
str e3 e4
e3="text"
e4=e3
if(!ShowDialog("Dialog357" &Dialog357 &controls)) ret
#5
Yes.!! this one that I need.. Thank you Sir, u r the best.!


Forum Jump:


Users browsing this thread: 1 Guest(s)