Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Always On Top?
#1
Is there a way to set a dialog to be always on top of all windows?
#2
in styles pick WS_EX_TOPMOST
#3
this dialog wont let me change anything on it... here is the code... I got it off this site and i tweaked with it a little:


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

def PBM_SETRANGE (WM_USER+1)
def PBM_SETPOS (WM_USER+2)
def PBM_DELTAPOS (WM_USER+3)

;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 198 27 "Windows XP"
;3 msctls_progress32 0x54000000 0x4 8 10 136 12 ""
;5 Static 0x54000000 0x0 150 10 44 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010900 "" ""


ret
;messages
int range=25
int step=1
int timerperiod=100

int- ti
int hpb=id(3 hDlg)
str s
sel message
,case WS_EX_TOPMOST
,case WM_INITDIALOG
,DT_Init(hDlg lParam)
,SendMessage hpb PBM_SETRANGE ti range<<16
,SetTimer hDlg 1 timerperiod 0
,ret 1
,;;
,case WM_TIMER
,ti+step
,SendMessage hpb PBM_SETPOS ti 0
,if(ti<range) s.format("%i %%" 100*ti/range)
,else
,,s="Completed"
,,KillTimer hDlg 1
,,DT_Ok hDlg
,s.setwintext(id(5 hDlg))
,;;
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
int ctrlid=wParam&0xFFFF; message=wParam>>16
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

Trigger:
Code:
Copy      Help
if(!ShowDialog("Downloading" &Downloading)) ret


but im not sure why it wont let me open it up and change the style?
#4
change 0x100 to 0x108


Forum Jump:


Users browsing this thread: 1 Guest(s)