MyQuotes 2.5 Released! - Powerful Today Plugin Reader - Windows Mobile Development and Hacking General

Overview
MyQuotes is a desktop application which you can read eBook or study vocabulary or display personalized picture. In addition, MyQuotes is very customizable, you can configure MyQuotes to change the quotes and/or background image every several seconds/minutes/hours, you can also change it by clicking or key-press for prev/Next/Random. MyQuotes support many modes that be suit for different scenes(like as reading/learning...), you can append new mode and delete old mode, and these modes can be convenient switched by desktop context menu.
MyQuotes has appended three modes by default:
1. Reading: for reading eBook;
2. Learning: for learning vocabulary words
3. Exciting: for dislpay picture/quotes/affirmations/saying
MyQuotes fetchs the content from TEXT files (specified at mode settings) that can be created and edited for convenience.
Features
Blow is a general list of features for MyQuotes Today Screen Plugin:
Desktop eBook reader
Can display quotes/affirmations/saying
Can display BMP/JPG/PNG/GIF image files
Support fixed display lines
Support fixed file lines( Word Wrap/Scrolling text)
Conveniently switch mode and file by context menu
Full customizable text files and image files
Support TEXT file format(ANSI/UTF16/UTF8)
Manual actions, such as clicking/draging/scrolling/pressing
Automatic actions, such as every several seconds/minutes/hours
Multiple change style, such as Next/Prev/Lock/Unlock/Random/Direction by region
Multifarious appearance, such as Background/Margin/Alignmeng/ProgressBar/Font
MyQuotes lights your heart.
You can access the MyQuotes's BBS : www.addintimer.com
or download at : http://classic.pocketgear.com/software_detail.asp?id=26723
or direct download the attachment following

Nice, but is it freeware or what..?
Has anyone tried...??
cheerz

it sounds so great idea
good work
but which format does it support for reading ?
pdf ? txt ?
thanks for the hard work

This costs $9.95 at Pocketgear.

haam1978 said:
it sounds so great idea
good work
but which format does it support for reading ?
pdf ? txt ?
thanks for the hard work
Click to expand...
Click to collapse
MyQuotes fetchs the content from TEXT files (specified at mode settings) that can be created and edited for convenience.
Support TEXT file format(ANSI/UTF16/UTF8)
Thanks

Unfortunly it says is trial version...
Registration
By default, MyQuotes will be installed as a trial version, which will expire after 14-days from the original installation date. To permanently activate MyQuotes on your device, you¡¯ll need to purchase the software to obtain a valid 5-digit reg key code number. Entering this code number in the ¡°About¡*¡± form will convert the trial version to the full version.
Click to expand...
Click to collapse

Needs instructions or help file
Guoyd
MyQuotes looks pretty flexable and seems to have capabilities that I'm looking for. So I bought it. However, I'm having trouble in configuring the program. Can you provide some instructions on what each of the configuration setting do? This would make things so much easier!
To help me learn Japanese, my goal is to use it to randomly post different Japanese words and phrases with their meaning on the today screen every few hours.

Related

"Wrap" a Today plugin

