The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transparent Text Background over progress bar
#1
Hi All,

It would be cool to have progress bar fill in over text. I know settings of "Static text transparent background" from http://www.quickmacros.com/forum/showthr...p?tid=3980. But there seems to be z-order issue. When update of progress bar occurs, it moves in front of text. Any tricks to keep the text on top of the progress bar?
Thanks, S

Function Dialog4
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;note: static control: remove WS_CLIPSIBLINGS style, and add WS_EX_TRANSPARENT.

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 46 18 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;4 Static 0x50000201 0x20 2 4 42 10 "TEXT"
;3 msctls_progress32 0x54000000 0x4 0 0 46 18 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "" "" "" ""


if(!ShowDialog("Dialog4" &Dialog4)) ret

ret
;messages

int hpb=id(3 hDlg)
int step= 1        
int range=6
sel message
,case WM_INITDIALOG
,,__Font-- f
,,f.Create("Courier New" 22 1)
,,f.SetDialogFont(hDlg "4")
,,SendMessage hpb PBM_SETRANGE 1 range<<16
,,SetTimer hDlg 1 1 0
,,int+ rangecounter
,case WM_DESTROY
,case WM_TIMER
,,out rangecounter
,,SendMessage hpb PBM_SETPOS rangecounter 0
,,Zorder id(4 hDlg) HWND_TOPMOST
,,rangecounter = rangecounter+1
,,if rangecounter > range
,,,KillTimer hDlg 1
,case WM_CTLCOLORSTATIC
,sel GetWinId(lParam)
,,case 4
,,SetBkMode wParam TRANSPARENT
,,ret GetStockObject(NULL_BRUSH) ;;transparent brush
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)