yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
TouchLockPro has 2 mechanisms to lock, and because you have a Touch Pro also HTCLockAPI = 1 should work. See for more details http://www.zuinigerijder.com/Settings.html#4.6

There is also an additional way of disabling the TouchPanel:

DoubleTouchPanelLock (DoubleTouchPanelLock = 1)

But for some people this gives problems (I have a Touch Diamond and for me it works).

If it still does not work, you can enable debug logging, reproduce the scenario and post the log file \TouchLockPro.log.txt in the root of the phone memory.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I see you did find out something here in Diamond2 Zoombar as buttons .
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
Yep! I'm almost done too! I'm implementing it in my own personal lite version of TLP (CobaltShield) and once it's done I'll give it to you for implementation into TLP if you like. TLP with a slide 2 unlock feature = the best possible screen locking program there could be. I'm syked!
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
Touch Pro2 Slide 2 Unlock via Zoom Bar

Done!!!

Well. I'm done if testing doesn't count. I'm going to try it for a few days to make sure. But it's been working so far.
[Touch Diamond, MDA Compact IV Themes and Apps] germanxdafan:
feature request

Hi ZuinigeRijder,

i dont know if enybody has allredy asked for this but i didnt find this under your wishlist. ;)

I think it would be nice if you could pick up the phone as soon as TLP unlocks.

So if somebody calls you, you just have to unlock and speek, just like on the iphone...:cool:

Would this be possible?

EDIT: This shouldnt work with the ligthsensor^^

If TLP unlocks with the lightsensor -> dont pick up
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Great. I will incorporate this one in a next test version. I do not have a phone with a ZoomBar, so probably I am going to ask if people can test a test version first.

In the other thread you had it about:

Message WParam Meaning

WM_USER+209 00000000 touch

WM_USER+209 00000001 release

WM_USER+200 00000800 slide right

WM_USER+200 00000900 slide left

Is it also possible to detect a touch in your mailed code?

Because that would mimic the triple touch of the NavSensor.

Also can you detect the slide right or slide left in the new approach, because that would mimic the NavSensor swipe left or right.

I am very happy that you found a way to detect the ZoomBar operations :)

Thanks for your hard work :D
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Yes, this is possible. I will add it to the wish list.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Test version ZoomBar unlock 2.8.3

Cobalitikus has found a way to detect the ZoomBar slide and provided me the needed code. I integrated this in a TouchLockPro test version, because I do have a Touch Diamond, which does not have a ZoomBar. However, I would like to know if it works as expected on a Diamond 2, Touch Pro 2, HD2, which do have a zoombar.

I did install the test version on my Diamond and it does not harm ;) But of course I do not have a zoombar. I hope now you can unlock your phone via the ZoomBar slide :confused:

Many thanks to Cobaltikus for finding a way to detect the ZoomBar slide :) Now hope it works :confused:
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
I have found that although the code I wrote does work most of the time for me, it does not work all of the time. I am looking into some alternate/better methods. Doing lots of studying. And will have something here in a day or so hopefully.

On a more technical note, the method I used works differently depending on which application currently has focus. You can see in HKLM\Software\HTC\SmartTouch\[app name] that different apps use the zoom bar in different ways which causes my code to not work because I only implemented one method. If TouchLockPro always had focus while locked then this would be very easy to implement, but it is difficult to make any ce app always have focus.

Possible methods

Monitor the message queue for the window with the classname "HTCSmartTouchDll" using subclassing. I might be able to do this. It would need to run in the same process as this window which is services.exe so I would need to write another service. I am going to try this and see if it works. Any pointers from someone who has experience writing services or doing subclassing would be appreciated, otherwise I can figure it out in time. Hopefully soon.

Use a Journal Hook to monitor messages sent to all windows. This is what I am currently using and what is being implemented in the test TLP version, but the CE version of Journal Hook is not documented and it seems to be incomplete. It is supposed to populate a structure member with a handle to the window that is receiving the message but that is always NULL and does not pick up on messages sent to the window with the classname "HTCSmartTouchDll"

Use a window hook. But this only works on windows in the current process and only when it has focus.

something I haven't thought of yet.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I did subclass TF3D home screen in an older version of TouchLockPro, namely 2.2.7.

