HP TouchSmart 9100 - Business PC Application Manual page 18

Resources for developing touch-friendly applications for hp business touch-enabled desktops
Hide thumbs Also See for TouchSmart 9100 - Business PC:
Table of Contents

Advertisement

Register to receive touch input messages:
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
// pass touch messages to the touch handler
case WM_TOUCH:
OnTouch(hWnd, wParam, lParam);
break;
Handle the messages:
LRESULT OnTouch(HWND hWnd, WPARAM wParam, LPARAM lParam ){
BOOL bHandled = FALSE;
UINT cInputs = LOWORD(wParam);
PTOUCHINPUT pInputs = new TOUCHINPUT[cInputs];
if (pInputs){
if (GetTouchInputInfo((HTOUCHINPUT)lParam, cInputs, pInputs,
sizeof(TOUCHINPUT))){
for (UINT i=0; i < cInputs; i++){
TOUCHINPUT ti = pInputs[i];
//do something with each touch input entry
}
bHandled = TRUE;
}else{
/* handle the error here */
}
delete [] pInputs;
}else{
/* handle the error here, probably out of memory */
}
18

Advertisement

Table of Contents
loading

This manual is also suitable for:

Touchsmart dx9000Touchsmart 9100

Table of Contents