[New release 05-sep-2008] Finger SDK based on WTL - Windows Mobile Development and Hacking General

This is my addempt to develop a finger-friendly sdk for windows mobile. It's written in C++ and based on WTL.
At this time, there are only two components:
1) Finger Scroll Support
with help from this article
http://www.codeproject.com/KB/list/SmoothListBox.aspx
i developed a WTL template to add support for scroll windows (only vertical, for now) with fingers, without scrollbar. In the attachment there are
- header file with template implementation (fngrscrl.h)
- demo program
the template works in portrait and landscape mode, should work also for VGA devices but i tested it only with ppc emulator.
2) Finger Tab Control
this tab control is inspired by touchflo 3d bottom bar control, it mimics horizontal scroll, cursor repositiong and so on, but should be optimized.
Into the attached zip there's full source code (compile with visual studio 2005 and WTL 8.0) and a demo program that uses either components. If you want to test only program without compile the project, remember to put on ppc all the png images into the same folder of the executable.
This is a video of the demo in action
http://www.youtube.com/watch?v=gT1-_SqcjQo
I hope that my code will be useful for someone.
Give me your feedback to my work.
Thanks

wow this is great.
is it possible to convert it to VB .NET?

thread updated!

this is really really .. really cool.

Related

Dealing with icons, screen orientation, and MortScript

I apologize in advance if this gets too technical for some, but after you read it, you may understand why I took the time to do it and ultimately offer it here.
First of all, if you noticed after a soft reset that it takes some time for Windows Mobile to show the programs you have installed on your device, you'll quickly realize that the reason why it's so slow is that it's grabbing the icon image from the shortcut's executable, which is usually located at the end of that executable.
Now, you'll also notice that some icons appear slower than others. Most of the time, it's because the program's executable is usually big. Take Skype, for example. It can take up to 20 seconds just to show the stupid S icon because the single executable is about 5MB big.
All that effort to get to an icon is painstaking, and surprisingly enough, the issue remains in Windows Mobile 5.0. Why Microsoft never learned to cache the icons in a single file is beyond me. And you'll have to deal with it after every soft or hard reset... Of course, the average user here does that often, so you can see where I start to get frustrated.
But with frustration comes inspiration (or desparation).
I have created a small 26KB file called RunSkype.exe. All it does is launch Skype. While that doesn't sound helpful much, you'll realize that if you copy this file to the Skype folder, then create a shortcut to RunSkype.exe and replace the Skype shortcut with this one, you'll see that the icon and program will show up MUCH faster than having Windows Mobile 5 try to poll the 5MB file.
I also took the liberty of making a full VGA-compatible icon for Skype, so it looks good from 16x16 pixels to 64x64 pixels.
You can download the program here: http://www.beyondthetech.com/downloads/phone/hacks/RunSkype.exe
Now, for us HTC Universal owners, you're in for a treat. A really awesome program called MortScript has been released. MortScript is essentially a batch language which you can have steps completely automated for you, based on a text file of commands you create. You can simulate button and keypresses, stylus taps and holds, execute and close programs, read/write registry entries, and much more.
http://www.sto-helit.de/modules/edito/content.php?id=38
One of the biggest gripes I have on the Universal are the developers who have not yet dealt with landscape mode. Some games such as Pocket Mini Golf 2 and Farkle, will either look nice or screwed up, and/or the stylus will not work properly because the image doesn't match the screen coordinates. Avid Universal owners will know what I'm talking about.
Using MortScript, I create this batch file:
Code:
Rotate 0
RunWait \Program Files\Smart Box Design\Farkle.exe
Rotate 270
If it isn't obvious, the batch file will rotate the display to portrait mode, then launch the program. After the program has exited, it will revert back to landscape mode. Again, Universal owners such as myself have kicked themselves for launching a program knowing they have to flip the screen before they run it in order for it to work. This batch file takes the forgetful step and makes it automatic. Flipping the screen to portrait afterwards makes no difference since it's already in portrait, so you're all good to go.
The only downsides to this are two things: 1. If the program doesn't actually exit, but minimize, then it will never get a chance to rotate back. In that case, I delete the last line of the batch file and change RunWait to just Run. 2. It's obvious that you'd make a shortcut to the batch file, not the program's executable anymore. Soon, you'll notice that all the shortcuts will have the same MortScript icon, and that just looks ugly.
This is where my second executable comes in. But, this is going to require some work and an icon editor such as MicroAngelo.
I created a program called batchrun.exe. After you have created your MortScript batch file, save it as batchrun.mscr and put both files in the program's folder. Drag the batchrun.exe and the original program's executable out to your desktop. Using MicroAngelo's Librarian software, you can extract the icon images out of the original program's executable and inject it into batchrun.exe. That way, when you create a shortcut to batchrun.exe, it will have the original icon of the program you want to run.
So, the chain of command is: batchrun.exe -> batchrun.mscr -> commands + original program's executable
One final word... batchrun.exe is hardcoded to run batchrun.mscr, so you can't change the name of the batch file. In addition, you cannot change batchrun.exe's name either, since it's tied into the programming. But you can modify its icon data all you want.
Some of the programs I have successfully done this for include:
Acodic Mobile Info2Go
Handmark Zagat to Go
Resco Diamonds
RealDice.com Texas Hold'em
Smart Box Design Farkle
EdgeQ TrafficEdge
Momentum Games Pocket Mini-Golf 2
Again, the above listed programs do not play well in landscape mode, but with the batch file commands I provided above, it makes using these programs much easier.
Here's batchrun.exe. It currently has my BeyondtheTech Guy logo, but again, use an icon editor software like MicroAngelo to replace it as needed.
http://www.beyondthetech.com/downloads/phone/hacks/batchrun.exe
Here's a bonus. I like keeping the Start Menu as clean as possible. This includes the Recent Start Menu items that appear the moment you start launching away at shortcuts. You may recall that if you never ran anything, all it said was "Recent Programs" and the Start Menu was as short and simple as possible.
Well, you can always get that fresh feeling by creating a MortScript batch file containing this line:
Code:
RegDeleteKey HKCU,\Software\Microsoft\Shell\TaskSwitch,1,1
Call this file cleanup.mscr and stick it in your \Windows\Startup folder. As soon as you boot up from a soft reset, it will silently wipe out the most recently launched items.
Hope this was helpful to anyone.
If anyone needs help or doesn't understand any of this, just let me know.
RunSkype.exe .... thanks for that
S

