CN REALLOCPSZ
This message is sent by the container control to its owner whenever container text is edited. It is sent before the CN_ENDEDIT notification code is sent.
Syntax
param1 USHORT id; /* Container control ID. */ USHORT CN_REALLOCPSZ; /* Notification code. */ param2 PCNREDITDATA pCnrEditData; /* Pointer to the CNREDITDATA structure. */
Parameters
- id (USHORT) - Input
- Container control ID.
- CN_REALLOCPSZ (USHORT) - Input
- Notification code.
- pCnrEditData (PCNREDITDATA) - Input
- Pointer to the CNREDITDATA structure.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: The application has sufficient memory for the new text string.
- FALSE: The application has insufficient memory for the new text string or does not want the string to be copied.
Remarks
The CN_REALLOCPSZ notification code is sent after direct editing of container text is complete. It notifies the application that the container is about to copy the changed text to the application's text string. This allows the application to ensure that the correct amount of memory is allocated to accommodate the change.
If TRUE is returned by the application, the container control copies the new text to the application's text string. However, if the application returns FALSE, changed text is disregarded.
Warning: Once your application receives the CN_REALLOCPSZ notification code, it must not send any messages to the container until it receives the CN_ENDEDIT notification code, which indicates that direct editing of container text has ended. If any messages are sent to the container before your application receives the CN_ENDEDIT notification code, the results of direct editing are unpredictable.
Default Processing
The default window procedure does not expect to receive this notification code and therefore takes no action on it other than to return FALSE.