Putting PPC (Harrier & iMate) app on Treo 700wx Issues - Windows Mobile Development and Hacking General

Hi,
I have an application which has been running nicely on Harrier and iMate devices, well any PPC devices really because of their rectangular screen shape.
My client has gone and bought some Palm Treo 700wx devices, and they have a smaller square screen.
In the resource of my project the screens are designed to fit PPC. When it runs on the Treo the Treo automatically pops up a scroll bar to allow the whole view to be seen.
The issue is when I first go into the app I can't see the top of the screen, about 20 odd pixels heigh aren't displayed. The scroll bar still displays and I can scroll down to the bottom of the view, and when I scroll up again the top of the screen is still out of sight.
If I exit the app just by tapping on the x in the top right corner (so the app is still running, not exiting properly via my Exit button which shuts down the app), I exit the app and then when I go back into the app the screens are displayed correctly, there is no missing space at the top of the screen.
If I exit the app via my exit button and then start the app again, the top of the view is missing again.
Does anyone know why the screen isn't displayed correctly when I first enter the app, or why it should come right when reloading the view again? Has anyone else had problems with screen layout when putting PPC apps on the square Treo 700wx?
Thanks

It sounds like you have a 'refresh' problem. I haven't encountered this my self and it is really hard to diagnose when you don't even tell us what language your app is written in, but basically here is what I think happens:
When your app is launched, part of its window doesn't get properly painted (not sure why exactly).
When you click the X the app isn't closed, but minimized.
When you return to it the window is maximized and repainted. Second repaint goes correctly.
The quick solution to this would be to force a window refresh just after the app is fully started.

Sorry I forgot to add the language.. it's written in eVC++ 3.0
I'll give the refresh a go, thanks

