Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 990849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:00:33+00:00 2026-05-16T06:00:33+00:00

Let’s suppose a click on a normal WS_OVERLAPPEDWINDOW window’s title bar, followed by a

  • 0

Let’s suppose a click on a normal WS_OVERLAPPEDWINDOW window’s title bar, followed by a few mouse drags and a button release.

Summary of messages obtained from Spy :

WM_SYSCOMMAND (SC_MOVE)

WM_MOUSEMOVE (*)

WM_CAPTURECHANGED

WM_ENTERSIZEMOVE

WM_MOUSEMOVE (*)

.
.
.

WM_MOUSEMOVE (*)

WM_LBUTTONUP (*)

WM_CAPTURECHANGED

WM_EXITSIZEMOVE

WM_SYSCOMMAND (return)

I’m trying to understand the messages with (*). They don’t make sense to me since :

1) The mouse movements and the button release are NOT in the window client area. Therefore, instead of WM_MOUSEMOVE and WM_LBUTTONUP, I should have WM_NCMOUSEMOVE and WM_NCLBUTTONUP.

2) If I put a break, on those messages (WM_MOUSEMOVE and WM_LBUTTONUP), in my window procedure, I don’t intercept theses mesages while dragging the window’s title bar !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:00:33+00:00Added an answer on May 16, 2026 at 6:00 am

    1) The mouse movements and the button release are NOT in the window client area. Therefore, instead of WM_MOUSEMOVE and WM_LBUTTONUP, I should have WM_NCMOUSEMOVE and WM_NCLBUTTONUP.

    I’m not sure about this one, but I can guess: maybe the system always sends WM_MOUSEMOVE, and this is converted to WM_NCMOUSEMOVE somewhere along the way (depending on the result of WM_NCHITTEST).

    During a drag operation, your application doesn’t get to see these messages anyway (as you noticed) so there’s no point in doing the conversion.

    2) If I put a break, on those messages (WM_MOUSEMOVE and WM_LBUTTONUP), in my window procedure, I don’t intercept theses mesages while dragging the window’s title bar !!!

    Recall that WM_MOUSEMOVE and friends are posted, not sent. That means they will usually flow through your own message loop, and arrive at your window procedure via DispatchMessage.

    When you start to drag a window, the application enters a so-called modal message loop. This loop will not return until the drag is finished, so until that time, your own message loop will not run! The WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE messages are sent to the window procedure when the modal loop is entered and exited, respectively.

    Now, it could be that the modal loop also dispatches messages to your window procedure; but (at least for WM_MOUSEMOVE and such) it does not. And it shouldn’t, because the modal loop itself is handling those messages — passing them to the winproc would probably cause confusion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say you create a wizard in an HTML form. One button goes back,
Let's say I'm building a data access layer for an application. Typically I have
Let's say you have a class called Customer, which contains the following fields: UserName
Let me try to explain what I need. I have a server that is
Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers>
Let's say I have a drive such as C:\ , and I want to
Let's say I'm writing a PHP (>= 5.0) class that's meant to be a
Let's aggregate a list of free quality web site design templates. There are a
Let's say that we have an ARGB color: Color argb = Color.FromARGB(127, 69, 12,
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.