DTWAIN_DisableAppWindow
The DTWAIN_DisableAppWindow function allows a window to be disabled when acquiring images.
DTWAIN_BOOL DTWAIN_DisableAppWindow (
Parameters hWindow Window handle of window to be disabled.
bDisable Determines whether to disable the window when acquisition starts.
Return Values The return value is TRUE if successful. Otherwise FALSE is returned.
Comments The DTWAIN_DisableAppWindow function allows a window in an application to be disabled when acquiring images. The hWindow is the window handle (HWND) of the window, and bDisable determines whether hWindow is to be disabled when acquiring images. If bDisable is TRUE, then hWindow will be disabled when acquiring images. If bDisable is FALSE, hWindow will not be enabled or disabled when the acquisitions start (the current state of the window is retained).
For acquisitions that allow the Source user-interface (UI), the windows will be re-enabled when the user interface is closed. For acquisitions that are acquiring images with no user interface, the windows are re-enabled when the acquisitions are completed.
DTWAIN_DisableAppWindow should be called before calling a DTWAIN Acquisition function.
Calling DTWAIN_DisableAppWindow will not immediately disable a window -- the window will be disabled only when the acquisitions or Source UI are started, and re-enabled when the acquisitions or Source UI are terminated.
Multiple calls to DTWAIN_DisableAppWindow with different window handles allows multiple windows to be disabled when the acquisitions are occuring. Therefore, if your application needs to disable a set of controls during acquisition (assuming each control is a window), a call to DTWAIN_DisableAppWindow for each window will disable all the controls when acquisitions are started.
To remove a window from the list of windows that will be disabled by DTWAIN_DisableAppWindow, call DTWAIN_DisableAppWindow with bDisable as FALSE for the window (HWND).
Prerequisite Function Call(s)
|