In revision 74 of Clock.cpp it was removed, in 73 I used subclassing. And I did not need to make a service.

void SetCapacitiveWndProc() {
LOGDEBUG("===== SetCapacitiveWndProc() ======");
HWND foreground = GetForegroundWindow();
if (foreground == NULL) {
LOGDEBUGDETAILED("No foreground window, using taskbar");
foreground = g_hTaskBarWnd;
}
if (WndProcListHas(foreground)) {
LOGDEBUGDETAILED("Already set");
return;
}
WNDPROC wndproc = (WNDPROC)GetWindowLong(foreground, GWL_WNDPROC);
WndProcListAdd(foreground, wndproc);
SetWindowLong(foreground, GWL_WNDPROC, (LONG)CapacitiveWndProc);
CapacitiveTouchSensorOpen(foreground);
}

So instead of GetForegroundWindow() you can subclass "HTCSmartTouchDll".
[Touch Diamond, MDA Compact IV Themes and Apps] Gooser711:
Any instructions on how to activate zoombar slide? I don't see any mention of it in the settings or looking through the registry settings...
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
AWESOME!! It works! I tried this originally before trying anything else and it didn't work before. I must have been doing something wrong. But the documentation said that the subclassed window must be running in the same process. Guess the documentation was wrong.

I'll provide some new code for you shortly - maybe tomorrow - it's late - gotta get up for work in 4 hours... uugh.
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
Finished - This is much better than before - and simpler too!

LRESULT CALLBACK ZoomBarSubClassProc(HWND, UINT, WPARAM, LPARAM);
WNDPROC lpfnOldWndProc;
HWND hHTCSmartTouchDll;

int iZoom;

LRESULT CALLBACK ZoomBarSubClassProc(HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
switch (message)
{
case (WM_USER+200):
// slide
if (wParam == 0x900)
{ // left
iZoom = 0;
}
else if (wParam == 0x800)
{ // right
iZoom += 1;
}
else
{ // bad data - never happens
iZoom = 0;
}
break;
case (WM_USER+209):
// touch or release
if (wParam == 0x0)
{ // touch
iZoom = 0;
}
else if (wParam == 0x1)
{ // release
if (iZoom >= 10)
{
// DO YOUR UNLOCKING HERE
}

iZoom = 0;
}
else
{ // bad data - never happens
iZoom = 0;
}
break;
}

return CallWindowProc(lpfnOldWndProc, hWnd, message, wParam, lParam);
}

void StartZoomBar()
{
hHTCSmartTouchDll = FindWindow(_T("HTCSmartTouchDll"), NULL);
lpfnOldWndProc = (WNDPROC)GetWindowLong(hHTCSmartTouchDll, GWL_WNDPROC);
SetWindowLong(hHTCSmartTouchDll, GWL_WNDPROC, (LONG)ZoomBarSubClassProc);
}

void StopZoomBar()
{
SetWindowLong(hHTCSmartTouchDll, GWL_WNDPROC, (LONG)lpfnOldWndProc);
CloseHandle(hHTCSmartTouchDll);
}
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
There is no setting needed, it just unlocks when you slide the Zoombar. There is not yet a setting to disable this behaviour :rolleyes:
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
What I understood is that Windows Mobile everything is global, so for WIN CE or WIN32 this will indeed will not work, but for Windows Mobile it will!
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, I will make a new test version with this new approach in the evening.

Thanks for the hard work!
[Touch Diamond, MDA Compact IV Themes and Apps] Lecl0ne:
Hello!

WOW it is wonderfull !!! I just got a problem: as you can see on the attached picture, my "radio signal" icon next to the "Time & Battery" icon doesn't appear properly, I need to click twice on my task manager to correct it. Any idea?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Version 2.9 (09-11-2009) for all Windows Mobile touchscreen phones, *NEW* ZoomBar unl

Good news for Touch Diamond 2 and Touch Pro 2. I uploaded a *NEW* ZoomBar unlock feature. Thanks to Cobaltikus for providing the solution!

See zuinigerijder.com for more info.

Note that I could not test myself this new feature, because I have a Touch Diamond, so let me know if it works for your phone.
[Touch Diamond, MDA Compact IV Themes and Apps] 4D3:
Hi,

I just have a quick question, i notice that you have the new zoombar feature for the HTC HD2.