Further Questions..
I thought that minimising and then maximising the screen fixed the problem, but only partially..
Because the screen in resource is designed for regular PPC it is bigger than the Treo 700 screen size, so the OS automatically shows a scroll bar.
The new issue I'm seeing is to do with the scroll bar. The steps I take to reproduce the issue are:
1. Go to View1, and I scroll down the view (I'm using CView not CDialog)
2. Go to View2
3. Go back to View1. When I go back to the first view the scrollbar is scrolled down in the position I left it.
4. Scroll up to top of view and some of the controls in the wrong place. Some controls I dynamically create in OnInitialUpdate, and as part of the Create() I pass in CRect to tell it where to create the control.
If I set CRect.top to say 10, it's created 10 down from the top of the visible screen. The problem is that because I've scrolled the view previously the view draws it 10 down on the visible portion of the view.
I had thought that the easiest solution would be to always reset the scroll bar to the top of the view before creating my controls, but I'm not sure how to force the OS scroll bar to the top of the view. I've tried SetScrollPos(0,0) or ScrollWindow(0, y). ScrollWindow moves the actual view up or down, but the OS scrollbar is still in the same position.
Any ideas on how to set my view window to the top and to reset the scrollbar?
Thanks again

How to refresh a view?
I have sorted the issue mentioned just above, by finding the scroll position and factoring in that when I set the value of CRect area of the controls I need to dynamically draw.
I'm now just left with the first issue, of when I first start up the app the top part of the window and scrollbar are covered by the Title/Taskbar at the top of the screen.
If I close the app via the x button and restart the app, the issue resolves itself. Or if I open up any dlg like the About screen or even display an AfxMessageBox, when I close the dialog the original screen is redrawn correctly, in the correct position and scroll bar fully shown.
I have tried calling RecalcLayout(), RefreshWindow(), UpdateWindow(), Sending WM_SIZE messages and a whole range of things, but I can't seem to get the screen refreshing correctly apart from when I open any dialog and close that dialog.
When you close a dialog what messages get sent to the previous view that force it to redraw? Does anyone have any suggestions how I can force a refresh myself?
Thanks again

Did you try InvalidateRect?
I am getting a bit rusty with MFC, since I now try to do things the hard way and use pure win 32, but this should work.
If you can't use it as a class member, call the API directly using you view GetSafeHwnd() function for window handle). Use NULL for lpRect to redraw the whole window and FALSE for bErase to prevent flickering.
Note that UpdateWindow() only triggers repaint if part of the window becomes invalid (the contents needs redrawing).

No I hadn't thought of using InvalidateRect(), so I should give it a go.
In the end I just wanted the issue fixed so opted for a quick 'n dirty solution of displaying a temp CDialog as soon as the app starts and calling EndDialog() immediately in the OnInitDialog() so the dialog disappears before you see it.
It worked and the original screen gets updated to correct size, layout and scroll bar.
Cheers.

Related

[WM 6.5] Set as Contact Icon menu disappears

Hi guys,
I'm having a problem with setting contact icons on Windows Mobile 6.5. I'm actually running Dutty's Holy Grail R1, but I'm not sure that that's part of the problem.
To add an icon to a contact I navigate to the Photos and Videos tab. From there I select the picture and press Set as Contact Icon in the menu.
If I keep my phone upward all the time everything works: I get the crop selection, afterwards the Add to new/existing menu and I select a contact and everything works out.
However, then the contact icon is turned sideways. This makes sense, since the picture was also in landscape mode when cropping (i.e. the bottom was at the left side of the phone).
I think the solution by design for this is to turn your phone sideways when viewing the picture and selecting the Set as Contact icon menu item. This works up to the point when selecting Done after cropping. The next menu appears partially, or not at all, and I'm not able to set add the icon to a contact.
I've disabled Sense 2.5 in the UI, and that gives a bit more insight in what's going on. With Sense disabled and holding the phone in landscape mode, I do get the Add to new/existing menu briefly, but the start top bar also appears on the left side of the screen.
I think the phone is trying to rotate the UI to show the menu, but fails with the menu partially visible.
Are any of you having the same problem?
A solution might be to temporarily disable the G-sensor and rotate the screen manually. Or I could set the contact icon from the Contact card, but then I'm not able to crop. I'm actually using active sync, so I could also set my contact icons in Outlook, but the quality was really crappy when trying this.
Regards, Stijn

[SOLVED]Can't scroll in Excel Mobile

I've done a search in both the Leo forums as well as xda in general and can't see a solution for my problem:
I am unable to scroll within excel mobile. Whenever I drag my finger across the screen it selects cells rather than scrolling. This isn't a problem if I wish to move up and down as the vertical scroll bar is visible and can be used. However, the horizontal scroll bar doesn't display even though it is selected in the menu.
Can anyone suggest what I can do to fix this? Thanks in advance.
bump
can anyone help?
When you open Excel, click on the right side of the screen (= scroll bar) and the scroll-button will appear. Use that to scroll up and down. The same goes for the horizontal scroll bar (well, it's on the bottom of the Excel screen and you scroll from left to right ;-)). Should be there, otherwise I wouldn't know.
Thanks for the reply but unfortunately the horizontal scroll bar isn't visible on the screen, even though when I go into view -> show the horizontal scroll bar checkbox is ticked.
The vertical scroll bar also works like a "normal" scroll bar in that the scrolling part is always the same size; it doesn't increase in size when the scroll bar is tapped on. However, I seem to remember that's how it used to work when I first got the phone, so perhaps in all the various tweaks and things I've done since I've unwittingly edited something that is affecting it?!
Oh well.
You're not in full screen mode are you?
And have you tried opening a new document?
No not in full screen mode, and I have opened various different (existing) spreadsheets, and tried creating a new one and the same thing happens in all of them.
I've solved the problem. A little look into HD2Tweak and I spotted an option for horizontal scroll bar which was set to none. I changed it to normal and a quick soft reset later and I was able to see the horizontal scroll bar again; not just in Excel but other apps too.
I don't remember switching it to none, but am just glad it's working again now!

Awesome WP7 Tips&Tricks

I just wanted to post a couple of helpful tips&tricks for those who are new to the wp7 os.
10 Tips&Tricks
1. Using the Windows Phone 7 voice controls
Press and hold the Windows key at the bottom of your screen and you can start talking to your phone. Try saying "Open Calendar", to see what we mean.
2. Adding apps to the Start screen
When you are in the long applications list on your phone pressing on an icon and holding brings up a contextual menu that gives you a series of options, one of which is "pin to start". Press on this option and the app will be shown on the Start screen.
3. Add people to the start page
No it's not just about adding apps to the start page, but people too. Find them in your contacts book, click on the "pin" icon, and they'll be added to your Start page so you can speed dial them whenever you need.
4. Moving your tiles around
Adding a new app or tile to the Start screen will place it right at the bottom. If you want it to be elsewhere, press and hold on the tile in question and then you are free to move it up and down and rearrange your tiles to best suit your needs.
5. Removing apps from the Start screen
You like the app, but you don't really want it on your Start screen anymore. No worries. Hold your finger on the tile in question for a couple of seconds and when it highlights press the no pin icon in the top right-hand corner.
6. Uninstalling apps
You've tried it and you don't like it. No problem. Head over to the menu list and press down on the app in question until you get the contextual menu. Select uninstall and you're done.
7. Rating and reviewing apps
You really love the new app you've downloaded, so much so that you want to rate and review it so anyone else interested knows whether it's any good or not. With Windows Phone 7 you don't have to wait until you delete it to rate it, you can rate and review it at any time. Press and hold down on the app in question until that contextual menu appears and then choose "Rate and review". It will bring up another page allowing you to have your say and give it a rating out of five. Easy peasy.
8. How to change the theme
If you've got your Windows Phone 7 phone from Vodafone the theme is going to be all red, O2 is dishing out blue themes and Orange, orange ones. An all red themed phone might be a bit much (we hear you), but fret not as you can change the colour of the tiles and other features in the Setting area. Zip on over to the menu list, select Settings, and then Theme. Here you can choose the colour of the background and the accent colour. Background options are "Black" or "White" while you'll get nine accent colours to pick from. Lime, anyone?
9. Swipe to the left
Windows Phone 7 is built around the idea of panoramic tiles that you swipe to reveal more content off screen. It's always worth seeing if you can swipe to the left as there might be more stuff waiting to be revealed.
10. What are the dots?
Whenever you see three dots at the bottom of the screen, that's a menu for more options. In photo playback for example, it will give you the options to delete the image or perform a quick upload.
72 Windows Phone 7 tips and tricks here:
http://www.pocket-lint.com/news/3641...s-phone-7-tips
For those who need access to a US market, or wherever...
1st, when you link your live account to the phone, you'll automatically get an e-mail from Microsoft phone 7 in your inbox.
this had some useful links in it. for example, I didn't download the full zune package, but another version witch works as well and is quite a bit smaller.
2nd, create an extra live account with false location settings, i set mine on Beverly hills, California, so you can access marketplace, xbox live etc.
(you can add an other account for your e-mail settings etc)
Transparent Lockscreen Wallpaper
This is the link to the wallpaper:
http://phone7.files.wordpress.com/2010/12/clawpaper.png
Simply send yourself an email with the image attached, then open the email on your phone and save the image. When you view the image, you have an option of setting it as your wallpaper(The Zune software only seems to sync JPEG’s)
Click on the PNG attachment and then wait a few moments. Once the ‘cancel’ button next the attachment disappears, click again. This should open it in the picture viewer with the option to set as wallpaper.
Until the lock screen has started any animation, the home screen will appear black. Presumably this is because the home screen isn’t loaded until the lock screen has been touched, which makes sense. Secondly, it doesn’t work if you have a password on the lock screen. Having a password is obviously a good idea, so it’s a shame this doesn’t work with the password.
Lockscreen Text App
A useful application is Jivtech's Lockscreen Text App. Head on over to the site for more info about an application that allows you to quickly and easily add text to your lockscreen wallpaper
http://www.jivtech.com/lockscreentext.aspx
Have fun!
If I helped please hit the Thanks button!

Quad View And Floating Windows (T111) [4.2.2]

I made this mod for my GF, and share it here in case someone is interested.
It enables both floating multiwindows, and quad view KK style (up to 4 static windows on the same screen).
DISCLAIMER
I'm not responsible for anything that may happen, your Tab, your responsability
This mod has only be tested on the T111, but I'm pretty sure that it works as well on s110 and other 7 inches variants.
It may work on 8 in and 10 in variants, and in any case trying won't brick your phone so go for it!:silly:
If you do try please report here if it works.
It should work on both odexed and deodexed ROMs.
REQUIREMENTS
A Tab with a custom recovey.
INSTALLATION
Download the attached zip, flash it in recovery, reboot.
HOW TO USE THE MOD
Enable Multi Windows from your quick settings.
Floating:
Click on an app in the flash bar (the bar on the side from where Multi Windows are launched), the app will open in Floating Mode.
You will notice 3 buttons, minimize, maximize and close, and you can drag the window anywhere on the screen by dragging its upper left side.
You can resize it too, from the sides.
When an app has been minimized it becomes a small bar that you can drag anywhere, double tap it to maximize the window again.
Quad View:
Drag an app, if you put it in the center of the screen it will open in floating mode, if you put it at the top or the bottom of the screen it will open in full screen mode.
After one app is opened in full screen mode you can drag a second one to the second half on the screen, then a third to one corner and a fourth to the last corner.
The white central bar allows you to resize the windows in both length and width.
Don't touch the part where there's no bar between the windows cuz it makes the bar disappear (bug). If it happens just push home and reopen the windows.
SCREENSHOTS?
Nope, sorry, I have no time to play with that kind of stuff.
Try this mod if you feel like it, otherwise give it a miss, no worries...
UPDATES?
I have 2-3 things in my mind (windows templates, multiinstance) and I may implement them if I have time and if I see that enough people are interested.

Blank Screen on certain apps and blocked bottom of screen of some others

Using AT&T 950. Some of the apps go blank on some screens. Others are blocked out at the bottom of the screen by the navigation bar.
For example:
Ebay app - when I click on the search icon, the screen goes blank, but I still see the keyboard and top info bar. It will allow me to type and when I click enter, the search does come up. I can't see what s being typed, but do see the results.
Navigon - When I go to the map manager, the screen goes black again. (except for the top and bottom menu bars). If I rotate the phone to landscape and then back to portrait, it then shows up.
Podcasts - when on the Collection screen, the Download text is half covered up at the bottom with the bottom menu bar.
There's more but I think this gives a good representation. I was running the latest standard release. I did update using Windows Preview for Developers didn't fix it. Thanks in advance.
Will

Categories

Resources