480* 800 WVGA Device has shown Extra space on Application..How can I Resolve this..? - Windows Mobile Software Development

Hi..All,
I was developed windows mobile 6.1 Application.. I Installed it on Windows mobile 6.5.. That device is little bit longer(HTC).
But, Application work half of the device remaining part is shown an white..? I dont know why it occurs..
That correspoding emulator is 480*800 WVGA Emulator it was too large..
how can I solve the problem.. Its very urgent..
Eagerly waiting for the reply
Thanks in advance,
Bell

This can be one of the biggest bugbears of writing Windows Mobile applications. You write an app for one platform, your own perhaps. As good a choice as any, but when you run it on another device, it is all over the road.
It is a total pain in the butt, but do not assume anything.
Question 1. Is the device in landscape or portrait mode. How do you know?
Question 2. Are the dimensions of any of your screen objects hard coded into the program. If the answer is yes, it may be time for a rethink.
Answer 1: Use GetClientRect() [C++] or the Form.ClientRectangle property [.NET] to find the actual size of the window. This can determine a portrait, square, or landscape layout, dependant on the values. Remember that this can change during the time the app is running, so trap it in the WM_PAINT message [C++ Win32], ::OnPaint() event [C++ MFC], or Form1_Paint() event [.NET].
Answer 2: Use the values of those returned by Answer 1 to size your screen objects to fit, and also to centre the things on the form. Not hard coded but dynamically changed to fit. This may involve a serious rewrite of your app, but it will then work across all machines.
The real pain appears with bitmap or raster drawn objects which can look a bit crappy if resized. In this case another, simpler, approach may be much better.

Related

[IDEA - REQ] D-Pad and VGA-fix in one program

