Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi Gintaras,
I was wondering if there was an equivalent of RichEditHighlight but for dialog button text?
I know how to format objects at WM_INITDIALOG but not after the dialog has already been created.
This isn't superhigh priority so don't feel need to work on this unless easy answer or interesting to you.
Thanks again as always!!!
Stuart
Posts: 12,074
Threads: 141
Joined: Dec 2002
No, Button controls cannot have colors, unless you completely draw them, which is not easy.
Posts: 1,006
Threads: 330
Joined: Mar 2007
enough said. I think I have pestered you about buttons too much!
Thanks for responding though,
Stuart
Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi Gintaras,
I didn't realize you could get a action out of clicking on a static item but I came across this and I saw your previous answer re SS_NOTIFY to make a control act like a button. I think this will do the trick in combination with RichEditHighlight.
Dialog Questions - dbl click, modifier click
I will lose the "depressed" action of a true button but the benefit of formatting that may outweigh.
Thanks again,
Stuart
Posts: 262
Threads: 63
Joined: Nov 2005
Posts: 1,006
Threads: 330
Joined: Mar 2007
thank you for sharing here but I am not sure what you are demonstrating. Can you give a code example.
Thanks again though,
STuart
Posts: 262
Threads: 63
Joined: Nov 2005
Daaaaaaaaaaaaa
Function SwapButtonImageOnHoverInDlg3
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("SwapButtonImageOnHoverInDlg3" &SwapButtonImageOnHoverInDlg3)) ret
;BEGIN DIALOG
;0 "" 0x90080A44 0x0 0 0 159 23 "TrackMouseEvent"
;1 Button 0x54030001 0x4 58 5 48 14 "OK"
;2 Button 0x54030000 0x4 106 5 48 14 "Cancel"
;7 Button 0x54032080 0x0 3 4 52 16 " "
;END DIALOG
;DIALOG EDITOR: "" 0x203000D "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,ont hDlg
,
,lpstr sb=
;$my qm$\close u.bmp
;$my qm$\close d.bmp
/;c:\macro682.bmp
/;c:\macro610 (2).bmp
,ARRAY(__GdiHandle)-- ab
,if(!ab.len) foreach(_s sb) ab[]=LoadPictureFile(_s)
,
,int-- hbtn1; hbtn1=id(7 hDlg)
,SendMessage(hbtn1 BM_SETIMAGE IMAGE_BITMAP ab[0])
,
,case WM_SETCURSOR
,if wParam=hbtn1 and SendMessage(wParam BM_GETIMAGE IMAGE_BITMAP 0)!=ab[1]
,,SendMessage(wParam BM_SETIMAGE IMAGE_BITMAP ab[1])
,,SetTimer hDlg 1 50 0
,,
,case WM_TIMER
,sel wParam
,,case 1
,,if(child(mouse)!=hbtn1)
,,,KillTimer hDlg wParam
,,,SendMessage(hbtn1 BM_SETIMAGE IMAGE_BITMAP ab[0])
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 7
,,mes "hello"
ret 1
Posts: 1,006
Threads: 330
Joined: Mar 2007
Very Cool!!! Thanks,!!!
Stuart
|