Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coloured text with ShowText
#7
I am sorry, I have one more question: Is it possible to set the font of a controls of class "QM_DlgInfo" control ?

Actually, I managed to change the font, but only of non-coloured characters :

Function Dialog159
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 QM_DlgInfo 0x54000004 0x20000 0 0 224 114 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" "3"

str controls = "3"
str qmdi3
qmdi3="<>Word 1<c 255>Word2</c>Word3[]Word 4<c 255>Word5</c>Word6"

if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,,SendMessage(id(3 hDlg), SCI.SCI_STYLESETFONT ,32, "Courier New")
,,SendMessage(id(3 hDlg), SCI.SCI_STYLESETSIZE ,32, 12)
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Finally, this version worked perfectly. However, I am not sure if this is the proper solution :

Function Dialog159
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 QM_DlgInfo 0x54000004 0x20000 0 0 224 114 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" "3"

str controls = "3"
str qmdi3
qmdi3="<>Word 1<c 255>Word2</c>Word3[]Word 4<c 2817792>Word5</c>Word6"

if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,,for _i 0 255
,,,SendMessage(id(3 hDlg), SCI.SCI_STYLESETFONT ,_i, "Courier New")
,,,SendMessage(id(3 hDlg), SCI.SCI_STYLESETSIZE,_i, 12)
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Any advice from you, Gintaras, is mostly welcome and it will be appreciated.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)