Can i do this to the message loop in WinMain

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
while (GetMessage (&msg, NULL, 0, 0))
	{
		if (msg.message == WM_USER_SCROLL_ACTIVE)
		{
			ClickActive = FALSE;
		}
		if (msg.message == WM_USER_SCROLL_INACTIVE)
		{
			ClickActive = TRUE;
		}
		if (msg.message == WM_USER_CLICK)
		{
			if (ClickActive == TRUE)
			{
				TranslateMessage (&msg);
				DispatchMessage (&msg);
			}				
		}
		else
		{
			TranslateMessage (&msg);
			DispatchMessage (&msg);
		}
	}


Also if i can do this, is it possible to remove message? because i want to remove WM_USER_CLICK if ClickActive = FALSE.

PS my program is suppose to auto scroll and auto click.
if u dont want the user to do any more input there is an function by the Win32-API...
Topic archived. No new replies allowed.