我看了工具栏按钮的fsState属性,里面有:
TBSTATE_CHECKED
The button has the TBSTYLE_CHECK style and is being clicked.TBSTATE_ELLIPSES
Version 4.70. The button's text is cut off and an ellipsis is displayed.TBSTATE_ENABLED
The button accepts user input. A button that doesn't have this state is grayed.TBSTATE_HIDDEN
The button is not visible and cannot receive user input.TBSTATE_INDETERMINATE
The button is grayed.TBSTATE_MARKED
Version 4.71. The button is ed. The interpretation of a ed item is dependent upon the application. TBSTATE_PRESSED
The button is being clicked.TBSTATE_WRAP
The button is followed by a line break. The button must also have the TBSTATE_ENABLED state.但就是没有disable。我用过里面的变灰,没用,只是让按钮灰化但是还是能点击。请高手指点。
TBSTATE_CHECKED
The button has the TBSTYLE_CHECK style and is being clicked.TBSTATE_ELLIPSES
Version 4.70. The button's text is cut off and an ellipsis is displayed.TBSTATE_ENABLED
The button accepts user input. A button that doesn't have this state is grayed.TBSTATE_HIDDEN
The button is not visible and cannot receive user input.TBSTATE_INDETERMINATE
The button is grayed.TBSTATE_MARKED
Version 4.71. The button is ed. The interpretation of a ed item is dependent upon the application. TBSTATE_PRESSED
The button is being clicked.TBSTATE_WRAP
The button is followed by a line break. The button must also have the TBSTATE_ENABLED state.但就是没有disable。我用过里面的变灰,没用,只是让按钮灰化但是还是能点击。请高手指点。
SendMessage(
hWndToolBar,
(UINT) TB_ENABLEBUTTON,
(WPARAM)ID_BUTTONX,
(LPARAM)MAKELPARAM(FALSE, 0)
);
需要Hook IE窗口的窗口过程,来替换IE对其维护的代码,你看一下Hook的相关资料。