Mike Clark
Member
We have a Chui system
(windows and Progress 9.1d)
and a user requires a facility to display a .bmp/.gif file on the screen.
I can force it to come up under 'Paint' as described below, but is there an easier/nicer looking way to do it as I don't want the user to edit the file - just to look at it.
Thanks
Mike
example follows
&GLOB A A
/* data types */
&Glob HWND long
&Glob BOOL long
&Glob HINSTANCE long
&Glob INT long
&GLOB INTSIZE 4
/* libraries */
&GLOB USER "user32"
&GLOB KERNEL "kernel32"
&GLOB SHELL "shell32"
&GLOB MAPI "mapi32"
&GLOB GDI "gdi32"
&GLOB MMEDIA "winmm"
&GLOB WINSPOOL "winspool.drv"
&GLOB ADVAPI "advapi32"
&GLOB A A
PROCEDURE ShellExecuteA EXTERNAL "shell32":
DEFINE INPUT PARAMETER HWND AS LONG.
DEFINE INPUT PARAMETER lpOperation AS CHAR.
DEFINE INPUT PARAMETER lpFile AS CHAR.
DEFINE INPUT PARAMETER lpParameters AS CHAR.
DEFINE INPUT PARAMETER lpDirectory AS CHAR.
DEFINE INPUT PARAMETER nShowCmd AS LONG.
DEFINE RETURN PARAMETER hInstance AS LONG.
END PROCEDURE.
Def var OK as logical NO-UNDO.
def var Filename as char NO-UNDO.
def var hInstance as INT no-undo.
def var newfilename as char format "x(50)" no-undo.
newfilename = "power.bmp".
FILE-INFO:File-NAME = ".". /* Current directory */
run ShellExecuteA
(0,
"open",
"mspaint.exe",
newfileName,
FILE-INFO:FULL-PATHNAME,
/* starting directory */
1,
output hInstance).
(windows and Progress 9.1d)
and a user requires a facility to display a .bmp/.gif file on the screen.
I can force it to come up under 'Paint' as described below, but is there an easier/nicer looking way to do it as I don't want the user to edit the file - just to look at it.
Thanks
Mike
example follows
&GLOB A A
/* data types */
&Glob HWND long
&Glob BOOL long
&Glob HINSTANCE long
&Glob INT long
&GLOB INTSIZE 4
/* libraries */
&GLOB USER "user32"
&GLOB KERNEL "kernel32"
&GLOB SHELL "shell32"
&GLOB MAPI "mapi32"
&GLOB GDI "gdi32"
&GLOB MMEDIA "winmm"
&GLOB WINSPOOL "winspool.drv"
&GLOB ADVAPI "advapi32"
&GLOB A A
PROCEDURE ShellExecuteA EXTERNAL "shell32":
DEFINE INPUT PARAMETER HWND AS LONG.
DEFINE INPUT PARAMETER lpOperation AS CHAR.
DEFINE INPUT PARAMETER lpFile AS CHAR.
DEFINE INPUT PARAMETER lpParameters AS CHAR.
DEFINE INPUT PARAMETER lpDirectory AS CHAR.
DEFINE INPUT PARAMETER nShowCmd AS LONG.
DEFINE RETURN PARAMETER hInstance AS LONG.
END PROCEDURE.
Def var OK as logical NO-UNDO.
def var Filename as char NO-UNDO.
def var hInstance as INT no-undo.
def var newfilename as char format "x(50)" no-undo.
newfilename = "power.bmp".
FILE-INFO:File-NAME = ".". /* Current directory */
run ShellExecuteA
(0,
"open",
"mspaint.exe",
newfileName,
FILE-INFO:FULL-PATHNAME,
/* starting directory */
1,
output hInstance).