Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdd lib by pragma Pin
_Flaviu10-Jun-15 0:32
_Flaviu10-Jun-15 0:32 
AnswerRe: Add lib by pragma Pin
David Crow10-Jun-15 2:46
David Crow10-Jun-15 2:46 
GeneralRe: Add lib by pragma Pin
_Flaviu10-Jun-15 23:25
_Flaviu10-Jun-15 23:25 
Questionbad pointer error when I read a class object with CString member Pin
manoharbalu8-Jun-15 20:13
manoharbalu8-Jun-15 20:13 
Answer[Repost] Pin
Sascha Lefèvre8-Jun-15 20:36
professionalSascha Lefèvre8-Jun-15 20:36 
SuggestionRe: bad pointer error when I read a class object with CString member Pin
David Crow9-Jun-15 5:37
David Crow9-Jun-15 5:37 
AnswerRe: bad pointer error when I read a class object with CString member Pin
Stefan_Lang12-Jun-15 0:13
Stefan_Lang12-Jun-15 0:13 
QuestionWindows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob169727-Jun-15 7:10
bob169727-Jun-15 7:10 
Windows 7 panning via a touchscreen used to scroll the client area for MFC Scrollview apps without any special code alterations but Windows 8.1 only scrolls the windows scrollbar while the view does not get scrolled until I invalidate the whole client area explicitly. I've tried various application types and am currently using the SysMets3 example from the Petzold Win32 "Programming Windows" book CD to study the behavior without MFC handling to see what is up.

Most Win32 scrolling examples are still basically the good old Petzold model when I follow the guidelines for "Legacy" apps in the Gestures and Touch MSDN technical articles so I'm assuming that approach is still supported. I've tried the disabling "Flicks" article and studied every line of code between current examples and the SysMets example and made sure there is case label for SB_THUMBTRACK and SB_THUMBPOSITION and all the other boilerplate case stuff.

In the end, debugging has revealed that the section that ultimately calls ScrollWindow() never runs because the scroll position and the scroll track position come into the WM_VSCROLL handler with the same value so the follow snippet no longer runs under Window 8.1 like it used to for touchscreens on previous OS versions...

...
// Typical Switch and Case labels above which use GetScrollInfo structure with SIF_ALL..etc..

si.fMask = SIF_POS;
SetScrollInfo (hWnd, SB_VERT, &si, TRUE) ;
GetScrollInfo (hWnd, SB_VERT, &si) ;

// If the position has changed, scroll the window and update it
if (si.nPos != iVertPos)
{            
	ScrollWindow (hWnd, 0, cyChar * (iVertPos - si.nPos), NULL, NULL) ;
	UpdateWindow (hWnd) ;
}
...


I'm testing this app on a Windows Surface (Gen 1) with Windows 8.1 with all the Windows Updates applied and Windows 8.1 Update installed back when the machine image was created. Visual C++ 2008 Professional with all known SP's installed.

I've even effectively removed all of the WM_VSCROLL code and tried returning from the WndProc with 0 and tried letting the default handler take it's course...either way the scrollbar moves anyway as if windows is setting the scroll position and scroll tracking position to the same value by some back door that breaks the ability to call ScrollWindow (or ScrollWindowEx) by traditional means (being able to determine how much to ScrollWindow().

Has anyone witnessed this and found a way around it without needing to add Touch/Gesture specific handlers in there?

Thanks in advance.

UPDATE: Just confirmed that this behavior continues to exist on Windows 10 Pro Technical Preview so it looks like Microsoft made some change at some point to make it almost impossible to benefit from the default legacy mapping of Touch Panning Gesture mappings to WM_VSCROLL messages without resorting to invalidating the entire client area.
Hopefully I'm missing some important detail and someone can set me straight.

modified 8-Jun-15 10:40am.

AnswerRe: Windows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob1697220-Jun-15 3:31
bob1697220-Jun-15 3:31 
Questionlinked list in C Pin
a random user7-Jun-15 4:28
a random user7-Jun-15 4:28 
AnswerRe: linked list in C Pin
Chris Losinger9-Jun-15 4:55
professionalChris Losinger9-Jun-15 4:55 
Questionneed help with linked structs at C language Pin
a random user5-Jun-15 23:57
a random user5-Jun-15 23:57 
AnswerRe: need help with linked structs at C language Pin
Richard MacCutchan6-Jun-15 0:29
mveRichard MacCutchan6-Jun-15 0:29 
GeneralRe: need help with linked structs at C language Pin
a random user6-Jun-15 0:56
a random user6-Jun-15 0:56 
GeneralRe: need help with linked structs at C language Pin
Frankie-C6-Jun-15 6:42
Frankie-C6-Jun-15 6:42 
GeneralRe: need help with linked structs at C language Pin
a random user6-Jun-15 7:03
a random user6-Jun-15 7:03 
GeneralRe: need help with linked structs at C language Pin
Frankie-C6-Jun-15 7:12
Frankie-C6-Jun-15 7:12 
GeneralRe: need help with linked structs at C language Pin
a random user6-Jun-15 7:20
a random user6-Jun-15 7:20 
GeneralRe: need help with linked structs at C language Pin
a random user6-Jun-15 7:25
a random user6-Jun-15 7:25 
GeneralRe: need help with linked structs at C language Pin
Frankie-C7-Jun-15 5:33
Frankie-C7-Jun-15 5:33 
GeneralRe: need help with linked structs at C language Pin
a random user7-Jun-15 6:32
a random user7-Jun-15 6:32 
GeneralRe: need help with linked structs at C language Pin
Frankie-C7-Jun-15 7:38
Frankie-C7-Jun-15 7:38 
QuestionRe: need help with linked structs at C language Pin
David Crow8-Jun-15 3:20
David Crow8-Jun-15 3:20 
AnswerRe: need help with linked structs at C language Pin
a random user21-Jun-15 9:37
a random user21-Jun-15 9:37 
QuestionThreading Issues Pin
ForNow5-Jun-15 5:09
ForNow5-Jun-15 5:09 

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.