Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sys Preview
#1
Hey justndering in this how do i make it so it sets the preview of what ever file they choose?

Code:
Copy      Help
;\Dialog_Editor
typelib COMPATUILib {233A5627-7755-4B36-AA00-656B8846F501} 1.0
typelib PREVIEWLib {50F16B18-467E-11D1-8271-00C04FC3183B} 1.0
typelib SystemMonitor {1B773E42-2509-11CF-942F-008029004347} 3.6
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 361 246 "Dialog"
;3 ActiveX 0x54030000 0x0 0 16 360 230 "PREVIEWLib.Preview {50F16B26-467E-11D1-8271-00C04FC3183B}"
;4 ActiveX 0x54030000 0x0 4 2 354 14 "COMPATUILib.SelectFile {66CBC149-A49F-48F9-B17A-6A3EA9B42A87}"
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""

if(!ShowDialog("Dialog2" &Dialog2)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,PREVIEWLib.Preview pr3
,pr3._getcontrol(id(3 hDlg))
,
,DT_Init(hDlg lParam) ;;*
,ret 1 ;;*
,case WM_DESTROY DT_DeleteData(hDlg) ;;*
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,DT_Ok hDlg ;;*
,case IDCANCEL DT_Cancel hDlg ;;*
ret 1

;* - not necessary in QM >= 2.1.9

Also when i run the dialog and press browse it freeze's any idea why? Am i doing anything wrong?
#2
Function DialogWithPicturePreviewControl
Code:
Copy      Help
\Dialog_Editor
typelib PREVIEWLib {50F16B18-467E-11D1-8271-00C04FC3183B} 1.0
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 361 246 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 362 246 "PREVIEWLib.Preview {50F16B26-467E-11D1-8271-00C04FC3183B}"
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""
if(!ShowDialog("" &DialogWithPicturePreviewControl)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam) ;;*
,PREVIEWLib.Preview pr3
,pr3._getcontrol(id(3 hDlg))
,;type pr3. and you'll see what you can do with the control. For example:
,pr3.ShowFile(_s.expandpath("$my pictures$\avatar_bird.gif") 0)
,
,ret 1 ;;*
,case WM_DESTROY DT_DeleteData(hDlg) ;;*
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,DT_Ok hDlg ;;*
,case IDCANCEL DT_Cancel hDlg ;;*
ret 1

;* - not necessary in QM >= 2.1.9
---------
note: not all Windows versions have the control. XP yes, Vista no.
#3
WOW thanks again...any idea why when i add the browse button with the select file it always frezzes up?
#4
Maybe it is one of ActiveX controls that don't work in QM. Don't know why. It eats 100% CPU. In Visual Basic does not work at all.
#5
Oh ok, is there any other way for the user to look up a file on there computer and it be set as the preview image?


Forum Jump:


Users browsing this thread: 1 Guest(s)