My idea is to make a program that acts like WVGA-fix, that is, reducing the display area ( by 160 pixels in height) in order to make VGA applications compatible AND, at the same time, using the space gained at the bottom for a virtual D-Pad.
That would make many 3D games compatible and playable (becuase of the D-Pad) but also applications like Realcalculator or the SPB suite.
Does anyone want to do this? I'd donate at least 20 bucks and I guess there are lots of other people who would appreciate a solution like this.
Nice idea, but what's the point in the WVGA screen then? Might as well get a Diamond!
also thought about that. tgere is someone working on it. search for the d-pad sip thread.
the idea is to program an emulator, wich opens applications in a 640x480px Frame this way its simulates a VGA screen. the 160px left can be used for virtual D-Pad. when pressing a button on the virtual D-Pad, the direction has to be send to the frame - to the application / game.
Koffein Schluck said:
also thought about that. tgere is someone working on it. search for the d-pad sip thread.
the idea is to program an emulator, wich opens applications in a 640x480px Frame this way its simulates a VGA screen. the 160px left can be used for virtual D-Pad. when pressing a button on the virtual D-Pad, the direction has to be send to the frame - to the application / game.
Click to expand...
Click to collapse
If you want to go as far as having an on screen virtual keypad with the OS running at a lower resolution to accommodate it, I imagine this would need to be done through a replacement screen driver much like NYDITOT. If you've ever used NVD, you should know what I mean. They use a generic replacement for the screen/display/keyboard driver that then allows the OS display to be run at any resolution and then scrolled.
But since it replaces the entire screen driver (ddi.dll) with it's own generic version, this method is also a performance hit for more graphical apps like games. If someone can figure out something better and easier, go for it. I imagine you would only need to hack with the touch driver if you wanted an invisible on-screen dpad or something.
And it should look like this http://upload.csrune.com/files/dpadsip669.PNG ;-)
It's just another keyboard...
Hello, sorry to unburry this topic, but I consider the concept is of premium importance.
First of all, I think it should have nothing to do with resizing the screen, as it would just complicate the process and slow down the programs...
Games and other software using the HD's missing pad are generally already VGA (if not QVGA) sized (considering recent WVGA games can use the touchscreen or the accelerometer), so they already display black unused sections on the screen (and by the way, a lot of useful apps, such as WVGAFix or Hou Ming's Force Hires already manage the lost margin and/or resize QVGA to VGA).
So it should only be about using this otherwise spilled and already existing dead zone to display a pad.
There are tons of applications for such a pad, and not only games !
Just browsing through directories can just be so painful without a pad, as Windows Mobile massively relies on its presence.
For instance, you have nice thumbnails showing when you parse pictures, but they are rendered useless, as you can't browse through them ! As soon as you select the next one with stylus or finger, it pops opened (well, popping isn't really the appropriate word, if you consider how slow the process is )
Then the best way to browse a directory, is to open the SIP keyboard, but of course, not the Microsoft one, as it has no arrow keys (remember : Windows assumes a pad is present) : you have to open this nice, but oversized HTC one, you know, the one that has arrows, but no Ctrl key, and therefore is unable to copy and paste !...
As keyboard arrows do work in any situation, I really, really think we all lack a simple 4 direction pad (plus "action" button, the other four classical buttons being physically present, phew) that would take no room on the screen, and help us browsing files and menus, or playing games.
The virtual pad should be available in the keyboards and other input devices list, exactly the same way the others are.
Ideally, we could imagine a tiny one that would overlap the central button and take no room on the screen, but just occupy about half an inch in the center of the lower bar, plus the usual SIP input choice arrow, in order we can still change keyboards at will.
For older VGA ou QVGA games, a larger and more finger friendly version could be imagined, either just a thick line of buttons, or why not, a larger pad, as shown on Wolfenzi's nice picture.
Just consider that a lot of virtual keyboards are available, so It doesn't seem to be something impossible to do !
It would be just another keyboard, just having only 5 keys, and nothing else !!!
I actually really can't figure out why nobody seems to be interested by such a simple yet useful idea...
Oh, and as Maati, I'm ready to remunerate anyone who'd do the effort, too.
El_Mariachi said:
Nice idea, but what's the point in the WVGA screen then? Might as well get a Diamond!
Click to expand...
Click to collapse
Well, not as I see it, and support the need for such a utility.
This utility would allow older (no longer actively supported?) applications what were design for VGA and control (only!) thru the D-pad, to still work.
Of course, new applications will be written to fully use WVGA, and have control thru means other than the D-pad.
maati said:
My idea is to make a program that acts like WVGA-fix, that is, reducing the display area ( by 160 pixels in height) in order to make VGA applications compatible AND, at the same time, using the space gained at the bottom for a virtual D-Pad.
That would make many 3D games compatible and playable (becuase of the D-Pad) but also applications like Realcalculator or the SPB suite.
Does anyone want to do this? I'd donate at least 20 bucks and I guess there are lots of other people who would appreciate a solution like this.
Click to expand...
Click to collapse
+2 Ditto.
Z80-Man said:
Hello, sorry to unburry this topic, but I consider the concept is of premium importance.
First of all, I think it should have nothing to do with resizing the screen, as it would just complicate the process and slow down the programs...
Games and other software using the HD's missing pad are generally already VGA (if not QVGA) sized (considering recent WVGA games can use the touchscreen or the accelerometer), so they already display black unused sections on the screen (and by the way, a lot of useful apps, such as WVGAFix or Hou Ming's Force Hires already manage the lost margin and/or resize QVGA to VGA).
So it should only be about using this otherwise spilled and already existing dead zone to display a pad.
There are tons of applications for such a pad, and not only games !
Just browsing through directories can just be so painful without a pad, as Windows Mobile massively relies on its presence.
For instance, you have nice thumbnails showing when you parse pictures, but they are rendered useless, as you can't browse through them ! As soon as you select the next one with stylus or finger, it pops opened (well, popping isn't really the appropriate word, if you consider how slow the process is )
Then the best way to browse a directory, is to open the SIP keyboard, but of course, not the Microsoft one, as it has no arrow keys (remember : Windows assumes a pad is present) : you have to open this nice, but oversized HTC one, you know, the one that has arrows, but no Ctrl key, and therefore is unable to copy and paste !...
As keyboard arrows do work in any situation, I really, really think we all lack a simple 4 direction pad (plus "action" button, the other four classical buttons being physically present, phew) that would take no room on the screen, and help us browsing files and menus, or playing games.
The virtual pad should be available in the keyboards and other input devices list, exactly the same way the others are.
Ideally, we could imagine a tiny one that would overlap the central button and take no room on the screen, but just occupy about half an inch in the center of the lower bar, plus the usual SIP input choice arrow, in order we can still change keyboards at will.
For older VGA ou QVGA games, a larger and more finger friendly version could be imagined, either just a thick line of buttons, or why not, a larger pad, as shown on Wolfenzi's nice picture.
Just consider that a lot of virtual keyboards are available, so It doesn't seem to be something impossible to do !
It would be just another keyboard, just having only 5 keys, and nothing else !!!
I actually really can't figure out why nobody seems to be interested by such a simple yet useful idea...
Oh, and as Maati, I'm ready to remunerate anyone who'd do the effort, too.
Click to expand...
Click to collapse
hail to this simple, yet working solution.
and even include gestueres perhaps like windows and resco keyboard has.
why is it that we dont have this yet than??
sorry for my bad english
Hey, there's even worse than our good old Touch HD !
I recently tried a Touch HD 2 a friend wanted to show me (actually the guy who sold me his Touch HD ! ) and now there's an even biggest problem with HTC Sense (or maybe just Windows mobile 6.5) and the capacitive multitouch screen !
The good old scroll bars on the sides of the windows have been replaced by a thin line popping a slider when you press on it...
But, now it's all but precise !
As your finger now touches an entire area at the same time, it becomes almost impossible to scroll precisely to a desired position in a long list or directory (just try to go where you want in the Windows directory, and you'll go quickly mad) !!!
Maybe it would be better with a stylus, but there's no stylus provided with the Touch HD 2...
Or maybe it would be better using the arrows keys... The ones that should be on the pad if it was there...
Now you know why I told you that story !

anyone got VSpainter working?

I have downloaded vspainter LE from here:
http://www.virtualspaghetti.com/index.php?index=3&language=en
But when i start it it immediately crashes back to programs. It should be compatible right? its in the compatible software list on the xda wiki. Can anyone explain to me how to get it working?
Greetings.
edit: just installed vsbenchmark, and that completely froze my device... :-( really hope they fix those programs soon.
In order to use VSPainter, you have to install the WVGA Fix, and then switch your screen to 640*480, cause VSPainter doesn't work with a 800*480 resolution.
damnit! it would be soooo awesome in 800x480
I completely agree. It's a shame to see all these programs for WinMo which seem to have the resolution "hardcoded" in them, where every applications on a regular computer can adapt to any resolution you're using.
Zaza le Nounours said:
I completely agree. It's a shame to see all these programs for WinMo which seem to have the resolution "hardcoded" in them, where every applications on a regular computer can adapt to any resolution you're using.
Click to expand...
Click to collapse
you, you would think adaptive resolution wouldnt be that hard to create, even if its only getting bigger and bigger.
anyway, can someone advise me another drawing app, wich does work at 800 x480?
Snuurtje said:
you, you would think adaptive resolution wouldnt be that hard to create, even if its only getting bigger and bigger.
Click to expand...
Click to collapse
I must confess I don't know anything about programming. But even if the resolution of a program is not adaptive, the programs could been at least coded for the different resolutions used on telephones, as there isn't a lot of them : SQVGA, QVGA, SVGA, VGA, WVGA... and that's about it.
i know about programming (not professional) and imo its not that hard to program adaptive windows, especially because there is almost always an area that isnt fix (like a toolbar or something), which is the only thing that has to adapt.
anyways.. its a shame many programs dont work, especially vspainter which looks pretty good. there is lots of programming involved and i bet much more complex than an adaptive window
I guess they are just currently working on new versions (also for their other apps) to match the wvga resolution which is gaining momentum with the HD and the X1.
I use VirtualNotepad2 and they released a bug fix for WVGA but this leaves a lot to be desired since it just stretches the current graphics to WVGA mode making them a little bit blurry. I am really looking forward to their normal WVGA versions.
allright good to hear they are working on it. But i still need a little schetch app, if it were only to paint black lines and save it to .jpg Anyone able to recommend one that works?
Yaaaay, i found a great painting app! It's called pocket artist, it does a LOT i want a painting and photo editing to do. The only thing i havent managed to find is a layers function like in photoshop. Furthermore it does have a lot of similar functions photoshop does. Im in the process of uploading a youtube video i just shot.
here is the link its still converting though, should be up shortly:
http://nl.youtube.com/watch?v=vmfNqOHJxPU
this isn't so good, VSpainter is more powerful
To me Vspainter is worthless without it working fullscreen. By the way i have discovered layers in this app. You can do a lot with it what can be done with photoshop aswell. Precise selection, layers. gradient, text, diverse filters, cropping, resizing rotating.

Windows Mobile Development: RAM Problem

Hey!
First of all: I know that there are many solutions to exactly this problem, but none of them works...
I am currenty working on an Windows Mobile 6.1 professional Application with Visual Studio 2005 Standard Edition in c#. My mobile is a Samsung Omnia i900. Additionally i use the Windows Mobile SDK 6 professional.
My Problem: the app seems to get not enough memory for executation. If i load a large image (2mb) i get an "OutOfMemory"-Exception. Weird: if i run the app via Visual Studio (Deploy on Device) i cant load even pretty small images. When i start the app on the device, i can load bigger images, but i need to load images of 2 mb and that doesnt work either way! This application will get pretty large so i was wondering how this can work, when i only got 1-2 mb ram, even though the mobile tells me that there more than 50 mf ram free to use.
i know that you can free ram of older images, when i dont need em anymore with dispose() but i even fail to load one image, if its big enough.
i also tried the OpenNetCF, didnt work either!
this really drives me crazy as im looking for solutions for the last few days, nothing works! i mean, how can i create a biger app, if i only have 2 mb or Ram to run it in??
please please help!
Michael
P.S.: as i am pretty new to visual studio, i have another tiny question: i added some references (DLLs) to the project, that i do not need anymore! how can i remove those references? cannot find the command *too stupid*
Do you know if you're using DirectDraw in those .NET wrappers?
Windows Mobile powered devices have a graphical memory limit, which no one can do anything about :S
If you use GDI (slower, not hardware accelerated imaging API) I think you'll have less problems.
I work with native code, so I'm not sure you can make those choices using .NET, nor if this is your actual problem.
hey and thanks for responding!
well, as you say im not sure if i am using it! i use the normal System.Drawing Stuff. When i load a picuter i use Image i = new Bitmap(path) or paint with graphics.drawImage, either way the memory overflows! this is driving me crazy
Can you try developing this using native code?
well isnt that extremely complicated? i am quite new to that stuff, so i am horrorfied to even think about writing this in native code!
well i could give it a try, do you know some good tutorials for that? i can code a little java, delphi, haskell, prolog and C#, but all of these are pretty far away from machine language ,so native coding would be pretty hard for me!
Ahah it seems you're under the impression native code = Binary?
Native code, as opposed to Managed Code (C#, VB) is simply running C or C++, without the .NET sandbox around.
Maybe it's too much for now. I can't help with C# or VB, but I advise you to search for GDI and DirectDraw calls on Managed Code and see what you're using.
hehe, i was already wondering, what kind of dude you are, coding in machine language (that was my translation given by google). Ok, i think i can do some stuff in c++. Do i have to tell my visual studio explicitly not to use the .NET-framework when i start a C++ Mobile Device Project or is that the default configuration? sorry im really new to that, used to code in eclipse...
mhmpf! i like that wysiwyg stuff from c#, damn...
but thanks so far!
anybody else got any ideas? i mean it has to be possible... if not, ill try some c++
I suggest you just head over to MSDN.com and check what exactly those functions do. There's no point in learning "Windows driven" C++ if the problem rests in other place.
I'm almost sure there are GDI calls for .NET. I merely wanted you to try them!
hey, i am afraid i am already using the GDI-calls! Found several tutorials, which show how to load an image, exactly like i did it.
That's not good.
I must ask, why do you want 2mb images?
its a navigation-like software, and i need to load the complete image to be able to scroll smoothly through it! for the moment it works as i changed the image into a 600kb one... but im afraid, as the application gets bigger even those 600kb could be too much.when i implemented the other logics like routing and points of interest on the map, i think that will exceed those (apparently only) 2mb ram-space i have...
Sepplo said:
its a navigation-like software, and i need to load the complete image to be able to scroll smoothly through it! for the moment it works as i changed the image into a 600kb one... but im afraid, as the application gets bigger even those 600kb could be too much.when i implemented the other logics like routing and points of interest on the map, i think that will exceed those (apparently only) 2mb ram-space i have...
Click to expand...
Click to collapse
I think it's best to buffer the current position's image and the neighboring ones. When the position changes you automatically show the pre-buffered neighbor, free the previous ones and load the next. If there's a sudden change by a lot, you'll just say "loading" and buffer the new far away position with its neighbors.
Don't try to have the complete "maps" always fully available.
but when the application gets bigger (other things too come), im almost sure i will need more than 1,5mb ram, besides: if i just load parts of the picture, i need to make more changes on the MouseMove-Event, Scrolling will get laggy with that :/
(by the way, thanks a lot for helping me, i appreciate it very much!!)
No, it can be done, buffering is essential in graphical intensive applications on Windows Mobile... You have to keep in memory what you are displaying and the next probable ones
No problem, it's what we're here for
Try writing the code that loads the images in a seperate assembly (dll) and call that from the main exe.
Ta
Dave
Sepplo said:
My Problem: the app seems to get not enough memory for executation. If i load a large image (2mb) i get an "OutOfMemory"-Exception.
Click to expand...
Click to collapse
What kind of image is it? Remember that many image formats are compressed, so doing stuff with em takes more memory than you'd realize.
godefroi said:
What kind of image is it? Remember that many image formats are compressed, so doing stuff with em takes more memory than you'd realize.
Click to expand...
Click to collapse
How big is the image as a Bitmap (ie a .bmp) - this will tell you how much RAM it requires to load (plus overheads for the object)
Its probably best if you take the Google\Bing maps approach and split it into a number of smaller images and load\unload each one as you need it
TehPenguin said:
How big is the image as a Bitmap (ie a .bmp) - this will tell you how much RAM it requires to load (plus overheads for the object)
Its probably best if you take the Google\Bing maps approach and split it into a number of smaller images and load\unload each one as you need it
Click to expand...
Click to collapse
That's what I suggested, but he seems reluctant in buffering only the active and neighboring parts... I don't see any other way here =/
you guys were absolutely right! i knew before that jpeg is a compressed format, but the bmp is actually around 13mb big, that is really too much. Well i really will have to split the image. but thus week i have no time, due to another paper i have to write...
last question: what would be the best approach here?
1. one big panel and draw the images at the right position? (seems not good to me, cause i would have to repaint the panel with all images over and over again)
2. different panels to paint the pieces in?
3. different picture boxes to load the images into?
thanks very much for your help!
Sepplo said:
you guys were absolutely right! i knew before that jpeg is a compressed format, but the bmp is actually around 13mb big, that is really too much. Well i really will have to split the image. but thus week i have no time, due to another paper i have to write...
last question: what would be the best approach here?
1. one big panel and draw the images at the right position? (seems not good to me, cause i would have to repaint the panel with all images over and over again)
2. different panels to paint the pieces in?
3. different picture boxes to load the images into?
thanks very much for your help!
Click to expand...
Click to collapse
What do you mean by 'panel'?

Need app to run at higher res

Hi all,
unfortunately I only know a little of coding and do not have time to learn (full time student AND full time job = little time for extra activities) so I hope you can be helpful..
My father needs to emulate an HP41cv calculator on a mobile device. I found an emulator that does exactly that, only the mobile device is an HP IPAQ with 4.3" 800x480 screen running CE 5.0.
The problem is that:
a) the app loads too small on the screen
b) at the wrong orientation.
b) isnt such an issue as we can solve this by rotating the screen, provided a) can be solved.
to fix a) i think it has something to do with the size (and possibly orientation) of the background bmps, or could possibly be fixed by SCALE code?
the link to the original app is below. source code is attached. first it installs it on PC then installs CAB through ActiveSync or Device Center (im running Win7).
http://hp41.claughan.com/file/eV41 Setup 0.93.zip
Any help is greatly appreciated.