Simply HTC Home with rlToday plugin

Hi all since I'm using WM6 I like the HTC Home Plugin but it drain a lof of resources so I draw a simple rlToday skin wich is like first one
- This skin do not need mortscript
- You need only rToday plugin and a font to be installed
(also you can update skin.xml to use system fonts)
How to install:
1) unzip the skin and copy the folder under \Program Files\rlToday
2) copy *.ttf to \Windows\Fonts
3) enable this skin in rlToday plugin via Setting\Today from start menu
Note:
* If you like to change the clock font remember to adjust XY coord
* You can choose to show current operator or cell broadcast message by updating the XML with these registry paths:
HKEY_LOCAL_MACHINE\System\State\Phone\Current Operator Name
HKEY_LOCAL_MACHINE\System\State\Phone\Cell Broadcast
Change log:
20070805
- Fixed hour digit X coord
- Added the current CELL Broadcast message
Thanks you all forum.xda
Cell Broadcast Messages?
Thanks.. I have modified the applications since most of them are different on my 6828. + added Last Incoming Call line as well. Do you have any idea whether rlToday supports Cell Broadcast Messages?
whawhawha...héhé...nice job
I go to try !
is there a formula to make this 240x240 compatible? or it's just trial and error?
There is a complete documentation for rlToday here
Worth reading it
The front of the phone has a beautiful high quality metal finish, at the bottom we have the phone end and send buttons, the end button also doubles up as the home button, a Windows key which is a requirement for future devices that will support Windows Mobile 6.5 and a back button. Above the keys you can see the zoom slider, this is a touch sensitive panel that you slide your finger along to zoom in and out of pictures and web pages.

[15-10-08] iFonz 1.1.2 for free...