I have a little project in mind, but would like some input from the pros to cut research time:
Is it possible to "wrap" a Today plugin dll with another, providing a "pass through" for operations (such as screen taps, etc)?
What I'm trying to accomplish is this: Add selectability and other one-handed d-pad operation to an older plugin that is not selectable.
What do you think?
it's possible but the problem is that the plugin have to keep track on what plugins it include and which handles it have to pass to them
could end up big and slow
Rudegar said:
it's possible but the problem is that the plugin have to keep track on what plugins it include and which handles it have to pass to them
could end up big and slow
Click to expand...
Click to collapse
This is specific to a single plugin - it would only keep track of one.
Perhaps plan B would be easier - a plugin that manipulates another plugin. Such that it would "appear" the older plugin was selected, etc. I guess I'd better go study some more...
Actually its really simple.
Any plug-in DLL exports a function called InitCustomItem. In this function the plug-in does all its initialization, and creates its window. The return value is the handle to this window which you can subclass to add functionality.
as for selection, there is a value in the registry for each plug-in (HKLM\Software\Microsoft\Today\Items) which controls whether the system passes selection events to the plug-in or not.
it has three settings:
0 - non selectable, item will be skipped by the system.
1 - Automatic, the system will paint the item and handle selection on / off
2 - Manual, the system will pass the selection event to the item and the item will take care of the rest. In this mode the return value of the WM_ACTION determines whether the selection is moving on. This is good for multiline plug-ins that don't want to give up focus when arrow keys are pressed.
levenum said:
Actually its really simple.
Any plug-in DLL exports a function called InitCustomItem. In this function the plug-in does all its initialization, and creates its window. The return value is the handle to this window which you can subclass to add functionality.
as for selection, there is a value in the registry for each plug-in (HKLM\Software\Microsoft\Today\Items) which controls whether the system passes selection events to the plug-in or not.
it has three settings:
0 - non selectable, item will be skipped by the system.
1 - Automatic, the system will paint the item and handle selection on / off
2 - Manual, the system will pass the selection event to the item and the item will take care of the rest. In this mode the return value of the WM_ACTION determines whether the selection is moving on. This is good for multiline plug-ins that don't want to give up focus when arrow keys are pressed.
Click to expand...
Click to collapse
Hey, thanks for the response! I've set the Selectability registry item for the older plugin, and it's ignoring it - that's what started me on this little project.
I'm a software developer by trade, but not with C++, so I don't want to waste people's time here asking a lot of dumb questions. If you could point me in the right direction on a couple of things, I'll go off and learn:
1. If all I have is a dll and nothing else (no .defs, etc), can I determine all of the functions it exports (other than InitCustomItem)?
2. Process check: My custom plugin's InitCustomItem would call old-plugin's InitCustomItem, snagging old-plug's hwnd. New-plugin would then initialize it's own window - transparent(?) and pass that hwnd back to windows. Also, my custom plugin would pass all messages to old-plugin, etc. Theoretically, old-plug would look and operate like normal?
If this is already written, just sent me the code!
Well I am afraid it will be difficult to do all this without C++. As far as WM based devices are concerned you need to use something that translates in to native code to create system components like the plugins son ,no .NET languages, and embedded VB doesn't do well on anything never that WM 2003 (not even SE), plus I am not sure if you can make DLLs with it at all.
To your questions:
1) There is a tool which comes with VS 6 called Dependency Walker. It shows you what functions a given DLL exports, what it imports from other DLLs and what DLLs it is link to. Woks on EXE files as well.
If you can't get that, download a demo of IDA 5. It's the most powerful disassembler for WM devices out there.
2) Not sure, I never tried anything like that. The thing is, the system resizes the plugins, on initialization (it controls height) and when screen rotation changes so if you pass back HWND for a window other than the one visible, it might cause some problems.
I think what you should do is learn about subclassing. It's when you replace the procedure of an existing window with your own (just replace the function, not create new window). You then get all the messages for that window, you can do what you want and call the original function when you done.
By the way, if you want to learn about writing plugins there is an article with code samples on this site: www.pocketpcdn.com and a lot of other interesting stuff.
Good luck.
What plugin is it? It might be easiest just to rewrite the plugin if you've got the code.
V
levenum said:
Well I am afraid it will be difficult to do all this without C++.
Click to expand...
Click to collapse
I should have been more clear - I am using C++, I'm just have to learn how to program with it first!
vijay555 said:
What plugin is it? It might be easiest just to rewrite the plugin if you've got the code.
V
Click to expand...
Click to collapse
I don't have the old-plugin source code. My little project is to add some sort of d-pad operation to the WeatherPanel plugin, which you're probably familiar with.
Progress: I've written and deployed my first little plugin - based on the source code samples available in the internet.
Next step: In my InitializeCustomItem, I thought I'd try to call WeatherPanel's InitializeCustomItem (instead of creating my own window). Thing is, I don't yet know how to properly link the WeatherPanel dll to my project. As expected, it only exports two functions: InitializeCustomItem and CustomItemOptionsDlgProc (I used dumpbin.exe)
I'll keep plugging away - any input would be appreciated.
Thanks for your help!
It's real easy:
Use LoadLibrary and GetProcAddress functions to call functions in other DLLs without linking them.
levenum said:
It's real easy:
Use LoadLibrary and GetProcAddress functions to call functions in other DLLs without linking them.
Click to expand...
Click to collapse
What a coincidence! My studying led me to the same functions.
From within my plugin's InitializeCustomItem, I was able to successfully load the dll with LoadLibrayl, GepProcAddress of its InitializeCustomeItem (at ordinal 240) and call it. But it whacks the Today screen so that none of the plugins load.
Next I thought I'd try FindWindow and EnumChildWindows to find it and all it's children. Then manipulate them by sending messages...
storyr said:
What a coincidence! My studying led me to the same functions.
From within my plugin's InitializeCustomItem, I was able to successfully load the dll with LoadLibrayl, GepProcAddress of its InitializeCustomeItem (at ordinal 240) and call it. But it whacks the Today screen so that none of the plugins load.
Next I thought I'd try FindWindow and EnumChildWindows to find it and all it's children. Then manipulate them by sending messages...
Click to expand...
Click to collapse
Update: So far, so good. As it turns out, EnumChildWindows doesn't work on the PPC, so I used GetWindow to find the plugin's handle. I can successfully send messages to it and initiate various actions.
Question: I'd like to visually indicate (on the old-plugin) what's being clicked (such as drawing a box around it). Is it possible to draw things outside of my own window?
It is, but it's tricky.
You can always use the GetDC function to retrieve the DC for another window and paint on it, but the problem is that unless you subclass the window you have no way of knowing when it repaints it self and all your changes are erased.
levenum said:
It is, but it's tricky.
You can always use the GetDC function to retrieve the DC for another window and paint on it, but the problem is that unless you subclass the window you have no way of knowing when it repaints it self and all your changes are erased.
Click to expand...
Click to collapse
I tried that exact thing (GetDC) and drew a rectangle in it, but it didn't do anything. I realized the reason was the WM_Paint event wasn't firing on old-plugin, and when it did, my stuff was erased (just like you said).
Next idea - open my own dialog window than overlays old-plug. The entire window needs to be transparent - except for the visual indicators that I position where I want. When the user ok's, I close the window and send the click to old-plugin...
Thanks again for keeping tabs on my progress..
No offence, but with all these rather advanced programming tricks you are attempting just to "sup up" an old weather plugin it looks to me like you would be better off just writing the whole thing from scratch.
It you are familiar with WinInet and / or sockets this should be pretty easy and it will look and work much better than the hack you are attempting now.
Plus you can make it exactly the way you like.
levenum said:
No offence, but with all these rather advanced programming tricks you are attempting just to "sup up" an old weather plugin it looks to me like you would be better off just writing the whole thing from scratch.
It you are familiar with WinInet and / or sockets this should be pretty easy and it will look and work much better than the hack you are attempting now.
Plus you can make it exactly the way you like.
Click to expand...
Click to collapse
No offence taken. I thought of that, but I figured this would be a good way to cut my teeth a little. Once I complete this little project, I may pursue that route...
Question: Do you have a favorite forum (or forums) besides this site that you use for your research/programming questions?
This is my favorite forum
But here are couple more sites I found very valuable:
www.pocketpcdn.com - They have tips and tricks with code examples arranged in categories like how to make MFC dialogs not full screen or the one I used in LVMTime to put the clock back on the taskbar.
www.codeproject.com - It's not specific to WM development but has tons of interesting stuff including entire sources.
You should also check out www.buzdev.net If you're not familiar with the great work of buzz_lightyear you should see some of the stuff he did for this forum like grab_it - the invisible ROM dumper.
OT
Just a quick OT question:
If I would move some of the plugin-dll's from \Windows to \Storage Card, would it be enough to change the adress within the corresponding item in the registry entry HKLM/Software/Microsoft/Today/Items ?
Of course I'm not talking about plugins like tasks a.s.o but rather third party plugins
Cheers
hrb
It won't work.
The problem is that the SD card is mounted too late so if you put the plugins on it they will not be loaded when device boots up.
You can move them to the extended ROM this way or to a folder other than windows but there is no way to move start-up stuff to SD.
Thanks for the help with this "little" project. After many hours, the product is out for beta testing. When it's released, I'll post more info...
Finished!
It's finished. The app is called WP-Pilot and it provides one-handed operation of WeatherPanel. If anyone's interested, it can be found here. Here's how it ended up:
There's a plugin (WP-PilotPlugin.dll) with an options dialog, and an executable (WP-Pilot.exe).
When the plugin gets selected, it looks for Weatherpanel. If it finds it, it fires off WP-Pilot.exe
WP-Pilot.exe opens. It does this stuff:
Look for WeatherPanel, and get it's screen coordinates.
Read the registry and determine which layout file WeatherPanel is using.
Open the layout file and read it: Record the coordinates of each "clickable" item found. This was a real PITA because of Unicode.
Sort the coordinates for left-to-right, top-to-bottom order.
Select the first coordinate and position a tiny window (10x10) at that x-y position.
Draw a "pointer" in the window (the type and color depends on what's selected in the options).
Show the window and process input:
[*]Left/right pressed - selected the next/previous coordinate and move the window to that location.
[*]Up/down pressed - close WP-Pilot and tell the plugin we're done.
[*]Center button pushed:
[*]Send a mouse click to the WeatherPanel plugin at the coordinates
[*]Close WP-Pilot and tell the plugin we're done.​
Thanks again for your help!

Free Common Dialog available

My experiences last year with building an open file dialog into GSMbeam made me want to have a more reusable solution. So I present my common file dialog here for any one to use. It is a open file dialog and a save file dialog. You just need to get the base class from my site and have a look at the example code to use it. It is very easy to use if you already know how to dynamically load a dll at run time. The dll exports 3 functions. One instantiates an object of the base class, one destroys it. Very easy.
The dialog is a big improvement on my previous one. It has search capabilities and it better adjusts to screen orientation ( I can't test for vga devices sorry, but it should work). It lets the user interact with the file system and returns a full path of their desired file to open. for saving you can suggest a file name (and path) and the user can just accept it or choose another. The save dialog then returns their desired path. The starting directory can be specified in both modes. The art is nice looking and intuitive.
I provide a small app for those who can't be bothered to code it but just want to have a look. All it dose is load the dll and demonstrate its functionality.
Lovely work!
V
Hey dude it sounds great. Unfortunately, the link is down, so it doesn't look great yet
Anyone has a copy ?
yea right man
the link is dead....pls be informed if there is new link...Alive

[New release] Registry display plugin

Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment RegDisplay.CAB
The source (eVC 4 project): View attachment RegDisplay.zip
Thanks for this!
Thank You Lev.
Thanks, Thanks, Thanks,
You are a legend.
I was almost through with my today plugin and was trying to figure out reading registry values and all of a sudden I get a PM from u about the plugin !!!
Very Cool !!!
OK a few questions,
1. I know that WM_TODAYCUSTOM_QUERYREFRESHCACHE is called for refreshing the today plugin, any ideas about when is it called.
I read somewhere that it was 2 seconds. Is it true?
2. I saw ur code and u have exposed CustomItemOptionsDlgProc in RegDisplay.def, but when I installed the cab file the 'options' is not enabled.
I manually changed the resistry and changed options to dword = 1 and saw ur name and email address.
u might want to enable that by default so that people can notice ur work.
I am planing a commercial release of a new project on basis of this.
Thanks again,
Shailesh
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Suggestion
levenum said:
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Click to expand...
Click to collapse
Thanks for the help, will check the fixed cab.
Also a suggestion:
A custom icon could also be incorporated. You can give a option to load a custom icon next to the text in the today plugin.
I know anybody can modify ur code and do it but still.
Actually, I probably should have mentioned this in the original post but I have no intention of adding options to this thing.
This would only complicate the code and turn it in to an actual app instead of a sample project.
But by all means feel free to make suggestions. If this thing does become popular, when I am done with my other projects (like LVMTopBat) which won't be any time soon (unfortunately) I will release a separate version of this plugin with all kinds of options that can be controlled both by user (form the options dialog) and by other apps through registry.
Maybe things like text alignment, size, bold / Italic / underlined.
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
levenum said:
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
Click to expand...
Click to collapse
Thanks for the info, I never knew that.
Thank you so much! This was exactly what I was looking for!
levenum said:
...But by all means feel free to make suggestions.
Click to expand...
Click to collapse
As a frequent mortscript user I think, this great app might be even more usefull, if the string was shown in an "allways on top" message box instead of the today screen. The Today screen might be obscured by other active windows during the scripts runtime and the plugin eats precious today screen estate also while being unused, doesn't it?
In that case (of a standalone application) I would furthermore introduce some kind of termination string (or reg. value) to end the display application.
Code:
- start mortscript
- writes first string to registry
- starts display application (run)
- updates string in registry whenever appropriate
- ...
- writes termination string to registry
-> display applications self-terminates
- ...
- end of mortscript
Honestly, I already do use something comparable with mortscript (employing a conditioned sleepmessage loop and reading from the registry too), but this could be much nicer and more elegant.
Just my 2 cents... What do you think?
I think something like that would be better implemented by the mortsrit program it self.
It could be a function like MessageBox API in windows which you could then command on and off. Having it built in would save precious resources on the device that would be wasted by having an extra app run constantly in background.
This is just my thought though.
I'd suggest contacting the developer of mortscript and discussing it with him.
levenum said:
I think something like that would be better implemented by the mortsrit program it self.
...
I'd suggest contacting the developer of mortscript and discussing it with him.
Click to expand...
Click to collapse
Mort knew about that request and by chance just announced to so.
Thanks anyway.
Hello levenum,
I just joined the community. Reason being, I found your RegDisplay plug-in
You call it a sample project, but the impact is that of an awesome solution.
Great for MortScript, but equally useful in BASIC applications that write
messages to the registry which is show upon screen minimization.
I regret not being a C programmer (mainly BASIC), else I'd love to further
develop this jewel.
Your plug-in runs flawlessly in an iPAQ 210 under WM6 Classic.
Cheers and Respectful Greetings
Robert
CLSID for registry display plugin
What is the CLSID for the Registry Display Plugin? I am going to have to edit the XML file that defines my home screen in order to get the plugin to show up. I am using Facade to control my home screen, and the only plugins that it will show in its list are those currently in use in one of the XML files in the Application Data\Home folder. All other new plugins require editing the XML. Thanks for your help.
levenum said:
Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment 41592
The source (eVC 4 project): View attachment 41583
Click to expand...
Click to collapse
This is great! I was asked if I could write a today screen plug-in for my weather application (http://forum.xda-developers.com/showthread.php?t=445576) - I couldn't since I don't have the skills and I'm writing .NET code - but this is exactly what I needed.
I'm adding support for this plug-in and will of course give credits to you.

Open Source Today Screen Widgets app

There are a lot of clock area today screen apps out there, from the simple such as PDClock, through mid-level stuff like HTC home, up to the fully customizable rlToday.
Few of these seem to be a good all-round solution though, except maybe rlToday, but I am having issues with the rlToday / Sys-to-Reg / Mortscript combo, both in terms of features (ie no support for "on" or "off" images), stability, and ease-of install (S2R seems a bugger to set up right, especially for the less technically inclined user), and the whole rlToday / S2R / Mortscript combo is hardly a turnkey one-install solution.
So to that end, I decided to try my hand at crafting a solution more appropriate to my needs.
Now, until this point I have never coded for C++ or windows mobile. I am not even a professional coder, far from it, but I do have a knack for designing good solutions, so I thought I would start teaching myself native C++ and see what I could come up with. Ultimately, my goal is to release as open source, I am hoping to maybe start a sourceforge project at some point...
I am making this post because I am now starting to get past the proof-of-concept stage and am coming up with some working code. I am tackling the various hurdles one by one and learning as I go, but it is starting to look promising.
This thread is to serve two purposes:
1) Gather my thoughts on how things are going to work so potential users can chime in on possible tweaks or changes to the features and how they should work.
2) Serve as a rallying call for any (preferably more experienced) coders who wish to get involved. I will post up any problems that I am having surmounting various issues, please feel free to help out on those. If an experienced coder liked the project that much and wanted to take the lead, I have no issues with that, as long as it remained open source.
So, with that out the way, here is what I am thinking so far:
Overall idea is pretty similar to rlToday - a script (ie a .INI or .XML file) which lists Widgets is processed and the result is drawn on the screen.
For example, here is an example INI file for a background (say transparent) PNG with a clock overlaid in the middle of the PNG, that has different layouts / images for portrait and landscape mode on a qVGA device.
Code:
;ini profile for qVGA (240 width and 320 width)
;PORTRAIT
[PortBG]
width=240
widget=image
clickable=0;
image="bgport.png"
x=0
y=0
[PortClock]
width=240
widget=text
subwidget=clock
clickable=1
clicktype=exe
clickstring="<exe to launch calendar>"
dateformat = "dddd MMMM d"
x=120
y=25
origin="cc"
;LANDSCAPE
[LandBG]
width=320
widget=image
clickable=0
image="bgland.png"
x=0
y=0
[LandClock]
width=320
widget=text
subwidget=clock
clickable=1
clicktype=exe
clickstring="<exe to launch calendar>"
dateformat = "dddd MMMM d"
x=160
y=25
origin="cc"
The [Name] of each section actually does nothing, but it will be useful in debugging / error messages ("Image for [PortBG] not found!").
Widget = choses which kind of widget it is (eg Image, Text)
subwidget = choses the subtype of widget (eg clock is a subtype of text)
The Width= entry is an idea I came up with to handle multiple screen orientations and resolutions within one profile. Basically, as this is not intended to be a full-screen app, the only relevant dimension is the screen width. Each widget therefore has an associated width. When the screen is rendered, it will check what the current width is and only render widgets that match that width. Furthermore, if a script has entries for resolutions not supported by your device, these will be ignored. Profiles are likely to be a directory with one .INI file and assorted images. Images can be in subdirectories, say grouped by width (ie a "240" dir and a "320" dir for qVGA) - that way you could release a skin as one zipped dir that supported all devices and resolutions, and you would not need to upload the "480" and "640" dirs to a qVGA device, thus saving storage space.
Each widget also has x/y coords, which usually refer to the top left, but the origin entry can change that (eg cc would be centre horizontally and vertically)
Each widget will also be able to be specified as clickable, with options as to what to do when it is clicked.
With this system it should be possible to create most things, however, here is what I am currently NOT planning on doing:
I am not aiming at offering tabbed pages of widgets, or an easy way to change widgets without writing a new script. This is aimed at a companion to something like UltimateLaunch for handling the top of the screen - a Clock, SMS / Missed Calls / VM messages, BT / WiFi status and toggles etc.
I am currently using VS2005 and the WM5 SDK, but the app is still so simple that this could probably be changed. I would like to support as much as possible, but am not overly worried about providing backwards compatibility beyond WM5. I am using Native Win32 - I want to avoid as much bloat as I can.
Planned features:
Per-pixel Alpha PNGs - IMPLIMENTED
Widgets parsed from INI - IMPLIMENTED
Parse only items from INI that match screen caps - IMPLIMENTED
Display only items that match current screen width - IMPLIMENTED (Effectively switch profile on screen orientation change)
Options screen to set current profile
Widgets
======
Text Type: - IMPLIMENTED
Source: String in INI - IMPLIMENTED
Source: String in Registry
Source: Date from format string - IMPLIMENTED
Image type: - IMPLIMENTED
Plain image - IMPLIMENTED
Status Image - Registry value
Toggles - BlueTooth / WiFi / Phone etc
Other features
===========
Multiple screen resolutions supported per INI - IMPLIMENTED
Detect Power but no Activesync - Allow enabling of BlueTooth for automatic pairing with in-car BT handsfree.
Current questions and stumbling blocks:
Having issues finding a lightweight way of displaying per-pixel alpha PNGs. Current thinking is that AlphaBlend is perfectly capable of doing the blending, it is just SHLoadImageFile that is stripping the alpha info.
See threads here and here
Not sure how I am going to handle toggling of BT / WiFi. Could use VJ's tool, but I would rather do it in my code. Any pointers on how to do it and maintain maximum WM5 / WM6 compatibility would be appreciated - VJ's tool will not toggle WiFi on my Kaiser anyway...
Could do with decent chop and chomp routines (split by char and remove leading / trailing whitespace) - does anyone know an easy way to do this in native code?
Need to work out how to find the size of a text string in pixels *before* it gets drawn to the screen with ExtTextOut
Need to impliment a date format string to text string converter that can handle date and time objects in the same string
Currently I use a bit of code to look at the string and pass it to either GetDateFormat or GetTimeFormat, but not split the string and pass relevant bits to relevant routine, then reassemble.
Need to make whole thing a today item, but delaying doing this as it seems that debugging will be harder? I also guess this would be quite easy, so I am planning on leaving this until near the end. Any advice on this subject would be appreciated.
I am interested in this. I don't know C++, but I have experience coding with other computer languages. I'll definitely be following this thread and watching for updates.
iContact source contains some pretty lightweight INI library. It isn't written by me, and it's called SimpleIni. Everything is contained in one .h file and it's very easy to use.
good luck,
larna
larna said:
iContact source contains some pretty lightweight INI library. It isn't written by me, and it's called SimpleIni. Everything is contained in one .h file and it's very easy to use.
good luck,
larna
Click to expand...
Click to collapse
Nice one, thanks
I got simpleini in and working - you were right larna, it was really easy and pain-free. Thanks!
Update:
I have a working prototype.
All basic functionality coded - text and image widget types, orientation switching, ini parsing...
Currently still not a today item, and there is loads to do in terms of error checking and freeing up memory etc, but it parses INI files OK
Once I have done some tidying up, I will release some source and maybe a demo EXE.
Hey!!
I'm already developing an application which load and extends rlToday Themes!
sources will be released soon!
The app is XIAMultitheme:
Done:
- fully working rltoday themes on a HWND
- done today plugin
- loading external dll
- all widgets are external dll
To do:
- avoid image loading via ImageFactory due to memory leak on wm6x
- port to CxImage to load PNG
- use AAROT to free rotate images (analog clock)
- today plugin does not load the engine yet
http://www.xiaprojects.com/?section=All&project=XIAMultiTheme
what do you think? mail me on priv (stefano) on xiaprojects.com
stefanux said:
Hey!!
I'm already developing an application which load and extends rlToday Themes!
sources will be released soon!
The app is XIAMultitheme:
Done:
- fully working rltoday themes on a HWND
- done today plugin
- loading external dll
- all widgets are external dll
To do:
- avoid image loading via ImageFactory due to memory leak on wm6x
- port to CxImage to load PNG
- use AAROT to free rotate images (analog clock)
- today plugin does not load the engine yet
http://www.xiaprojects.com/?section=All&project=XIAMultiTheme
what do you think? mail me on priv (stefano) on xiaprojects.com
Click to expand...
Click to collapse
hi stefano
i see nothing on your web site , nor screenshots nothing in download binaries
Why ???
evilc said:
Update:
I have a working prototype.
All basic functionality coded - text and image widget types, orientation switching, ini parsing...
Currently still not a today item, and there is loads to do in terms of error checking and freeing up memory etc, but it parses INI files OK
Once I have done some tidying up, I will release some source and maybe a demo EXE.
Click to expand...
Click to collapse
can you upload here the demo program ?
Sounds pretty neat!
I don't understand some of the terminology you use, but I think you may be talking about a feature I had an idea for:
profiles (XML files) can be associated with a today plugin such that you can make a profile appear in the today plugins list for each skin (XML file) you have installed - thus making each XML profile behave like it was a today plugin in it's own right.
Is that what you are talking about?
brunoisa10 said:
can you upload here the demo program ?
Click to expand...
Click to collapse
Demo uploaded to first post. Unzip it to \Storage Card\shared on your device and run.
BE AWARE, there is very little error checking when parsing the INI.
If you omit a horizres line for any widget, for example, the program will crash.
Well I checked out XIAMultiTheme and it looks promising.
I was not aware that there was a memory leak bug in IImagefactory, I wasn't planning on using it in the final version anyway, so no biggie.
If XIAMultiTheme is capable of doing what I had envisaged for openClock, I will probably stop development, as you obviously know what you are doing much more than I do
However, a couple of points:
1) Size.
XIAMultiTheme seems to be a lot bigger and requires .NET - This seems to mainly be to do with the CxImage library - just PNG support seems to add more size than my entire app is! I am flabberghasted that supporting per-pixel Alpha PNGs takes this much, an alphablend routine can be done in a K or two, hundreds seems overkill. Apart from the requirement for rotation (for analogue clocks) I do not see why a full image lib is needed. Just a load and alpha blit.
2) Orientation awareness.
As in I don't see any in XIAMultiTheme. I am really happy with the way I have handled this in openClock - each item in the INI (XML in your case) has a "horizres" value associated with it. At render time, current screen width is compared to each item's horizres and if it matches, the item is drawn, if it doesn't then it isn't shown.
This provides a nice way to combine portrait, landscape and multi-res capabilities into one theme. And as long as you allow relative paths in the theme(eg 320\320bg.png, 240\240bg.png, common\common.png) then you can have a theme which supports all resolutions and orientations, and allow the user to store what they want on their PPC (eg if their device is qVGA, they know they do not need to put the 640 and 480 dirs on their PPC for a given theme, as they won't be used)
3) Stateful buttons.
Items like a voicemail button / wifi button etc should probably have two images associated with them - one for "no messages", one for "have messages". I was planning on putting something in openClock along the lines of specifying a reg key, an operator and an image.
eg:
regkey=HKEY_LOCAL_MACHINE\...
on=thisimage.png, gt, 0
off=thatimage.png
To set to thisimage if the key is of value greater than (gt) 0 or thatimage.png if not.
Good luck!
evilc said:
just PNG support seems to add more size than my entire app is!
Click to expand...
Click to collapse
Yep. Same goes for MortButtons... (and MortPlayer, but there, the player itself is bigger in relation...)
I am flabberghasted that supporting per-pixel Alpha PNGs takes this much, an alphablend routine can be done in a K or two, hundreds seems overkill.
Click to expand...
Click to collapse
The alphablend routine is in the Draw method, and even in source code not much more than 1kB.
The trouble is to load the PNG without losing the alpha information. With Windows' API, you can't do it - there's only the crippled SHLoadImage. So you need the entire code to decode PNGs, i.e. libpng, which in return requires zlib - over 200kB only to load PNG! The remaining kBs are spend to load/decode JPEG (quite some kBs, too), GIF (if enabled), BMP, ... and some basic image processing (resample, rotate, ...).
btw, you might want to check MortImg.dll and MortImage.lib, which is a (quite) simple wrapper. If only one image library is used, at least some memory on the device is saved (and if MortButtons or MortPlayer since b72 is used, also main memory).
Check out http://mort.svnrepository.com/svn/mort/MortTools/trunk with any SVN client (e.g. Tortoise), use "guest" for login and password.
evilc said:
Well I checked out XIAMultiTheme and it looks promising.
I was not aware that there was a memory leak bug in IImagefactory, I wasn't planning on using it in the final version anyway, so no biggie.
If XIAMultiTheme is capable of doing what I had envisaged for openClock, I will probably stop development, as you obviously know what you are doing much more than I do
However, a couple of points:
1) Size.
XIAMultiTheme seems to be a lot bigger and requires .NET - This seems to mainly be to do with the CxImage library - just PNG support seems to add more size than my entire app is! I am flabberghasted that supporting per-pixel Alpha PNGs takes this much, an alphablend routine can be done in a K or two, hundreds seems overkill. Apart from the requirement for rotation (for analogue clocks) I do not see why a full image lib is needed. Just a load and alpha blit.
2) Orientation awareness.
As in I don't see any in XIAMultiTheme. I am really happy with the way I have handled this in openClock - each item in the INI (XML in your case) has a "horizres" value associated with it. At render time, current screen width is compared to each item's horizres and if it matches, the item is drawn, if it doesn't then it isn't shown.
This provides a nice way to combine portrait, landscape and multi-res capabilities into one theme. And as long as you allow relative paths in the theme(eg 320\320bg.png, 240\240bg.png, common\common.png) then you can have a theme which supports all resolutions and orientations, and allow the user to store what they want on their PPC (eg if their device is qVGA, they know they do not need to put the 640 and 480 dirs on their PPC for a given theme, as they won't be used)
3) Stateful buttons.
Items like a voicemail button / wifi button etc should probably have two images associated with them - one for "no messages", one for "have messages". I was planning on putting something in openClock along the lines of specifying a reg key, an operator and an image.
eg:
regkey=HKEY_LOCAL_MACHINE\...
on=thisimage.png, gt, 0
off=thatimage.png
To set to thisimage if the key is of value greater than (gt) 0 or thatimage.png if not.
Good luck!
Click to expand...
Click to collapse
thanks you for your good words
1) beta version will be lighter ... (need to known what image loader use)
2) will be done on Page component (tab themes are already working)
3) will be done on sensor dll with "regex" (maybe)
XIAMultiTheme is in alpha development...
I would like to "merge" code with you or may be DLL collaboration.
XIAMultiTheme does NOT need .NET it's low level GDI "C" source
When XIAMultiTheme go on Beta status the dll will be around 10kb
Configurator is .net
Thanks you
Thanks for that mort!
However, if my entire app is (currently) 61K and it supports per-pixel alpha PNGs (Via the apparently bugged IImagefactory), then surely it is more than possible in less than 100K.
It seems like libpng must be grotesquely bloated for our needs. In an ideal world, someone would re-code SHLoadImage to not lose the alpha channel for PNGs. Maybe a workaround would be to convert the PNG into a 32bit per-pixel BMP with alpha before it is passed to SHLoadImage, as SHLoadImage deals with alpha BMPs just fine and AlphaBlend works just fine with AC_SRC_ALPHA data.
stefanux said:
thanks you for your good words
1) beta version will be lighter ... (need to known what image loader use)
2) will be done on Page component (tab themes are already working)
3) will be done on sensor dll with "regex" (maybe)
XIAMultiTheme is in alpha development...
I would like to "merge" code with you or may be DLL collaboration.
XIAMultiTheme does NOT need .NET it's low level GDI "C" source
When XIAMultiTheme go on Beta status the dll will be around 10kb
Configurator is .net
Thanks you
Click to expand...
Click to collapse
Hi stef,
I am more than happy to help out on your project with design ideas, testing and proofreading of english translations.
I have plenty of ideas on what the ultimate today screen widget app should feature, I just had to set my sights lower due to my (lack of) coding abilities.
Do you have a forum or something on your site? I don't see one.
I am slightly concerned about point (3) and your regex example. I would maybe try and keep it simpler, XML is already a little complicated for non-technical users to understand, throwing regexs into the mix may be the straw that broke the camel's back. That's why I went with INI files - simpler to use for lusers
evilc said:
Thanks for that mort!
... it supports per-pixel alpha PNGs (Via the apparently bugged IImagefactory), ....
Click to expand...
Click to collapse
Please try to do this test:
load 20 png's with imgfact. and start drawing all of them like a simple animation for 10 fps... image[]->Draw() after 5 minutes my application will blow up my pda (wm61) I thinks it's a "COM" bug because it happend only calling "Draw"
stefanux said:
Please try to do this test:
load 20 png's with imgfact. and start drawing all of them like a simple animation for 10 fps...
Click to expand...
Click to collapse
Are you kidding??? 10FPS? I have a kaiser!
Seriously though, if we can get a code snippet that proves this, surely we can get MS to issue a patch?

