RestoreDCState: Difference between revisions
Appearance
Created page with "OS2_PM_DRV_ENABLE: RestoreDCState restores a specific DC state from the saved DC states. ==Syntax== RestoreDCState(ulSubfunction, pParam1, pParam2); ==Parameters== ;ulSubf..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
OS2_PM_DRV_ENABLE: RestoreDCState restores a specific DC state from the saved DC states. | OS2_PM_DRV_ENABLE: RestoreDCState restores a specific DC state from the saved DC states. | ||
==Syntax== | ==Syntax== | ||
RestoreDCState(ulSubfunction, pParam1, pParam2) | RestoreDCState(ulSubfunction, pParam1, pParam2) | ||
==Parameters== | ==Parameters== | ||
;ulSubfunction (ULONG) - input | ;ulSubfunction (ULONG) - input:08h. | ||
:08h. | ;pParam1 (PULONG) - input:A pointer (pInstance) to the DC instance data. | ||
;pParam2 (PLONG) - input:Identifies which of the saved states are to be restored. Positive numbers indicate the specific state counting from the first saved state, that is, 1 equals the first, 2 the second, and so forth. All saved states following the one being restored are discarded. Preceding states remain saved. | |||
;pParam1 (PULONG) - input | :Negative numbers indicate the specific state counting from the last saved state, a value of -2 indicates that the last state is discarded and the state before that is restored. | ||
:A pointer (pInstance) to the DC instance data. | |||
;pParam2 (PLONG) - input | |||
:Identifies which of the saved states are to be restored. Positive numbers indicate the specific state counting from the first saved state, that is, 1 equals the first, 2 the second, and so forth. All saved states following the one being restored are discarded. Preceding states remain saved. | |||
:Negative numbers indicate the specific state counting from the last saved state, a value of -2 indicates that the last state is discarded and the state before that is restored. | |||
==Return Code== | ==Return Code== | ||
; rc (LONG) - returns | ;rc (LONG) - returns: Return codes. | ||
: Return codes. | :The handling routine should return a LONG integer. Valid values are: | ||
:*0 Successful | |||
: The handling routine should return a LONG integer. Valid values are: | :*-1 Error | ||
:*0 Successful | |||
:*-1 Error | |||
==Remarks== | ==Remarks== | ||
An index to the required state is supplied as Parameter 2. The presentation driver returns an error if the index is 0 or if it specifies a value that does not identify a saved state. | An index to the required state is supplied as Parameter 2. The presentation driver returns an error if the index is 0 or if it specifies a value that does not identify a saved state. | ||
Display drivers must be careful when handling this call. Some of the data stored in the DC instance data must match the data held by the Window Manager. The handling routine for RestoreDCState does not restore: | |||
*DC origin | |||
*User bounds | |||
*Cached clipping rectangles | |||
*HDC_IS_DIRTY flag | |||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 12:56, 5 March 2020
OS2_PM_DRV_ENABLE: RestoreDCState restores a specific DC state from the saved DC states.
Syntax
RestoreDCState(ulSubfunction, pParam1, pParam2)
Parameters
- ulSubfunction (ULONG) - input
- 08h.
- pParam1 (PULONG) - input
- A pointer (pInstance) to the DC instance data.
- pParam2 (PLONG) - input
- Identifies which of the saved states are to be restored. Positive numbers indicate the specific state counting from the first saved state, that is, 1 equals the first, 2 the second, and so forth. All saved states following the one being restored are discarded. Preceding states remain saved.
- Negative numbers indicate the specific state counting from the last saved state, a value of -2 indicates that the last state is discarded and the state before that is restored.
Return Code
- rc (LONG) - returns
- Return codes.
- The handling routine should return a LONG integer. Valid values are:
- 0 Successful
- -1 Error
Remarks
An index to the required state is supplied as Parameter 2. The presentation driver returns an error if the index is 0 or if it specifies a value that does not identify a saved state.
Display drivers must be careful when handling this call. Some of the data stored in the DC instance data must match the data held by the Window Manager. The handling routine for RestoreDCState does not restore:
- DC origin
- User bounds
- Cached clipping rectangles
- HDC_IS_DIRTY flag