I have the HD2, where is the zoombar?

also while i was looking through your website at the instructions, I noticed that 7 = HTC HD2 (Leo) and you have the HD2 Listed with lots of stylus in/out options... The HD2 has no Stylus!

Hope that helps and i look forward to trying the zoombar!!

thanks

MG
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I think it is my fault, I did get confused with all those HTC phones out :D
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
Wish List - Stylus Out To Unlock

If you add a checkbox setting under Stylus Sensor called "Stylus Out To Unlock" then one could check this box and uncheck "StylusOutDisablesLockMode"

I'd like the Stylus Out

event

to unlock, but not for the Stylus Out

status

to prevent future locks.
[Touch Diamond, MDA Compact IV Themes and Apps] 4D3:
No probs!! i just got abit hopeful when i saw that i could do this then realised that i have no zoombar!!

LOL

MG
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
Wish List - Configurable Startup Timeout

Wish List - Configurable Startup Timeout (& Lock On Boot but that is already on the list)

Just another option, rather than waiting 60 seconds I'd like to wait 0 seconds. Other people/phones might be better off 20 or 30.

Reasoning:

I try out lots of new software that could potentially have bugs causing my phone to freeze up requiring me to soft reset. I'd rather just put the phone back in my pocket right away while I wait for it to boot back up than to have to sit and hold the phone until it boots up, wait another 60 seconds for TLP to start, then lock it and put it away.

I have no timeout in my rewrite of TLP and have no problems with it starting and locking right away but it was written long ago and does not have some of the new stuff in it that I like - like the alternate/non-htcapi locking methods.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, I will add this to the wish list. I have already (an untested) version with a lot of new features, so I will add it in that version.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, so you want to be able to unlock when taking the Stylus out, but still be able to lock with the Stylus is out. Is there a specific use case for this? Do you forget your Stylus to put back?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
If I am correct, the HD has a ZoomBar. So that is why I was mixing things up. I even do not know if this new approach works for HD users. Would be glad to know that :confused:

Yes, looking into the LEO/HD2 specs, I think none of the sensors in TouchLockPro is working for HD2. So the only way is to unlock via a key sequence. And I think even that is not working, some others reported.

If I am correct, HD2:

- has not a light sensor but a proximity sensor

- as you already stated, has no Stylus because the display is multitouch, so it will not react on the Stylus

- it has a GSENSOR, but I think it has different API (can people confirm the TouchLockPro GSENSOR code is not working on the Leo :confused:)

- it has no NavSensor and also not a ZoomBar

I have seen code for the Leo GSENSOR, so that could be exploited by TouchLockPro in the future. So not much unlocking possibilities :mad:
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
:o yes :o unfortunately :o

and then I have to either live with it being unprotected for a bit risking butt dials until I can find the stylus, or go into the settings and disable the stylus option.

Also when I let my son play Xtrakt in the backseat while I drive and he accidentally drops the stylus and I don't have time to look for it right away.

And...

...

If you make this modification, when I press the power button to turn off my phone then it will lock regardless of whether the stylus is in or out, and it will save me the trouble.

- A Different/Better/More Universal Reason -

This will also alleviate the stylus status registry flaw when rebooting that exists in the Touch Pro, Touch Pro2, Diamond, and probably most if not all other similar devices (and without the need for nueGPIO.dll which only works for CDMA devices anyway)

Steps to recreate the problem in case anyone is curious or skeptical:

Set TLP to remain unlocked while stylus is out

Take the stylus out

Use the stylus to soft reset

Put the stylus back in before the phone boots up complete. These phones don't finishing booting quickly so you have plenty of time

Wait for the phone to boot up, and keep the stylus in place, don't take it out again.

WITHOUT USING THE STYLUS go to the Stylus Sensor settings in TouchLockAction and even though the stylus is in, it displays "Out" because the registry value TLP reads is not set correctly, thus preventing locking of any kind until you first remove the stylus and put it back in.
[Touch Diamond, MDA Compact IV Themes and Apps] 4D3:
Hi,

tha HD2 has a light sensor, it has multitouch, prox and G-sens.

it would be cool if we could unlock/lock with multi touch!!

if there is anything else i can help with please use my HD2 as if it was your own!

MG
[Touch Diamond, MDA Compact IV Themes and Apps] AlKlecks:
First Time User -- Strange Problems

