Font problem with OwnerDrawnList on CF1 VGA

G

Guest

I wonder if anyone else has encountered (and fixed) this. The Google yields
nothing.

Using OwnerDrawnList from OpenNETCF, I find that on CF1 VGA devices (e.g.
2003SE) when the list is drawn to a bitmap then blitted, the font is all
jagged and pixelated.

When selecting an item, the row is drawn directly to the screen, and appears
fine.

My guess is that the offscreen bitmap is of insufficient depth for the VGA
screen, but in CF1 there's no option to specify the PixelFormat when creating
the bitmap.

Any suggestions would be appreciated!
 
G

Guest

I'm not sure I'd agree with that guess (though it could be right). What
size is your form? 240x320? It's quite possible that the graininess is due
to simple pixel-doubling of the font as it tries to scale up the smaller
Form to fit VGA resolution. You can change the scale mode for the Form to
prevent this (and then you need to adjust the form to manually fit the
target resolution).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
 
G

Guest

You're right. The form and off-screen bitmap are 240x320. When the bitmap is
blitted, it's scaled up to fill the VGA screen, causing the font to appear
jagged.

This is happening in the CF1 build of our application. CF1 seems to handle
scaling by itself, and I can't locate a means to change the scale mode. Am I
missing something?

--
David



I'm not sure I'd agree with that guess (though it could be right). What
size is your form? 240x320? It's quite possible that the graininess is due
to simple pixel-doubling of the font as it tries to scale up the smaller
Form to fit VGA resolution. You can change the scale mode for the Form to
prevent this (and then you need to adjust the form to manually fit the
target resolution).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
 
G

Guest

I just checked and it appears that CF 1.0 Forms don't have an AutoScale
property. You might try creating an actual 480x640 Form and see if the
device still tries to scale that. If not then you're in luck - you just
have to determine the screen resolution at startup and show a VGA form if
it's a VGA device. Of course if the screen gets rotated that's another
variable to contend with.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com






David said:
You're right. The form and off-screen bitmap are 240x320. When the bitmap
is
blitted, it's scaled up to fill the VGA screen, causing the font to appear
jagged.

This is happening in the CF1 build of our application. CF1 seems to
handle
scaling by itself, and I can't locate a means to change the scale mode. Am
I
missing something?
 
G

Guest

Scalling and DPI aware app development in CF1 is a real kludge - it is
greatly improved in CF2.0. CF 1; the OS will scale the app to fit the VGA
screen size as you are finding.

You can override this by changing the subsystem version in the executable
header and setting the HI_RES_AWARE flag.

Any app compiled against 4.2 or lower of the Pocket PC SDK will be scaled by
the OS.

There is a tool that allows you to do this easily in managed code, I can't
remember it's name, but googling "HI_RES_AWARE" should bring in some hits..

But, even if you made your screen (640x480) it will still be scalled unless
you tell the OS not to scale as mentioned above.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


David said:
You're right. The form and off-screen bitmap are 240x320. When the bitmap is
blitted, it's scaled up to fill the VGA screen, causing the font to appear
jagged.

This is happening in the CF1 build of our application. CF1 seems to handle
scaling by itself, and I can't locate a means to change the scale mode. Am I
missing something?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top