Donate via PayPal

If you like the materials or content found on this site, you can show your support by making a donation below. Thank you for your support.

Amount: 

Twitter Updates

vicott: RT: @paddytan: RT @engadget: Apple sucks at Photoshop too http://bit.ly/bd1zuW

Login Form



Button Links

Best Viewed with Firefox

Friendster Profile Facebook Profile

Microsoft MVP

Statistics


StatCounter

Designed by:
SiteGround web hosting Joomla Templates
UI Bug in Windows Mobile 6.5.3+
Software Development - Windows Mobile Development
Written by vicott   
Sunday, 25 April 2010 09:10
One user has reported to me that ClearTemp has a minor display bug that happens on the HTC Touch HD2, which is running on Windows Mobile 6.5.3. It came to my attention that the taskbar has "slimmed" down in the newer OS builds for Windows Mobile 6.5.x and this has caused a display bug for several apps. Apparently, apps were not automatically anchored to the top left of the viewable area correctly. To rectify this, I have to move the app window by a certain number of pixels from the top left of the screen in the code. And to make this trickier, this can only be done to certain builds of the OS.

After extensive research, it seems that the slimmed down taskbar makes its appearance since CE version 5.2 Build 23034 (Windows Mobile 6.5.3). And after much experiments, I've finally figured out the formula to be used for the vertical position of the app window. Another observation is that this UI bug does not seem to affect apps that are written & compiled using Visual Studio 2005, but it seems to affect all my apps which were written & compiled using eMbedded Visual C++.

Anyway, I hope this information is helpful to other fellow developers who are facing the same problem in bringing support to WM6.5.3 for their old apps. The following codes are in C++, but you can pretty much grab the idea even if you are coding in other languages.
OSVERSIONINFO version;
memset(&version, 0, sizeof(OSVERSIONINFO));
version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);

if (GetVersionEx(&version)) {
if (version.dwMajorVersion>4) && version.dwMinorVersion>1 && version.dwBuildNumber>23033) {
int a = GetSystemMetrics(SM_CYCAPTION);
int b = GetSystemMetrics(SM_CYFIXEDFRAME);
int c = GetSystemMetrics(SM_CYBORDER);

SetWindowPos(NULL, 0, a-b-2*c, 0, 0, SWP_NOSIZE);
}
}
On a sidenote, I will be releasing patches for several of my apps to fix this UI bug soon.
 

Add comment

Security code
Refresh