Developer's Notepad

Heyas!
Here's a rough of the notepad of my dream
Now it have:
a support of ANSI, UTF-8, UCS-2 for reading
use UTF-8 when saving into a file
syntax highlighting for C/C++/Java and a bit of HTML
tested (few) on megabyte files
a piece of slowness in some actions
I just want ask you, All, for opinion - does it have a right to live with current performance of the editor? Yeah, it should be equipped with
editing of a multiple documents simultaneously (tabbed)
customizable highlighter for a more languages
actions with binding on hardware keys
"recent files" list
search and replace
or evenmore ide-stuff: autocomplete, quick navigation thru source code, an external compiler support
(...)
But it will be later. I'm not sure if it too slow and huge for a pocket source code editing Or maybe there is a good and feature-rich notepad/IDE with all of I've mentioned above?
Nice idea. I'll try it out now, and see what happens.
I was able to open HTCHomeSettings.xml file that is too big for Total Commander or notepad in my phone (59.3kb).
Now I have a tool I can tweak my Manila2D settings while on the road.
I did notice the soft buttons are not in English, but everthing else shows up as English.
By the way, I used UPX standard compression and got your file to 144k before I put it on my phone.
NICE! one, this goes into my "useful apps" folder on my card
Really nice fast app.
I currently use cke (http://www.animaniak.com/cke/cke_main.asp) as my text/code editor on my WinMo device.
Have a look at the website and this app for some really good ideas to implement into yours.
The biggest problem I have with yours is that I can't browse the full file system.
Its a great start, and it sounds like you have a plan to make it a great piece of software.
It looks like you made space for the line numbers but they are not showing.... is that a bug or something you have just not completed?
An integrated ftp uploader/dowloader may also be really usefull...... So you can edit your website easily on the go.

Categories

Resources