Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qmgrid functions
#15
Function dlg_download_progress
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_download_progress" &dlg_download_progress 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;7 msctls_progress32 0x54000000 0x4 4 28 186 13 ""
;3 Button 0x54032000 0x0 2 4 48 14 "Download"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,;better if this code was in other thread, but for simplicity just add flag 32
,Http h.Connect("www.quickmacros.com")
,h.SetProgressCallback(&DDP_progress id(7 hDlg))
,h.Get("test\file_1MB.txt" _s 32)
,
,case IDOK
,case IDCANCEL
ret 1

Function DDP_progress
Code:
Copy      Help
function# nbAll nbRead str&s fparam

SendMessage fparam PBM_SETPOS iif(nbAll>0 MulDiv(nbRead 100 nbAll) 0) 0


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)