CM INVALIDATERECORD
Appearance
This message notifies the container control that a RECORDCORE structure or structures are not valid and must be refreshed.
- Note
- ; If the CCS_MINIRECORDCORE style bit is specified when a container is created, then MINIRECORDCORE should be used instead of RECORDCORE, and PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable data structures and messages.
Syntax
param1 PVOID pRecordArray; /* Pointer to an array of pointers to RECORDCORE structures that are to be refreshed. */ param2 USHORT cNumRecord; /* Number of container records to be refreshed. */ USHORT fInvalidateRecord; /* Flags used to optimize container record invalidation. */
Parameters
- pRecordArray (PVOID) - Input
- Pointer to an array of pointers to RECORDCORE structures that are to be refreshed.
- cNumRecord (USHORT) - Input
- Number of container records to be refreshed. If the cNumRecord parameter has a value of 0, all of the records in the container are refreshed and the pRecordArray parameter is ignored.
- fInvalidateRecord (USHORT) - Input
- Flags used to optimize container record invalidation. The CMA_REPOSITION, CMA_NOREPOSITION, and CMA_TEXTCHANGED attributes are mutually exclusive. However, any of them can be combined with the CMA_ERASE attribute by using a logical OR operator (|).
- CMA_ERASE: Flag used when the icon view is displayed to minimize painting of a container record's background when it has changed. If specified, the background is erased when the display is refreshed. The default is to not erase the background when the display is refreshed.
- CMA_REPOSITION: Flag used to reposition all container records. This flag must be used if container records are inserted or removed, or if many changes have occurred. If a container record is inserted, the pRecordArray parameter points to the inserted record. If a container record is removed, the pRecordArray parameter points to the record that precedes the removed one. If several container records have changed, an array of container record pointers must be used. The container determines the first record to be invalidated. This is the default.
- CMA_NOREPOSITION: Flag used to indicate that container records do not need to be repositioned. The container draws the record or records pointed to in the pRecordArray parameter. The container does not do any validation; therefore, it is the application's responsibility to make sure repositioning is not needed or changing the longest text line is not necessary.
- CMA_TEXTCHANGED: Flag used if text has changed and you do not know whether repositioning is needed. The container determines whether the longest line or the height of the record has changed. If so, the container repositions and redraws the necessary visible container records. It may be necessary to reposition the container records if the number of lines of text has changed.
- Warning
- ; The application must send a CM_INVALIDATERECORD message if text changes. Otherwise, any further processing is unreliable.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Records were successfully refreshed.
- FALSE: An error occurred. The WinGetLastError function may return the following errors:
- PMERR_INVALID_PARAMETERS
- PMERR_INSUFFICIENT_MEMORY.
Remarks
If the number of pointers to container records in the array exceeds the count of records to be refreshed, only the number of records specified in the cNumRecord parameter is refreshed. If the CCS_VERIFYPOINTERS style bit is set and the pRecordArray parameter contains pointers to a RECORDCORE structure or structures that do not exist, the PMERR_INVALID_PARAMETERS error is set and nothing is refreshed.
Default Processing
The default window procedure does not expect to receive this message and therefore takes no action on it other than to return FALSE.