misc pointing devices

  • Thread starter Thread starter Vegan Fanatic
  • Start date Start date
V

Vegan Fanatic

Guest
Working on UI code in my old trusty Win32 project I have run into a lot more complexity

First we need to #define some more objects

// Two #defines are needed for tablet PC, and digital stylus like the Wacom pads
#define WM_TABLET_DEFBASE 0x02C0
#define WM_TABLET_FLICK (WM_TABLET_DEFBASE + 11)


I own a Wacom pad, but I use it with my finger to emulate a touch screen. The pad comes with a stylus though which is absolute position and its useful when doing a lot of editing in graphics etc.

Now I have even more code to work on...

case WM_GESTURE: // Deal with the touch users
// http://msdn.microsoft.com/en-us/library/windows/desktop/dd940543%28v=vs.85%29.aspx
switch (LOWORD (wParam)) {
case GID_ZOOM:
break;
case GID_PAN:
break;
case GID_ROTATE:
break;
case GID_TWOFINGERTAP:
break;
case GID_PRESSANDTAP:
break;
}
return 0;
case WM_TABLET_FLICK:
return 0;


this is a paint module I use to develop around

case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
out << activelist.size(); // need to cast various objects
str = out.str() + " active Window(s)"; // paste together the final string
TextOut(hdc, 0, curpos, str.c_str(), int(str.size())); // Display a string
curpos += 2 * rowheight; // skip a line
for (int i = 0; i < activelist.size()-1; i++) {
out.str("");
out << activelist.titlebar << " " << activelist.r << " by " << activelist.c;
str = out.str();
TextOut(hdc, 0, curpos, str.c_str(), int(str.size())); // Display a string
curpos += rowheight;
};
SetScrollRange (hwnd, SB_VERT, 0, (activelist.size())*rowheight, TRUE);
EndPaint(hwnd, &ps);
return 0;


So what do I need to do to support rotate, i.e. two fingers or maybe even detect a event (such as a pad being turned)

I still have not got around to WM_RESIZE either.....













Corsair Carbide 300R with window & Corsair TX850V2 70A@12V

Asus M5A99FX PRO R2.0 CFX/SLI & AMD Phenom II 965 C3 Black Edition @ 4.0 GHz & G.SKILL RipjawsX DDR3-2133 8 GB

GTX 260 SLI 216 core (GT200 Tesla) & Asus PA238QR IPS LED HDMI DP 1080p

ST2000DM001 & Windows 7 x64 Enterprise

Microsoft Wireless Desktop 2000 & Wacom Bamboo CHT470M

Place your rig specifics into your signature like I have, makes it 100x easier to understand!


Hardcore Games, Legendary is the Only Way to Play

Continue reading...
 
Back
Top