IAccessibilityDockingServiceCallback::Undocked method
Called when the accessibility window has been undocked, giving the app the chance to redock.
Syntax
HRESULT Undocked(
[in] UNDOCK_REASON undockReason
);
Parameters
- undockReason [in]
-
Type: UNDOCK_REASON
One of the enumeration values that explains why the accessibility app window was undocked.
Return value
Type: HRESULT
Always returns S_OK.
Remarks
This method informs the app why it was undocked so that it can take an appropriate action. For example, when you react to a resolution change, it might not be necessary to add the adornments of an undocked window because you might want to immediately redock.
When an accessibility app window becomes undocked due to a system event, the system will not automatically attempt to restore it to its previous location. It is safe to perform a redock in this callback method.
After the app has received this Undocked callback, it will not receive any subsequent callbacks unless it has successfully redocked its window.
Examples
The following shows an example implementation of this method.
class CAccessibilityApplicationWindow : public IAccessibilityDockingServiceCallback
{
// ...
HRESULT Undocked(_In_ UNDOCK_REASON undockReason);
{
// This sample only reacts to a resolution change event
// On monitor disconnect, this will not attempt to request a redock
if (undockReason == RESOLUTION_CHANGE)
{
_ReRequestDock();
}
return S_OK;
}
}
Requirements
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also