Home > Software engineering >  About to join in the rolling news messagebox problem solving
About to join in the rolling news messagebox problem solving

Time:09-27

Case WM_VSCROLL:
The switch (LOWORD (wParam))
{
Case SB_LINEDOWN:
//please note here
Linedown MessageBox (HWND, TEXT (" "), TEXT (" scrollwindow "), MB_OK);
break;
Default:
break;
}

This is a piece of code of handling WM_VSCROLL message, my idea is that the mouse to click as shown in figure arrow down the slider on the scroll bar will pop up a messagebox dialog box, but now encountered a problem: my mouse click down on the scroll bar slider button and then release the left mouse button, as long as the mouse in that position again not removed (when did not press the left mouse button), will popup hint window, that don't understand is why? With what method can realize my idea

CodePudding user response:

Trigger pull down scroll bar, is it mean that the mouse to click the can down should be triggered WM_LBUTTONDOWN message every time,

CodePudding user response:

Just tried it on, do have a problem, and the problems when the mouse is not a take away box, and then back again to continue playing box
My idea is that MessageBox is blocked, makes the code cannot continue to perform,
You can put your MessageBox to:
1. Create a thread to a AfxBeginThread (MessageProc, this); Then the thread function just bounced
 
UINT MessageProc (LPVOID lpParam)
{
MessageBox (NULL, TEXT (" linedown "), TEXT (" scrollwindow "), MB_OK);
return 0;
}


2. Send message to the main interface, the interface MessageBox after receiving the message

CodePudding user response:

See post
http://bbs.csdn.net/topics/392264944
  • Related