[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu Windows Moving in Windows

From: S.J.Chun
Subject: Re: Menu Windows Moving in Windows
Date: Mon, 10 May 2004 15:04:00 +0900 (KST)

Hi, I think I found way for this. Refer following code. With this, I can (at 
least) move menu window.
I check window type with GSWindowWithNumber and -isKindOfClass:. I do not know 
whether this is
good way. Someone who has more experience on Window programming can make better 
way..., I hope. :-)

Around WIN32ServerEvent.m line 497: (Sorry for this :-)

      NSDebugLLog(@"NSEvent", @"Got Message %s for %d", "LBUTTONDOWN", hwnd);
        if ([GSWindowWithNumber((int)hwnd) 
            WORD yPos = HIWORD(lParam);
            if (yPos < 23 /* MENU_TITLE_HEIGHT */) {
              SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0);
      ev = process_mouse_event(hwnd, wParam, lParam, NSLeftMouseDown);

  ----- Original Message -----
  From: S.J.Chun <address@hidden>
  To: address@hidden
  Sent: Mon, 10 May 2004 13:03:14 +0900 (KST)
  Subject: Menu Windows Moving in Windows

  Hi, attached file is my simple testing code of NSMenu related drawing in 
GNUstepBack bundle. Currently I cannot move
  NSMenu window CORRECTLY. I think we should add similar logic of my attached 
file when WM_LBUTTONDOWN case.
  My idea is, if we can know whether current window is menu (from hwnd) and 
current position of buttondown is in the
  menu title then do SendMessage(...). Am I wrong ? If this is right, can 
anyone let me know how can I know whether
  this hwnd is for Menu or not ?
  Thanks in advance.
  Discuss-gnustep mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]