ON in the property page

xiaoxiao2021-03-06  50

I have translated an article in front to talk about it.

Process the on_update_command_ui message in the dialog. again

Www.codeguru.com See the method of handling the ON_UPDATE_COMMAND_UI message in the property page and slightly different in the dialog box. The process of the two is generally the same. Just a step in the property page.

You need to derive classes from the CPropertySheet and intercept messages WM_KICKIDLE.

1. Use the class wizard commonly a new class CMYPROPSHEET, and its base class is CPROPERTYSHEET.

2, add a message function in the header file:

AFX_MSG LRESULT ONKICKIDLE (WPARAM WPARAM, LPARAM LPARAM);

3, in the source file containing AfxPiv.h

4, add a message map ON_MESSAGE (WM_KICKIDLE, ONKICKIDLE);

5, implement function

Lresult CMYPROPSHEET :: ONKICKIDLE (WPARAM, LPARAM)

{

SendMessGetescendants (WM_KICKIDLG, 0, 0, FALSE, FALSE);

Return 0;

}

Property performance passes all WM_KICKIDLE messages to the property page, in the Properties page class, add WM_KICKIDLE message mapping, and call UpdatedialogjControls

Lresult CMyproppage :: ONKICKIDLE (WPARAM, LPARAM)

{

UpdatedialogjControls (this, false);

Return 0;

}

The next step is to process the on_update_command_ui message map similar to the dialog.

The WM_IdleUpdateCmDui message is required to process the WM_IdleUpdateCmDui message in all windows of the property table and send a WM_KICKIDLE message to it.

转载请注明原文地址:https://www.9cbs.com/read-82884.html

New Post(0)