Declare image "saved"
(Originally posted by gnunesjr on 1/8/2006)
In my macros, I often create temporary images, and under some circumstances it is best if the user closes them manually by clicking the "X" in the upper right corner.
Is there a way to programmatically suppress the pop-up dialog that warns that the image has not been saved? Ideally, I'd like to set something that declares the image as saved without actually saving it.
Comments
-
(Originally posted by YuriG on 1/9/2006)
The above mentioned dialog is shown only on images, which have the Modified flag set to True. You can pragmatically reset this flag using the following macro (the macro uses IPP SDK functions):
'**************************************
'declarations (from Hil.bas)
Declare Function HilImControl Lib "HILIMG32" (ByVal ihImage _
As Long, ByVal icCommand As Long, ByVal sParam As _
Integer, ByVal lParam As Long, pParam As Long) As Long
Public Const IMCMD_SETMODIFIED = 24Sub ResetModifyFlag()
Dim bModified As Boolean, hImage As Long
'get active image handle
ret = IpDocGet(GETDOCVRI, DOCSEL_ACTIVE, hImage)
'set Modify flag to False
bModified=False
ret = HilImControl(hImage, IMCMD_SETMODIFIED, bModified, _
0, IPNULL)
End Sub
'**************************************0 -
(Originally posted by KevinR on 1/9/2006)
You could also go to "Edit | Preferences", and uncheck "Prompt before closing modified images". This must be manually done, however, as we don't have a programming interface for that preference.
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions