ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

LRESULT StartButton::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [protected, virtual]

Reimplemented from OwnerdrawnButton.

Definition at line 182 of file desktopbar.cpp.

{
    switch(nmsg) {
       // one click activation: handle button-down message, don't wait for button-up
      case WM_LBUTTONDOWN:
        if (!Button_GetState(_hwnd)) {
            Button_SetState(_hwnd, TRUE);

            SetCapture(_hwnd);

            SendMessage(GetParent(_hwnd), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(_hwnd),0), 0);
        }

        Button_SetState(_hwnd, FALSE);
        break;

       // re-target mouse move messages while moving the mouse cursor through the start menu
      case WM_MOUSEMOVE:
        if (GetCapture() == _hwnd) {
            POINT pt = {GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)};

            ClientToScreen(_hwnd, &pt);
            HWND hwnd = WindowFromPoint(pt);

            if (hwnd && hwnd!=_hwnd) {
                ScreenToClient(hwnd, &pt);
                SendMessage(hwnd, WM_MOUSEMOVE, 0, MAKELPARAM(pt.x, pt.y));
            }
        }
        break;

      case WM_LBUTTONUP:
        if (GetCapture() == _hwnd) {
            ReleaseCapture();

            POINT pt = {GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)};

            ClientToScreen(_hwnd, &pt);
            HWND hwnd = WindowFromPoint(pt);

            if (hwnd && hwnd!=_hwnd) {
                ScreenToClient(hwnd, &pt);
                PostMessage(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(pt.x, pt.y));
                PostMessage(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(pt.x, pt.y));
            }
        }
        break;

      case WM_CANCELMODE:
        ReleaseCapture();
        break;

      default:
        return super::WndProc(nmsg, wparam, lparam);
    }

    return 0;
}

Generated on Thu May 24 2012 06:44:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.