01-09-2019, 09:25 PM
GdPicture .Net has a COM interface. You could download it here:
https://www.gdpicture.com/download/gdpicturedotnet.zip
I could make a GUI to incorporate its "GdViewer" display.
But I don't know how to show the image on the display.
After running it and select an image file and click OK button
nothing showing up in the display.
Could anybody find out why?
Function Dialog10
https://www.gdpicture.com/download/gdpicturedotnet.zip
I could make a GUI to incorporate its "GdViewer" display.
But I don't know how to show the image on the display.
After running it and select an image file and click OK button
nothing showing up in the display.
Could anybody find out why?
Function Dialog10
\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 704 596 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 706 578 "GdPicture_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
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
typelib GdPicture_NET_14 {B5893B58-701E-4110-9871-1DA14CF9C1DC} 14.1
GdPictureImaging Gdp._create()
GdViewer GdViewer1._create()
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)
,,,
,,,;Displaying the image and checking the status.
,,,if (GdViewer1.DisplayFromGdPictureImage(imageID) != GdPicture_NET_14.GdPictureStatus_OK)
,,,,out "Error occurred when displaying the image."
,,,;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