Wednesday, May 26, 2010

Problem with 800x480 resolution on the HTC HD2 (Pocket Stars PDA Version 6.1)

Some customers have reported a problem when running Pocket Stars PDA on the HTC HD2.  The toolbar at the bottom of the screen is displayed with the wrong height and buttons at the right edge are cut off.

Screen05 (2)

The toolbar should look like:

image

Here’s what I know thus far about the problem:

1.Pocket Stars runs fine with the WM6.5 800x480 emulator.

2. The problem seems to only appear on certain versions of Windows Mobile.  The HD2 worked fine with WM6.0, but WM6.3 and WM6.5 exhibit the problem.

3. On the HD2 with WM6.5 which shows the problem, LOGPIXELSX = LOGPIXELSY = 192, while SM_CYMENU = 19.  The value of 19 must be incorrect, and I'm curious what value was returned on WM6.0?

4. It looks as though the toolbar height may be set to the value of SM_CYMENU, which has long been known to return bogus values.  See:
http://www.eggheadcafe.com/forumarchives/pocketpcdeveloper/oct2005/post24149231.asp

5. I've verified I'm selecting the correct Toolbar resource which is created for 192 DPI.

6. Don't know if it matters, but the toolbar has both a Menu and a listbox in addition to 6 buttons.

7. Currently building the application  with the WM5 SDK, MFC, and VS2008.  HiRes aware.

Since I don’t own one of these devices, I’m a bit slow figuring out the fix, but will hopefully get it resolved within a few days.

16 comments:

Jay Borseth said...

I've just confirmed this happens on ALL WM6.5.3 emulators, not just 800x480.

Here's a question of StackOverflow with somebody experiencing the same issue:

http://stackoverflow.com/questions/2787643/menubar-commandbar-on-wm-5-0-and-wm-6-5-3/2915819#2915819

Anonymous said...

As far I understand, these problems concerned with new touch screen interface in Windows Mobile. Versions before WM 6.5 were designed to work with stylus, but since 6.5 they're designed to use fingers and big screen buttons. That changed the whole interface in WM and replaced button and menu styles. Unfortunately we don't have any tools to control it in MFC/API, since Microsoft are reporting only about compatibility with .Net applications in WM 6.5.3 release.

It's only my guess, I'm not certainly sure about it. In our company we temporary changed our toolbar to a menubar, and are hoping Microsoft fixes this issue in MFC.

china electronic said...

Great ! it's useful to me !

Henrik Manley said...

Any solution?

Jay Borseth said...

OK. I've spent the last 5 days researching this topic, trying various flags used during menu creation and ...

nothing works. After 10 years of full Windows Mobile compatiblity, I'm defeated by WM 6.5 and the change in how the operating system displays the CCommandBar / Toolbar / Menu. How enormously frustrating.

And there's no obvious solution without a serious rewrite. Argh!

Henrik Manley said...

For a fix is it possibly to remove the toolbar a have the options in the menu.

If you start the aplication in vertical mode the menu fits.

fokus said...

Any News?

Taha said...

I also started having this problem after trying to run our software on 6.5.3. I'm hoping we don't have to run in fullscreen mode and write our own toolbar.

Néstor said...

Try changing the menu caption from "Menu" to something with less characters like "?".

Jay Borseth said...

I tried substituting "?" for "Menu" but the location icon (globe) is still cut off.

Néstor said...

Could you please post a screenshot ?

ataha said...

Apparently the width of a button in 6.5.3 when you have both a menu and buttons is the width of the icons you're using plus the width of the widest menu item. This is why you got more button on the screen when your menu item was shorter. I don't know who came up with this idea. It's pretty retarded.

ataha said...

You can replace your menu with a dropdown toolbar icon that pops up a context menu with your previous main menu. You can use an image with the word "Tools" as your icon. Then you'd get your narrower icons back and they'd all fit. In order to bring up the context menu when the whole icon is hit and not just the arrow you can use click event to send yourself a mouseevent, but make sure to set the hitpoint really low on the arrow otherwise you'll get a little pointer icon wherever you sent the mouseevent.

Anonymous said...

Inspired by ataha's comment, I discovered that prefixing my rc2 menu definition with 3 blank "" invisible standard menu buttons reverted the menu to legacy mode. Still taller than the old menu bar, but the icons are the right width.

The logic makes sense- if you have two buttons, it tries to use the big new WM6.5 soft buttons. If you have 3 buttons, it's forced to legacy mode. It appears that the toolbaricons on the command bar are not enough alone to convince it to do this, hence you need at least three ordinary menu buttons.

I_IMAGENONE, IDM_SK1, TBSTATE_HIDDEN, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_EMPTY_STRING, 0, NOMENU,

Platform was a windows mobile 6.5 motorola device running a legacy application with a many-icon commandbar.

Anonymous said...

is there any solution for this? I've a Samsung Omnia GT-B7350 running WM6.5.3 (320x320) and I'm facing the same issue. I'd love to use this program, but without being able to access all menus its somehow useless :-(

Anna Schafer said...

A few hours later I had a working USB programmer, STK500v2-compatible, which enables it to work from AVRStudio.https://www.chinavasion.com/china/wholesale/sports-outdoors/