Click here to Skip to main content
15,917,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHelp with RAW TouchScreen DLL Pin
sodevrom4-Oct-08 12:46
sodevrom4-Oct-08 12:46 
AnswerRe: Help with RAW TouchScreen DLL Pin
Bram van Kampen4-Oct-08 13:44
Bram van Kampen4-Oct-08 13:44 
GeneralRe: Help with RAW TouchScreen DLL Pin
sodevrom4-Oct-08 13:53
sodevrom4-Oct-08 13:53 
GeneralRe: Help with RAW TouchScreen DLL Pin
Bram van Kampen4-Oct-08 14:53
Bram van Kampen4-Oct-08 14:53 
GeneralRe: Help with RAW TouchScreen DLL Pin
sodevrom4-Oct-08 14:59
sodevrom4-Oct-08 14:59 
AnswerRe: Help with RAW TouchScreen DLL Pin
cmk5-Oct-08 1:10
cmk5-Oct-08 1:10 
GeneralRe: Help with RAW TouchScreen DLL Pin
sodevrom23-Oct-08 13:07
sodevrom23-Oct-08 13:07 
GeneralRe: Help with RAW TouchScreen DLL Pin
sodevrom24-Oct-08 13:09
sodevrom24-Oct-08 13:09 
I managed to make it work.
I didn't have to make ANY Changes (add a new raw device).
The check :
riRawInput.data.mouse.usFlags == MOUSE_MOVE_RELATIVE is for mouse
and the check
riRawInput.data.mouse.usFlags == 3 is for touch screen.

After getting this, you will have to calibrate the device, and all will be perfect :

1. Prompt the user to touch the upper left corner of the video screen.
2. Save the coordinates returned as TOUCH_UL_X and
TOUCH_UL_Y.
3. Prompt the user to touch the lower right corner of the video screen.
4. Save the coordinates returned as TOUCH_LR_X and
TOUCH_LR_Y.
A good way to prompt the user to touch the corners is to draw a
border around the edge of the screen and prompt the user to touch
each point using a target in the respective corner and text centered
on the screen.
5. Calculate the four calibration parameters as follows:
OFFSET_X = TOUCH_UL_X
OFFSET_Y = TOUCH_UL_Y
SCALE_X = VIDEO_MAX_X / (TOUCH_LR_X -
TOUCH_UL_X)
SCALE_Y = VIDEO_MAX_Y / (TOUCH_LR_Y -
TOUCH_UL_Y)
6. Save the four calibration parameters to a nonvolatile storage area, if
available. If none is available, the calibration procedure must be
followed each time the system is powered up.
The floating point calibration procedure is now complete. In your
application program, convert the touch coordinates reported by the
touch system into the equivalent video coordinates with these equations:
VIDEO_X = SCALE_X * (TOUCH_X - OFFSET_X)
VIDEO_Y = SCALE_Y * (TOUCH_Y - OFFSET_Y)
QuestionDigital Mars C++ Compiler Pin
Matthew Faithfull4-Oct-08 9:25
Matthew Faithfull4-Oct-08 9:25 
Questionsockets - chat server console program from articles - in mfc with error Pin
simon alec smith4-Oct-08 7:05
simon alec smith4-Oct-08 7:05 
AnswerRe: sockets - chat server console program from articles - in mfc with error Pin
CPallini4-Oct-08 7:11
mveCPallini4-Oct-08 7:11 
GeneralRe: sockets - chat server console program from articles - in mfc with error Pin
simon alec smith4-Oct-08 7:27
simon alec smith4-Oct-08 7:27 
AnswerRe: sockets - chat server console program from articles - in mfc with error Pin
Moak6-Oct-08 23:25
Moak6-Oct-08 23:25 
Questionlist <SOCKET> --- got code statement (list) from a socket article in console, ----> in MFC a compile error [modified] Pin
simon alec smith4-Oct-08 6:26
simon alec smith4-Oct-08 6:26 
AnswerRe: (list <-SOCKET->) --- got code from a socket article in console, ----> in MFC compile error Pin
CPallini4-Oct-08 6:37
mveCPallini4-Oct-08 6:37 
GeneralRe: (list <-SOCKET->) --- got code from a socket article in console, ----> in MFC compile error Pin
simon alec smith4-Oct-08 6:45
simon alec smith4-Oct-08 6:45 
QuestionHow can i convert "Convert CString[] to char[]" ? Pin
Le@rner4-Oct-08 2:10
Le@rner4-Oct-08 2:10 
AnswerRe: How can i convert "Convert CString[] to char[]" ? Pin
Jaime Olivares4-Oct-08 2:40
Jaime Olivares4-Oct-08 2:40 
AnswerRe: How can i convert "Convert CString[] to char[]" ? Pin
CPallini4-Oct-08 2:42
mveCPallini4-Oct-08 2:42 
AnswerRe: How can i convert "Convert CString[] to char[]" ? Pin
David Crow4-Oct-08 3:27
David Crow4-Oct-08 3:27 
QuestionHow to display the program code as output using C or C++ Pin
Karan_TN4-Oct-08 1:02
Karan_TN4-Oct-08 1:02 
AnswerRe: How to display the program code as output using C or C++ Pin
enhzflep4-Oct-08 1:10
enhzflep4-Oct-08 1:10 
GeneralRe: How to display the program code as output using C or C++ Pin
Karan_TN4-Oct-08 1:16
Karan_TN4-Oct-08 1:16 
GeneralRe: How to display the program code as output using C or C++ Pin
enhzflep4-Oct-08 1:39
enhzflep4-Oct-08 1:39 
GeneralRe: How to display the program code as output using C or C++ Pin
Karan_TN4-Oct-08 2:04
Karan_TN4-Oct-08 2:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.