Presumeably WM_MOUSEMOVE did work correctly at some point as you're used this code for some time. So what has changed since it last worked? How do you know that WM_MOUSEMOVE is only sometimes activated - what's it not doing that you expect it to do? Have you logged the msg's being received ? Is there a pattern to when WM_MOUSEMOVE isn't being activated as expected?

Code:

HBRUSH g_hbrBackground = CreateSolidBrush(NULL_BRUSH);

For every message received, you are creating a new brush but only deleting the current one in some cases in WM_CTLCOLORSTATIC - you have a resource leak.

January 30th, 2014, 10:33 AM

Cambalinho

Re: [win32] - mouse move message seems not be activated :(

Quote:

Originally Posted by 2kaud

Presumeably WM_MOUSEMOVE did work correctly at some point as you're used this code for some time. So what has changed since it last worked? How do you know that WM_MOUSEMOVE is only sometimes activated - what's it not doing that you expect it to do? Have you logged the msg's being received ? Is there a pattern to when WM_MOUSEMOVE isn't being activated as expected?

Code:

HBRUSH g_hbrBackground = CreateSolidBrush(NULL_BRUSH);

For every message received, you are creating a new brush but only deleting the current one in some cases in WM_CTLCOLORSTATIC - you have a resource leak.

So is the problem you aren't receiving the WM_MOUSEMOVE message or it is being received but it isn't being processed as expected? What have you changed since this was last working?

January 30th, 2014, 10:52 AM

Cambalinho

Re: [win32] - mouse move message seems not be activated :(

Quote:

Originally Posted by 2kaud

So is the problem you aren't receiving the WM_MOUSEMOVE message or it is being received but it isn't being processed as expected? What have you changed since this was last working?

i just add more tools nothing more. i left your code. do you need the entire class?

January 30th, 2014, 10:56 AM

2kaud

Re: [win32] - mouse move message seems not be activated :(

So if the text is changed when you comment out the code, the problem is either in TrackMouse(), MouseEnter(), or MouseMove(). So you'll need to debug the code to see where the problem occurs. What has changed since it last worked?

January 30th, 2014, 11:02 AM

Cambalinho

Re: [win32] - mouse move message seems not be activated :(

Quote:

Originally Posted by 2kaud

So if the text is changed when you comment out the code, the problem is either in TrackMouse(), MouseEnter(), or MouseMove(). So you'll need to debug the code to see where the problem occurs. What has changed since it last worked?

the text is changed the i do the mouse leave... see these code(very code is commented):

these strange problem i only see it with mouse move. i said that i left you code, but i delete the log file code... sorry

January 30th, 2014, 12:06 PM

2kaud

Re: [win32] - mouse move message seems not be activated :(

Well now seems like a good time to get to grips with debugging windows code! :D

January 30th, 2014, 12:10 PM

Cambalinho

Re: [win32] - mouse move message seems not be activated :(

Quote:

Originally Posted by 2kaud

Well now seems like a good time to get to grips with debugging windows code! :D

the problem isn't learn how use the debug... you know that code you did, is advanced :(
so i can't acomplish that so easy :(

January 30th, 2014, 01:08 PM

Cambalinho

Re: [win32] - mouse move message seems not be activated :(

after more tests i found the problem. the problem was with window and not with label. was these extended style: WS_EX_COMPOSITED.
so i have 1 question: if the WS_EX_COMPOSITED mess with mouse move, how can i avoid flickers on controls?(i'm not speaking about WM_PAINT, on these situation i must use the double buffer way)