iFonz
Version 1.1.2 - 15/10/2008
=============================
http://thedogcorner.blogspot.com
=============================
Info
=============================
iFonz is a clone of iPhone interface, with a lots of customization and a fully graphical design and animations
for Windows Mobile 5/6 completely writed in .NET.
iFonz use a lot of my spare time for development, it's free of money and if you want help me in development
you can click on my Google Sponsor in my Blog.
If you want you can make a donation here:
ITALIAN
Se vuoi aiutarmi e vuoi donare qualcosa clicca qui
ENGLISH
If you want support me you can make a donation here
Please don't mirror my program and use only my shared link from http://www.savefile.com
Requirements
=============================
- Pocket PC with Windows Mobile 5 or 6
- Microsoft .NET Compact Framework 3.5
- At least 2Mb of Ram free on QVGA
If you have trouble with Compact Framework, here you can download the necessary files:
- .NET Compact Framework v3.5 for Windows Mobile
- .NET Compact Framework v3.5 Messages All Languages for Windows Mobile (Choose your language file to install)
Installation
=============================
- Uninstall older version
- Extract ZIP in any folder and start iFonz.exe
How to
=============================
- If during the slide from a page to another page you look a red/pink color in the names of icons go to Windows Mobile Settings -> Screen -> ClearType and disable it
- If you use ILauncher or other launcher program consider to uninstall it for best use of iFonz
- If you wnat enter directly on the General Settings click on the link in Programs Folder "iFonz Settings"
- To open General Settings Tap and Hold on background
- To open Icon Settings Tap and Hold on desired icon
- To enable/disable Windows Startup open General Settings and check/uncheck the option
- To save/load Themes and settings Tap and Hold on Battery and click on Themes->Load/Save and choose the file
- To minimize Tap and Hold on Battery in the main screen and click on minimize
- To view all Pocket PC status info Tap and Hold on Battery in the main screen and go to Status menu
- To view AM/PM hour go to Regional Settings in your pocket pc and set correctly your Timezone and Time settings
- To exit click on battery in the main screen
- To add shortcut to a folder in the command line use "\windows\fexplore.exe" and in the argument set the folder path
- To add shortcut to a midlet java in the command line use "[the path of your java manager]" and in the argument set the parameter of your java application (Es: Command: "\windows\jmm.exe" Arguments:"-r"Gmail","Google","Gmail")
- To add shortcut to an internet address write in command line the internet address
- To Copy/Swap an icon tap and hold on 1 icon and choose Copy/Swap and after tap and hold another icon and choose Paste here/Swap here
- If iFonz close when hit the "Red Button" after a call, assign a specific button of your PPC for restart it, set it in PPC settings
- If your Pocket PC is old or slow go to General Settings and disable all Special Effects and set Animation to "Nothing"
- If you do a lot of changes in General Settings and iFonz become slow, restart it
- To go in debug mode create a file "Debuco" in the iFonz directory and use the program. In the folder i create a new text file called Logfile.txt with all operations and errors
- For lock device and show a big image of caller whe you receive a call use S2U2 program (The best ever from A_C)
Changes
=============================
Version 1.1.2 - 15/10/08
- Now when pass from last page to first page don't scroll all pages but go first directly, same thing when click the D-Pad button
- If you don't use wallpaper iFonz scroll very quickly and the ClearType Windows setting problem is resolved
- Deleted Arial fonts, now use Tahoma (Windows Mobile system font)
- Reduced the size of Operator name font
- Resized correctly all labels and text
- Now work with VGA correctly and with HTC Diamond
- Created 2 set of gfx folder 1 for QVGA and 1 for VGA devices
- Scroll speed improvements when slide pages
- Changed the Left/Right buttons to change page
- New navigation system in Open/Save/Search files with a DropDownList
- Correct a lot of bugs and Out of Memory Exceptions
-------------------------------------------------------------------------
DOWNLOAD
Go to my blogsite
Know Bugs
=============================
In the future
=============================
- Add All windows program option for set the icons
- Add in Icon settings the No open animation option separately
- Click little balls to go directly on a page selected
- Configuration of Pocket PC D-PAd Keys and Soft-Keys
- Add icons on top bar for notifications(messages, appointments, calls) if selected in settings
- Add more functionality to File Dialog Explorer (Create folder, Delete, Copy, Cut, Paste)
- Add sound on interact (slide, open application, close application, start iFonz, end iFonz)
- Add setting to remove top bar and use the Windows Mobile Bar
In a far far future
=============================
- Add Contacts Manager
- Add Dialpad to do calls
- Add Chat SMS to create SMS for contact
Videos
iFonz 0.7.6
iFonz 0.9.4
iFonz 1.0.0 - With instructions
This is a great treat. I just sent you a PM earlier requesting a copy of v1.1x and of course you delivered to the community. - Excellent!
thank you very much.
i think that's what the windows mobile platform lacks is good native animation. thank you
Hi ssj5trunks,
great work. TNX for publishing the new version(after all this ...) as freeware.
Works great on LG-KS20, animation speed has highly improved and settings of 1.0.4 are taken over. File browser is pretty cool.
TNX again
themes
of i meant to ask before but i forgot.. is there a way to save my theme so i can load it up when i please?i know to click and hold on the battery and then goto themes , save. but what is the file extension
by the way thanks for the new release..
WAY TO GO, ssj5trunks!
This is fantastic -- new releases from ALL the best finger/slide app and UI developers:
iFonz (how I get stuff done, fast, every day, on the run -- indispensable)
s2u2 (A_C's great collection of slider apps)
iContact (lots of variations here)
iDialer (finally -- it just works and is beautiful)
It's Christmas in October as the xda developers are all working in sync now....
Thank you ssj5trunks!
ssj5trunks said:
iFonz
Version 1.1.2 - 15/10/2008
=============================
http://thedogcorner.blogspot.com
=============================
Click to expand...
Click to collapse
Excuse me for being new at this, but when I click the weather tab from my HTC Diamond it doesnt give me any weather information, do I need to download some kind of other weather application, and if so, what do you recommend?
thanks in advance
thanx for another great update...just noticed how the bottom row of icons are pushed further down the screen covering their reflections and no longer push the icons to the corners when opening programs
Cavolo, ora il rendering è perfetto (ad eccezzione della visualizzazione orizzontale) sul mio Glofiish M800 e se non sbaglio il software ora è molto più leggero !
Domani mattina appena arrivo in ufficio farò la mia donazione !
Grazie !
////////////////////////////////////
Amazing, now rendering is perfecet on my VGA Glofiish M800 and it seems to be a litle bit light then older release !
thanks for share, updated
I will be installing this later tonite. SInce it's a .exe file, must we use ActiveSync or just run the .exe on the fone? I am using KS20.
the unzipped .exe file -- vs. -- cab file
Hey that confused me too... So I just clicked the .exe file on the phone device, and ifonz launched as usual.
But still, that would be a major change in installation procedure. hopefully ssj5trunks will explain.
I will be installing this later tonite. SInce it's a .exe file, must we use ActiveSync or just run the .exe on the fone? I am using KS20.
Click to expand...
Click to collapse
hmm. "when all else fails, read the instructions!"
Installation
=============================
- Uninstall older version
- Extract ZIP in any folder and start iFonz.exe
Click to expand...
Click to collapse
Cool, so there;s no more isntallation, eh? Just put the files in the folder and the magic application runs like a gem.
Spanish Translation BETA (recently cooked ):
My LG KS20 is running on iFonz 1.1.2 now. Whoa....... WOW!!! YAY!!!!
1) It runs at least 50% faster than the older one
2) Graphical sharpness is like 50% better (very clear!!!!)
3) The 'setting' display is sooooooooo sharp and nice now.
Brings me lotsa smiles!!!
By the way, I did not uninstalled the 1.0.4. I copied and overwritten the folders in 1.0.4 and the "iFonz" program in "Remove Programs" dissapear when I run it for the first time. Is it okay?
(reason for not deleting because worry newer version will not run, like S2U2 1.3 vs 1.22, my KS20 can't run v1.3)
Amazing
Great job :eek :
I am impressed, this plus the new S2u2 and PCM keyboard on the Diamond look amazing and snappy. Touchflo will have to keep quiet for a while.
Thanks
I hv problem running the new S2U2 v1.30. When I wake up my KS20, my S2U2 keeps hanging. I have reverted back to v1.22 which is much more stable.
One question 4 Diamond users: Is only me or anyone more have iFonz too slow changing froms pages?
All animatyions are too slow (tf3d disabled)
It might be because you have a cooked rom.
There is a little load time when launching an app but except for that it's all good.
I have turned off the fading effects though in Ifonz settings.
It might help.
I want to try the Omnia D3d drivers as well to see if it makes any difference.

{template} TF3D HD manila PSD file

http://rapidshare.com/files/189717709/TF3D_HD_Template.zip
Here you'll find a Photoshop file with basically all screen elements of the TF3D HD manila interface present.
Unless I've missed something all icons/button/etc are present except for the weather section. I've only included the main icons there so you can put your flag on the moon..
If somebody feels like mapping out every raindrop like in this psd file, please let me know so I can update the file
The bmp files of the photo and video sub menu's are present as well.
These will go in the windows directory.
I plan to add the blackstone dialer .. but am not sure it's that much needed.
The main idea was to map out the Manila files.
I've build it from itjes Full HD cab for the X1. As far as I know it should work for all other touch HD manila setups..
import/export
I've used the mode9editor to extract all png's.
http://forum.xda-developers.com/showpost.php?p=3095189&postcount=1
The mode9editor has a batch import/export function.
When you use the layer names in the PSD file you're able to batch import all icons you'll change.
Transparency
Most icons will have either a red pixel line border or at least 2 red pixels at the corners.
This way you can select the alpha channel of the layer, crop your image and have to correct dimensions for the png/qtc file.
All you then need to do is remove the red pixel before saving.
For 99.9% of the images you can do it by a color select unless your new theme will be red
Buttons
All buttons that have a press and rest stage have been linked to each other and put on top of each other. In the corresponding layer you'll notice this soon enough
Tiny pixel files
There are a few images that are 1x1 or 2x2 pixels. These are present and I've tried to make all layers in logic order to be easy to find.
Some pixels are 100% transparent and therefor red which was easier to find
Batch PSD export
There is need to find or create a photoshop action that will:
- select layer
- crop by alpha selection
- remove red pixel
- export by layer name
- repeat this process for all layers
If there's anyone out there that can help me make such an action please do. As I have limited experience in advanced photoshop actions
All suggestions and help (especially with the photoshop actions) are welcome!
With a little help this can be an easy automated template for our own redesigning fetish
Odd. I never had those red lines when extracting the .png files. I used manila editor 0.2. I guess Mode9editor messes it up.
Angelusz said:
Odd. I never had those red lines when extracting the .png files. I used manila editor 0.2. I guess Mode9editor messes it up.
Click to expand...
Click to collapse
Hehehe.. I put those there myself
this is the fastest way to incorporate the exact dimensions and icon location within a file
Oh I see.. that's not very convenient now then, is it?
I wouldn't know of an easy way to get rid of them. If you get it done, it's handy though, I've got 140 seperate files, sorted per folder on my PC atm xD
Angelusz said:
Oh I see.. that's not very convenient now then, is it?
Click to expand...
Click to collapse
The thought behind is to get a photoshop action to select the whole layer and then 1. make selection by red color & delete selected / 2. select layer, crop, select all, extract 1 pixel, invert and delete selected.
By hand this is allot.. bij when automated it could work.
But true.. in theory it's perfect, in practice i've noticed it's not yet
Since I made a new layer to create the icon I have to find a way to automatically select the corresponding layer that will make the size fit.. but cannot do this without java scripted action.
So untill I meet someone who wants to help and is good at photshop java action it will only be a nice concept
but having the file names in the layers to copy/paste does help me for quick batching.
but I agree.. not yet the fastest methode.
although I personally prefer it over 140 different files to work from, but this is also cuz I render my icons in 3d all at 1 time.
thread ends here
and will be continued here:
http://forum.xda-developers.com/showthread.php?t=477268

Default window size scaling?

Hey all,
I have just started working on porting a framework im making to Windows Mobile,
And im having some trouble with window sizes.
When i use CreateWindow with a width and height, for this example 200x200. When i compile it in debug, i get a window that is as you would expect, 200x200.
But when i compile the app in release, i get a window 400x400 and all the graphics in the window is pixelated (ie one pixel is now 4 pixels (2x2)). Im using GDI to draw the graphics.
But it makes it 400x400 wether i use GDI or just make a window, so my use of GDI is not the problem.
Is there some option i should know about that sets scaling?
Also, in debug, it leaves the start menu & status bar at the top, and the soft buttons at the bottom. While in release, it moves the start bar & status bar to the bottom with the SIP button between them, and no soft buttons.
Why?
Is it because i dont have a menu in my .rc file? but then why does it not do it in debug, while in release it changes the layout?
Thanks for helping out a noob dev
- Mic
What language are you programming in?
What are you testing on? A real device or emulator?
What screen resolution are you testing on?
Programming in C++
Using Windows Mobile 6 Professional SDK in Visual Studio 2008 PRO
On real device (WM6.1 HTC Touch Diamond) & emulator (WM6 PRO VGA emulator) gets the same results.
Resolution is 480x640.
Just for reference i worked it out.
It was lagging and was making everything double its size. (ie a 100x100 window was 200x200 pixels)
I forgot to set the target machine type in the release configuration.
The giveaway line was
Code:
1>LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
But because i had whole program optimisation on, the line appeared near the top in the middle of some 'Build Started' lines, and i missed it.
So i just had to set the SubSystem (Configuration of the project > Linker > System) to "WindowsCE (/SUBSYSTEM:WINDOWSCE)"

Categories

Resources