CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2005
    Posts
    16

    HTCLOSE or HTSYSMENU

    In following MSDN documentation
    http://msdn.microsoft.com/en-us/libr...18(VS.85).aspx

    for WM_NCHITTEST message It is stated like this :

    The return value of the DefWindowProc function is one of the following values, indicating the position of the cursor hot spot.
    .....
    .....
    HTCLOSE - 20 - In a Close button.
    .....
    HTSYSMENU - 3 - In a window menu or in a Close button in a child window.
    .....

    But i could not see HTSYSMENU being returned for a "Close button in a child window".
    Tried different scenarios like SDI/MDI , dialog with a child dialog etc .

    Can anybody explain a scenario for HTSYSMENU being returned for a "Close button in a child window".

    Thanks
    Vijesh Vijay

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: HTCLOSE or HTSYSMENU

    I may be wrong but I guess that "In a window menu or in a Close button in a child window" means MDI child frame being maximized (and neither SDI nor dialogs)
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2005
    Posts
    16

    Re: HTCLOSE or HTSYSMENU

    Sorry , it didn't worked.

    Checked by creating a MDI application but mouse over returns HTCLOSE normally for MDI Child. When the window is maximised hovering over the min, max, close doesn't gives messages to the child window. But it returns HTMENU to the MDI parent.

    Any other suggestions ??

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: HTCLOSE or HTSYSMENU

    Yes, I can agree... I couldn't get HTSYSMENU for a Close button either. I always get either HTCLOSE for it (if it is a dialog or non-maximized child frame) or HTMENU for maximized child frame.

    Try to report this problem to "MS Connect"...
    Victor Nijegorodov

  5. #5
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: HTCLOSE or HTSYSMENU

    It's a feature, not a bug.
    Well, its seems that documentation of WM_NCHITTEST / HTSYSMENU has to be a little bit revised.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured