01-10-2019, 05:16 PM
I did make the change as you've suggested but again the image is not displayed yet.
Function Dialog10
Function Dialog10
\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 704 596 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 706 578 "Gdpture_NET_14.GdViewer {DDF6E929-D524-4DD0-99B9-3F9BD2107FB8}"
;1 Button 0x54030001 0x4 652 580 48 14 "OK"
;2 Button 0x54030000 0x4 592 580 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""
str Controls = "3"
str ax3GdP
typelib GdPicture_NET_14 {B5893B58-701E-4110-9871-1DA14CF9C1DC} 14.1
GdPictureImaging- Gdp._create()
GdViewer- GdViewer1
if(!ShowDialog(dd &sub.DlgProc &Controls)) ret
#sub DlgProc v
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,,//Loading the image from a file.
,,int imageID = Gdp.CreateGdPictureImageFromFile("")
,,//Checking if the image has been loaded correctly.
,,if (Gdp.GetStat() = GdPicture_NET_14.GdPictureStatus_OK)
,,,// Attach GdViewer1 to the control display GdViewer
,,,GdViewer1._getcontrol(id(3 hDlg))
,,,;Displaying the image and checking the status.
,,,if (GdViewer1.DisplayFromGdPictureImage(imageID) != GdPicture_NET_14.GdPictureStatus_OK)
,,,,out "Error occurred when displaying the image."
,,,else
,,,,out "Picture loads just fine!"
,,,,
,,,;Releasing the image resource.
,,,;Gdp.ReleaseGdPictureImage(imageID)
,,else
,,,;Displaying the error message.
,,,out "The file can't be loaded."
,,
,,;Gdp.Dispose()
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1