|
-
Mar 28th, 2001, 08:34 PM
#1
Thread Starter
New Member
Hi,
Does someone know how I can make open, SAVE AS and UNDO options in my paint program? (Code or examples). I want to specify the SAVE AS so that it saves the picture is saved in *.bmp format.
I know how to make the menu but the functionality is missing...
-Maarit
-
Mar 28th, 2001, 09:24 PM
#2
Addicted Member
CommonDialog
For the SaveAs you could probably go:
Code:
CommonDialog1.FileName="*.bmp"
CommonDialog1.ShowSave
Call SavePicture(Picture1.Picture,CommonDialog1.Filename)
For Open:
Code:
CommonDialog1.Filename="*.bmp"
CommonDialog.ShowOpen
Picture1.Picture=LoadPicture(CommonDialog.Filename)
For Undo (i'm not usre if this will work, it works with textboxes)
Code:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const Em_Undo = &HC7
Call SendMessage(Picture1.hwnd,EM_Undo,0&,0&)
-
Mar 28th, 2001, 10:04 PM
#3
Good Ol' Platypus
Nope, the last wont work, because EM messages are strictly for Edits and Textboxes (not RTBs though)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 29th, 2001, 01:07 AM
#4
For undo use this
WM_UNDO will work
Code:
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long
Public Const WM_UNDO = &H304
Private Sub cmdUndo_Click()
SendMessage page.hWnd, WM_UNDO, 0, 0
End Sub
'Code improved by vBulletin Tool (Save as...)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|