Hi,

thanks ZuinigeRijder for this app, it looks very promising. So I removed S2U2 (and freed up large amounts of memory), installed TLP 2.9 on my Diamond, played around with it and thought it is a very neat application until I discovered that the display is not locked... I can toggle the clock/battery icon from black to white and back but the display is not locked at all. I tried to fiddle with the settings (disabled lightsensor, disabled UnlockOnACPower, reset to default, ...) all to no avail.

So I think its some strange interaction with another program I am running. The only two big nonstandard apps I am running are SPB MobileShell and CommMgrPro. The Diamond has the stock ROM image 2.09.162.1.

Does anybody know whats going on and how to fix this problem?

Thanks,

Al Klecks.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Good to hear you tried my application. Bad luck it is not locking. Did you try a fresh startup (full power off/power on)? Because it is possible the TouchPanel hook is not working because of that.

Another thing which will work for sure, is setting HTCLockAPI = 1, so then you use another approach of locking. But the disadvantage is, that when it is locked, also the power button is locked, so you have to unlock first via the other sensors. Luckily the Diamond has a lot and the light sensor is mostly doing it for you.

You can also enable debug logging (LogDebug = 1) in the Other Settings screen, reproduce the scenario and post the debug log file in the root of your phone memory, \TouchLockPro.log.txt. Maybe that gives me a clue :confused:
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, your arguments make sense, so I will take it up in a next version. I do have to think if I want it configurable, yes or no. But maybe that is not needed.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Cool you want to try some things out. I would like to know:

- is TouchLockPro seeing the Stylus changes in the Stylus Sensor screen?

- is TouchLockPro sensing light in the Light Sensor settings screen?

- Is TouchLockPro seeing GSensor orientation changes in the GSENSOR settings screen (if not, I need to access another GSENSOR API I have seen around)?

- Are the keys and touchpanel locked with the default settings, when you lock the phone?

- Is HTCLockAPI = 1 working for HD2 (hope it does not freeze the phone :eek:),

Maybe remove the auto startup of TouchLockPro from the auto start folder, to avoid freezes, and just start TouchLockPro via the Programs menu. Because I do not want you have problems due to TouchLockPro.
[Touch Diamond, MDA Compact IV Themes and Apps] AlKlecks:
this is it, thanks for the quick reply.

BTW: full power off => power on didn't help but setting HTCLockAPI=1 was the solution for me. Still strange that my phone needs this switch to be set...

Anyway, all I would need now is an option in TLP to lock an application but prevent the PDA from going to sleep. Of course only for selected programs. Luckely my navigation seems to be resetting the idle timer so the PDA never falls asleep, but most other GPS apps are written to follow the global power rules which (at least in my case) put the PDA after a short time of absent user interaction into sleep.

Al Klecks.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
When another program uses the same method of TouchPanel hook, it is possible TouchLockPro cannot use the same method. So I think this is the case for you.

TouchLockPro has an option to keep the phone alive, command !KEEPALIVEON. So e.g. you can couple a command to one of the Capacitive NavSensor swipes, e.g.

Left Swipe Down (CmdLeftDown = "!LOCKSCREEN;!KEEPALIVEON")
[Touch Diamond, MDA Compact IV Themes and Apps] nolannolan:
how to only use Zoombar Touch Peo 2

hi

great news reg the zoombar - thanks ;-)

if i ONLY wants to unlock using zoombar slide left or right, what miniimum settings to use ?

regards Nolan
[Touch Diamond, MDA Compact IV Themes and Apps] izk666:
It's a great app! Thanks for it! :)

Just a question (a wish). Is about Software Input Panel (SIP).

It would be great to add a new handler when on AC power, to use the nullKB. I use MyMobiler, to control the DIamond from PC, and it's very annoying to see the keyboard popup!

I hope it can be added in further versions.

Thanks! :)

PS: Sorry for my bad english! :o
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, you just disable all sensors:

- light sensor (disable Use Light Sensor)

- stylus sensor (disable UseStylus)

- G Sensor (disable Use G Sensor)

- NavSensor (disable Use Nav Sensor)

- Keyboard (disable Use Slider)

If you also do not want to unlock via triple touch the ZoomBar, you need to change:

