Page 3 of 6
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 4:33 pm
by Antonio Mart.
Antonio y friends,
Here you are Windows 8 messages for touch devices:
Code: Select all | Expand
#Define WM_NCPOINTERDOWN 578
#Define WM_NCPOINTERUP 579
#Define WM_NCPOINTERUPDATE 577
#Define WM_PARENTNOTIFY 528
#Define WM_POINTERACTIVATE 587
#Define WM_POINTERCAPTURECHANGED 588
#Define WM_POINTERDEVICECHANGE 568
#Define WM_POINTERDEVICEINRANGE 569
#Define WM_POINTERDEVICEOUTOFRANGE 570
#Define WM_POINTERDOWN 582
#Define WM_POINTERENTER 585
#Define WM_POINTERLEAVE 586
#Define WM_POINTERUP 583
#Define WM_POINTERUPDATE 581
#Define WM_POINTERWHEEL 590
#Define WM_POINTERHWHEEL 591
#Define WM_TOUCHHITTESTING 589
Regards
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 5:25 pm
by Antonio Mart.
Of all the events (seventeen), I've only managed to "catch" in the handleEvent these (ten):
Code: Select all | Expand
WM_NCPOINTERDOWN
WM_NCPOINTERUP
WM_NCPOINTERUPDATE
WM_PARENTNOTIFY
WM_POINTERACTIVATE
WM_POINTERDOWN
WM_POINTERUP
WM_POINTERENTER
WM_POINTERLEAVE
WM_POINTERUPDATE
Does anyone have any idea why the rest are not detected?
Saludos
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 6:42 pm
by Antonio Mart.
About ten events that are only treated. It must not be coincidence that
http://social.msdn.microsoft.com/Forums ... e169bac0a5Code: Select all | Expand
switch (Msg)
{
case WM_POINTERENTER:
case WM_NCPOINTERDOWN:
case WM_NCPOINTERUP:
case WM_NCPOINTERUPDATE:
case WM_POINTERACTIVATE:
case WM_POINTERCAPTURECHANGED:
case WM_POINTERDOWN:
case WM_POINTERLEAVE:
case WM_POINTERUP:
case WM_POINTERUPDATE:
...
if (pointertype == PT_TOUCH)
{
POINTER_TOUCH_INFO touchInfo;
if (GetPointerTouchInfo (pointerId, & touchInfo))
{
POINT point;
Point.X = touchInfo.pointerInfo.ptPixelLocationRaw.x;
point.y = touchInfo.pointerInfo.ptPixelLocationRaw.y;
AccNotifyTouchInteraction (hwnd, GetForegroundWindow (), point);
}
}
...
break;
}
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 7:55 pm
by Antonio Mart.
Hi again,
Handling pointer messages on TGet Class. Pointer messages are redirected to Window parent object. Operating successfully !!!!
Code: Select all | Expand
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGet
local oClp, cText, n
#Define uWINDOW_HANDLE(cMsg) (;
::oWnd:HandleEvent(nMsg, nWParam, nLParam);
)
#Translate lPOINTER_MSG(<n>) => ;
If(<n> == nMsg, (uWINDOW_HANDLE(<c>), .t.), .f.)
do case
case lPOINTER_MSG(WM_NCPOINTERDOWN ) // 578
case lPOINTER_MSG(WM_NCPOINTERUP ) // 579
case lPOINTER_MSG(WM_NCPOINTERUPDATE ) // 577
case lPOINTER_MSG(WM_PARENTNOTIFY ) // 528
case lPOINTER_MSG(WM_POINTERACTIVATE ) // 587
case lPOINTER_MSG(WM_POINTERCAPTURECHANGED ) // 588
case lPOINTER_MSG(WM_POINTERDEVICECHANGE ) // 568
case lPOINTER_MSG(WM_POINTERDEVICEINRANGE ) // 569
case lPOINTER_MSG(WM_POINTERDEVICEOUTOFRANGE ) // 570
case lPOINTER_MSG(WM_POINTERUPDATE ) // 581
case lPOINTER_MSG(WM_POINTERDOWN ) // 582
case lPOINTER_MSG(WM_POINTERENTER ) // 585
case lPOINTER_MSG(WM_POINTERLEAVE ) // 586
case lPOINTER_MSG(WM_POINTERUP ) // 583
case lPOINTER_MSG(WM_POINTERWHEEL ) // 590
case lPOINTER_MSG(WM_POINTERHWHEEL ) // 591
case lPOINTER_MSG(WM_TOUCHHITTESTING ) // 589
...................................
Regards
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 8:51 pm
by Antonio Linares
Antonio,
Many thanks for sharing this info. I wasn't aware of these WM_POINTER... new messages.
What I don't see is whats the difference with standard mouse events.
How did you notice that you needed them ? What was not working ?
Are you using your FWH apps on a Windows tablet ?
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 9:54 pm
by Antonio Mart.
Antonio,
Yes, I use a Asus Vivo Tab Tablet with Windows 8 desktop.
I need these WM messages to scrolling in dialogs with the finger "pointer". The pointer finger WM messages are *NOT* similar to mouse messages WM: are different. Looks like this was already the case in Windows 7.
WM_POINTER messages have appeared with Windows 8. The WM touch in Windows 7 messages are legacy.
Thanks for your interest.
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 15, 2013 10:16 pm
by Antonio Linares
Antonio,
I don't have a Windows 8 tablet yet
Where did you buy it ? How much is it ?
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Sat Mar 16, 2013 9:59 am
by Antonio Mart.
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Sun Mar 17, 2013 4:13 pm
by Antonio Mart.
Hi,
Wow!
Clicking get control, it will scroll automatically if you are *NOT* running a drag touch.
regards
Code: Select all | Expand
//--------------------------------------------------------------------------//
METHOD HandleEvent( nMsg, nWParam, nLParam, nLastMsg ) CLASS TGet
STATIC lRunScroll
local oClp, cText, n
Local oTime
#Define uWINDOW_HANDLING(cMsg) (;
;
; // Log("WM.Txt", cMsg),;
;
::oWnd:HandleEvent(nMsg, nWParam, nLParam);
)
#Define lEVENT_(n, c) => If(n == nMsg, (uWINDOW_HANDLING(c), .t.), .f.)
DO CASE
CASE lEVENT_(WM_NCPOINTERDOWN , "WM_NCPOINTERDOWN") // 578
lRunScroll:= .f.
CASE lEVENT_(WM_NCPOINTERUP , "WM_NCPOINTERUP") // 579
lRunScroll:= .f.
CASE lEVENT_(WM_NCPOINTERUPDATE , "WM_NCPOINTERUPDATE") // 577
CASE lEVENT_(WM_PARENTNOTIFY , "WM_PARENTNOTIFY") // 528
CASE lEVENT_(WM_POINTERACTIVATE , "WM_POINTERACTIVATE") // 587
CASE lEVENT_(WM_POINTERCAPTURECHANGED , "WM_POINTERCAPTURECHANGED") // 588
CASE lEVENT_(WM_POINTERDEVICECHANGE , "WM_POINTERDEVICECHANGE") // 568
CASE lEVENT_(WM_POINTERDEVICEINRANGE , "WM_POINTERDEVICEINRANGE") // 569
CASE lEVENT_(WM_POINTERDEVICEOUTOFRANGE , "WM_POINTERDEVICEOUTOFRANGE") // 570
CASE lEVENT_(WM_POINTERUPDATE , "WM_POINTERUPDATE") // 581
lRunScroll:= .f.
CASE lEVENT_(WM_POINTERDOWN , "WM_POINTERDOWN") // 582
CASE lEVENT_(WM_POINTERENTER , "WM_POINTERENTER") // 585
CASE lEVENT_(WM_POINTERLEAVE , "WM_POINTERLEAVE") // 586
CASE lEVENT_(WM_POINTERUP , "WM_POINTERUP") // 583
CASE lEVENT_(WM_POINTERWHEEL , "WM_POINTERWHEEL") // 590
CASE lEVENT_(WM_POINTERHWHEEL , "WM_POINTERHWHEEL") // 591
CASE lEVENT_(WM_TOUCHHITTESTING , "WM_TOUCHHITTESTING") // 589
// .........................................................
// .........................................................
// .........................................................
CASE nMsg == WM_SETFOCUS .AND. !lUSAR_TIMER .AND. lONFOCUS_MOSTRAR_TECLADO
// Automatic Scroll Dialog scroll oGet controll most top than TabTip keyboard
lRunScroll:= .t.
::GotFocus( GetFocus())
DEFINE TIMER oTime INTERVAL 10 OF Self:oWnd ;
ACTION (If(lRunScroll, AutomaticScrollDlg(Self), nil), oTime:Deactivate())
ACTIVATE TIMER oTime
ENDCASE
return ::Super:HandleEvent( nMsg, nWParam, nLParam )
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Mar 22, 2013 5:24 pm
by Antonio Mart.
Hi again,
Code: Select all | Expand
//-------------------------------------------------------------------------//
// For Windows 8.
FUNCTION ShowInputPanel()
*
ShellExecute(, "open", "tabtip.exe")
*
RETURN NIL
*
//-------------------------------------------------------------------------//
// For Windows 8.
FUNCTION HideInputPanel()
Local hWndInputPanel
*
hWndInputPanel:= FindWindow("IPTip_Main_Window")
PostMessage(hWndInputPanel, WM_SYSCOMMAND, SC_CLOSE, 0)
* (¿ SysRefresh() ? )
RETURN NIL
Regards
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Thu Mar 28, 2013 5:35 pm
by Chapman
Antonio Linares wrote:Antonio,
I don't have a Windows 8 tablet yet
Where did you buy it ? How much is it ?
You can get it online.. You have to good balance in your account for getting a best tablet.
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Sun Apr 14, 2013 7:57 am
by Otto
Hello Antonio Mart.,
this is a powershell script to change 'ScrollWidth' and 'ScrollHeight' which is working for me.
You read the different ntuser.dat files into a temp User in registry set the values and save back.
Best regards,
Otto
Code: Select all | Expand
clear host
$null = New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS
Get-PSDrive -PSProvider Registry
Push-Location
$array = @("UserName1", "UserName2", "UserName3", "UserName4" )
foreach ($element in $array) {
$element
$cQuelle = ' c:\users\' + $element + '\ntuser.dat'
$pfad = 'HKU:\Testuser\Control Panel\Desktop\WindowMetrics'
reg LOAD HKU\Testuser $cQuelle
Write-Host $cQuelle
Write-Host $pfad
Set-ItemProperty -Path $pfad -Name 'ScrollHeight' -Value -547
Set-ItemProperty -Path $pfad -Name 'ScrollWidth' -Value -547
Set-Location $pfad
reg UNLOAD HKU\Testuser
}
Pop-Location
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Mon Apr 15, 2013 2:07 pm
by Antonio Mart.
Hello Otto,
Thanks for your input. I'll try.
For me the problems were reduced with the scrollbar.
I wanted to remove the scrollbar of the dialogues. Because you can not delete them then I thought of greater width.
But then I did something: hide! How to hide, if Windows does not allow it?
My forms (on tablet) consist of a title and a folder, without borders, below. Each folder has a scrollable dialog with controls that interact with the Tablet Input Panel (virtual keyboard). What I do is size the size of the dialogue out of the folder and so the scrollbars are not shown. Of course, the user can navigate within the dialogue touching style. Is like a Windows 8 style, forms and navigation;-)
Regards
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Fri Apr 26, 2013 7:24 pm
by Antonio Mart.
Hi,
Code shows how to
hide a dialog when it loses focus. The function must be placed in the Init event.
Below pictures of a
form with scrolling style touch with touch movement and without scroll bars and with automatic deployment TabTip.
Code: Select all | Expand
//-------------------------------------------------------------------------//
STATIC FUNCTION DlgEndOnLostFocus(oDlg)
Local nI, o
Local bLost, aAllControls:= {}
CollectControls(oDlg, @aAllControls)
#Define lFOCUS_APPLICATION ( oWndFromHwnd(GetFocus()) != NIL )
#Define lFOCUS_NOT_DIALOG ( AScan(aAllControls, {|o| o:hWnd == GetFocus()}) == 0 )
#Define ON_FOCUS_LOST If(lFOCUS_APPLICATION .AND. lFOCUS_NOT_DIALOG, oDlg:End(), NIL)
FOR nI:= 1 to len(aAllControls)
o:= aAllControls[nI]
IF O:bLostFocus != NIL
bLost:= o:bLostFocus
o:bLostFocus:= {|x1, x2, x3, x| x:= Eval(bLost, x1, x2, x3),;
ON_FOCUS_LOST,;
x}
ELSE
o:bLostFocus:= {|x1, x2, x3, x| x:= NIL,;
ON_FOCUS_LOST,;
x}
ENDIF
NEXT
RETURN NIL
*
//-------------------------------------------------------------------------//
FUNCTION CollectControls(oDlg , aAllControls)
LOCAL nI, nJ, Obj1 , Obj2
Aadd(aAllControls, ODLG)
FOR nI:= 1 TO Len(oDlg:aControls)
Obj1:= oDlg:aControls[nI]
Aadd(aAllControls, Obj1)
IF Obj1:ClassName == "TFOLDER"
FOR nJ:= 1 TO Len(Obj1:aDialogs)
Obj2:= Obj1:aDialogs[nJ]
CollectControls(Obj2 , @aAllControls)
NEXT
ENDIF
NEXT
RETURN
Re: Tablet and form style for Windows 8 (desktop ver.)
Posted: Sat Apr 27, 2013 2:49 pm
by Antonio Mart.
A bit more beautiful