Solved

WM_TIMER disabled On TitleBar MouseDown?

Posted on 1997-11-02
2
440 Views
Last Modified: 2013-11-20
I have a modeless dialog which I use a WM_TIMER message to perform socket processing.  The problem I am having is that if the left mouse button is held down on the dialog title bar, I no longer receive the WM_TIMER messages.  If the dialog is moved, I once again receive the messages, but if the button is simply held down and not released, I do not receive the WM_TIMER messages.

Is there something I can do that will allow the WM_TIMER messages to be dispatched in this case.  I do not want to
prevent the user from moving the dialog, so ignoring WM_NCLBUTTONDOWN messages is not an option.
0
Comment
Question by:TAdkins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1309216
You might want to try using the timer callback instead of using the WM_TIMER message. If you specify NULL for the HWND of ::SetTimer, then you need to supply a function that gets called periodically. Another possibility would be to use the asynchronous version of the socket API.

The problem is that when the default wndproc for windows gets the WM_NCLBUTTONDOWN message, it goes into its own modal message loop to move the window, draw the window, etc. The modal message loop does not terminate until the WM_NCLBUTTONUP message. In the meantime, the WM_TIMER message is not seen in your message loop.

One final probability. You can handle WM_NCLBUTTONDOWN yourself, but this would require quite a bit of work.
0
 

Author Comment

by:TAdkins
ID: 1309217
I tried using ::SetTimer with a callback.  It appears that
it still uses the WM_TIMER message.  The documentation for
::SetTimer says that is calls the callback when it processes
WM_TIMER.  Any other ideas?

We are using CAsyncSocket.  We are trying to using the timer
proc to go any process the callbacks from CASyncSocket.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
pre4 challenge 19 116
Use of condition with 'serial' in ansible 2 102
Way to decrease size of apk file 9 132
Windows shortcut location resolution on double click open 4 77
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question