Handling Messages for Tab Controls (Windows CE 5.0)
When a user selects a tab, a tab control sends messages to its parent window in the form of WM_NOTIFY messages. The tab control sends the TCN_SELCHANGING message before the selection changes, and it sends the TCN_SELCHANGE message after the selection changes.
You can process the TCN_SELCHANGING message to save the state of the outgoing page. You can return TRUE to prevent the selection from changing. For example, you might not want to switch away from a child dialog box in which a control has an invalid setting.
To display the incoming page in the display area, you must process TCN_SELCHANGE. Although processing might include changing the information that is displayed in a child window, it more likely will entail destroying or hiding the outgoing child window or dialog box, and creating or showing the incoming child window or dialog box.
You can retrieve and set the current table selection by using the TCM_GETCURSEL and TCM_SETCURSEL messages.
Send Feedback on this topic to the authors