07-13-2015, 06:15 PM
Is it possible to add an image resource without extracting it to an (temporary) location?
Below I have a dialog and I want to show an image that is "embedded" within the .exe
If possible I want "run" the image when the button "SHOW IMAGE" is clicked.
It is then opened in the default set application within the users OS.
All this without extracting it to an temporary location.
Function show_image
I read the chapter "Resources (macro resources)" , 'LoadPictureFile' seems to be the way to go (?)
As always... I can't get the syntaxt right (if it is even possible to do this).
EDIT:
Forgot to mention I also want to use this method for creating shortcuts through my dialog.exe
The normal method adding of resources and then referring them through ":100" does not work.
(In other words, I can't get it working)
Function Function2
Below I have a dialog and I want to show an image that is "embedded" within the .exe
If possible I want "run" the image when the button "SHOW IMAGE" is clicked.
It is then opened in the default set application within the users OS.
All this without extracting it to an temporary location.
Function show_image
;\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 63 50 100 35 "SHOW IMAGE"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
I read the chapter "Resources (macro resources)" , 'LoadPictureFile' seems to be the way to go (?)
As always... I can't get the syntaxt right (if it is even possible to do this).
EDIT:
Forgot to mention I also want to use this method for creating shortcuts through my dialog.exe
The normal method adding of resources and then referring them through ":100" does not work.
(In other words, I can't get it working)
Function Function2