CapacitiveTouchesSequence (CapacitiveTouchesSequence = 1)

Because the touch of the ZoomBar is defined as 2, so it will not sense it then ;)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Does make sense. I put it on the TODO/wish list.
[Touch Diamond, MDA Compact IV Themes and Apps] Cobaltikus:
Just a note about the zoom bar.

It does not work if you set HTCLockAPI = 1

So if that is set and you disable all other unlocking methods then the only way to unlock is to reboot.

This might be something to consider if ZR adds a lock on boot option. Then it would always be locked.... Ummm maybe a sort of fail safe might be needed in order to prevent those settings from being set like that...
[Touch Diamond, MDA Compact IV Themes and Apps] block:
can someone plz walk me thru setting the zoom bar to unlock cuz I have no clue what Im doing here, thanks using tp2
[Touch Diamond, MDA Compact IV Themes and Apps] nolannolan:
Hi

i have the following issues with new version 2.9:

1. I cannot answer incoming with bluetoooth no matter if detect BT has been checked or not

2. Screen turns on and off twice when a call is incoming buttons are locked though but screen flashes twice

3. even though suspend at incoming is checked - nothing is suspenden untill connection is made

can you help ?

thanks Nolan
[Touch Diamond, MDA Compact IV Themes and Apps] nolannolan:
Using HTC touch Pro 2
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
With the default settings, you should be able to unlock via the ZoomBar. There is no specific setting for enabling/disabling this currently. Only the tripple touch via the ZoomBar you can disable. See changelog.

TouchLockPro will detect the ZoomBar automatically. However, it is discovered that the ZoomBar unlocking does not work with HTCLockAPI = 1. So if you use that setting, you need to unlock via the other sensors.

Note that the setting HTCLockAPIWhenBluetoothActive (HTCLockAPIWhenBluetoothActive = 1) will also switch to HTCLockAPI when bluetooth is active. So with this setting set and bluetooth active, you cannot unlock via ZoomBar too.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
1. Probably you have set HTCLockAPIWhenBluetoothActive (HTCLockAPIWhenBluetoothActive = 1), so it switches to HTCLockAPI.

2. Hmmm, strange. See 3.

3. I do not understand this use case, do you want to suspend at incoming:confused:. Is this why 2. is happening, because this is forcing the screen off, and the incoming call window is enabling the screen again :cool:
[Touch Diamond, MDA Compact IV Themes and Apps] nolannolan:
Hi

to 1: no i have set to =0

to 3: i want display to vanish at incoming call. It dont happen. But the biggest problem is as stated in 1. I take i should set htclockapi=0, but then i can end a call by pressing hardware button.

It seems the paradox is: i cant choose htclockapi=1 because i then cannot use zoombar and i also cannot use the on/off button. If i do not choose htclokcapi=1 then i cannot pickup a call with bluetooth

Any idea of solutino to these 2 problems ?

thanks Nolan
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I do not think 3. is possible, the incoming call window/program will enable the screen, also if you would try to constantly do a screen off. It does also not make much sense, I think, because you cannot see who is calling.

1. I do not understand. With HTCLockAPI = 0, normally the Answer and Reject key are locked. Only the Home and Back button cannot be locked. You are saying the Answer and Reject keys are not locked :confused:
[Touch Diamond, MDA Compact IV Themes and Apps] nolannolan:
yes correct - pur postings crossed at the same time - please read my last comment in bold in previous post - thanks ;-)

Hi i have uploaded 2 logs - one with detect BT enabled and one without detect BT - as you can see it dont work in either to answer incoming call woth BT

Nolan
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
That is why there is another setting:

HTCLockAPI = 0

HTCLockAPIWhenBluetoothActive (HTCLockAPIWhenBluetoothActive = 1)

With BluetoothActive you have to unlock via another means though, e.g. light sensor. So this is a tradeoff, I cannot get it work exactly as you want. If someone knows a solution, I am glad to hear about it.
[Touch Diamond, MDA Compact IV Themes and Apps] nolannolan:
Hi

1. i dont understand waht it is that you say you cant make to work - could you explain ? Why would it not be possible to use zoombar if BT is active - this sounds very unlogic?

2. Further If i choose htclockapi=0 then i cannot pickup a call with bluetooth

Why is that - this should not be a problem either??

regards

Nolan