02-21-2008, 12:11 AM
Function DialogWithPicturePreviewControl
---------
note: not all Windows versions have the control. XP yes, Vista no.
\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.
