@Override LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) { /* * Feature in Windows. When the toolbar window * proc processes WM_COMMAND, it forwards this * message to its parent. This is done so that * children of this control that send this message * type to their parent will notify not only * this control but also the parent of this control, * which is typically the application window and * the window that is looking for the message. * If the control did not forward the message, * applications would have to subclass the control * window to see the message. Because the control * window is subclassed by SWT, the message * is delivered twice, once by SWT and once when * the message is forwarded by the window proc. * The fix is to avoid calling the window proc * for this control. */ LRESULT result = super.WM_COMMAND (wParam, lParam); if (result != null) return result; return LRESULT.ZERO; }
@Override LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) { /* * Feature in Windows. When the coolbar window * proc processes WM_COMMAND, it forwards this * message to its parent. This is done so that * children of this control that send this message * type to their parent will notify not only * this control but also the parent of this control, * which is typically the application window and * the window that is looking for the message. * If the control did not forward the message, * applications would have to subclass the control * window to see the message. Because the control * window is subclassed by SWT, the message * is delivered twice, once by SWT and once when * the message is forwarded by the window proc. * The fix is to avoid calling the window proc * for this control. */ LRESULT result = super.WM_COMMAND (wParam, lParam); if (result != null) return result; return LRESULT.ZERO; }