Kbase P113746: How to save an image created with the Microsoft InkPicture control?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/24/2006 |
|
Status: Unverified
GOAL:
How to save an image created with the Microsoft InkPicture control?
GOAL:
How to save an image created with the Microsoft InkPicture control for Microsoft Tablet PC?
FACT(s) (Environment):
Windows 2000
Windows XP
Windows 2003
FIX:
Create a button for the Save routine and use either of the following examples:
Option #1
ON CHOOSE OF btnSave IN FRAME DEFAULT-FRAME
DO:
DEFINE VARIABLE chInkPicture AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chInk AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE cBase64 AS CHARACTER NO-UNDO.
ASSIGN chInkPicture = chCtrlFrame:InkPicture
chInk = chInkPicture:Ink
cBase64 = chInk:SAVE(1,0).
OUTPUT TO "c:\temp\signature.txt".
PUT UNFORMATTED cBase64 SKIP.
OUTPUT CLOSE.
END.
Option #2
ON CHOOSE OF btnSave IN FRAME DEFAULT-FRAME
DO:
DEFINE VARIABLE chInkPicture AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE mImage AS MEMPTR.
ASSIGN chInkPicture = chCtrlFrame:InkPicture
mImage = chInkPicture:Ink:SAVE(2,0).
COPY-LOB FROM mImage TO FILE "C:\temp\test.gif".
SET-SIZE(mImage) = 0.
END.