[Request] GNU Boy CE updated

GNU Boy CE is a GameBoy/GameBoy Color emulator for the Windows CE platform developed. As a result, this is the first and only emulator I have been able to run on my Omnia 2 for these consoles that have fully working sound with frame skipping set to 0. Believe it or not, this aging application already supports a touch screen based virtual controller.
Here is the link (where you will also find the source code for the newest version:
http://gnuboyce.berlios.de/
The only problem is that this application has not seen an update in about 7 years. So, the source code is assuming your screen size is tiny. The native resolution for the GameBoy games is 160 pixels wide. The emulator does have a x1.5 stretch in it which pushes that to 220 pixels. It would be nice to replace the 1.5 times stretch with a 2.5 times stretch (400 pixels wide and ideal for a WVGA resolution screen.)
From what I can tell the following files appear to deal with the screen output:
lcd.c
lcd.h
lcdc.c
The truth is that I am only a novice programmer. So honestly, I am only guessing at this. I am hoping someone would be so kind as to make the revision to the application and make a new CAB since everything else about it is ideal. It uses next to no system resources on a WM device and allows for true sound.
Thank-you ever so much to anyone who takes the effort. By all means, feel free to take this program further if you like because I imagine that with this simple change that this will quickly become the most sought after GameBoy/GameBoy Color emulator for WM devices.
This website has some more recent sources (another mod).
In there are also sources for other emus however they don't have direct draw display nor onscreen buttons. If anyone could add those feature it'd be really cool (maybe using PocketSnes source at least for the onscreen controls).
The source for that application is definitely newer. Unfortunately, no touch screen controls (I have an Omnia II which has no buttons to play the game with.) Same problem with this update as the last. The emulator needs to be updated to have a 2.5x stretch instead of a 1.5x stretch to take advantage of the resolution.

Categories

Resources