Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RichEditHighlight for DialogButton Texts
#1
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
#2
No, Button controls cannot have colors, unless you completely draw them, which is not easy.
#3
enough said. I think I have pestered you about buttons too much!
Thanks for responding though,
Stuart
#4
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

Code:
Copy      Help
,case STN_CLICKED<<16|3

I will lose the "depressed" action of a true button but the benefit of formatting that may outweigh.
Thanks again,
Stuart
#5
I just did something quick and I hope it is something that gives you an Idea. Hover over and off the close after you have depressed the left mouse button on it.
   
   
   
#6
thank you for sharing here but I am not sure what you are demonstrating. Can you give a code example.
Thanks again though,
STuart
#7
Daaaaaaaaaaaaa
   
   

Function SwapButtonImageOnHoverInDlg3
Code:
Copy      Help
\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
#8
Very Cool!!! Thanks,!!!
Stuart


Forum Jump:


Users browsing this thread: 2 Guest(s)