PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

stylus in True VGA

I have tested this out on a Dell Axim X50v. If I put the my device in True VGA using SE_VGA http://www.pocketgear.com/software_detail.asp?id=14679 and run my program, it display at QVGA, but the stylus still maps to real VGA. I'm using 3.5. Any suggestions on how to get around this?
Um. It shouldn't use QVGA on SE_VGA. It doesn't on my hx4700.

Can you please check if the flag GDDISPLAY_HI_RES_AWARE is set in OpenDisplay?
I want it to display in QVGA (240x320), so I didn't set the flag at all. It's just that if my Dell is in standard VGA the display and stylus will be in QVGA when my GapiDraw program loads up, but if I'm in real VGA, the display will be QVGA and the stylus will be VGA.

So, if I clicked on pixel (x=5, y=100), my program responds as if pixel (x=10, y=200) was clicked, since when I am in True VGA mode, my program pixel doubles or however GapiDraw does it, but the stylus is not.

I can email this to you so you can try it out yourself. Let me know.
OK, I found a way around this.

First I check for true VGA like this in the CGapiApplication constructor.
Code:

if(::GetSystemMetrics(SM_CXSCREEN) == 480 && ::GetSystemMetrics(SM_CYSCREEN) == 640)
{
m_bIsTrueVGA = true;
}
else if(::GetSystemMetrics(SM_CXSCREEN) == 640 && ::GetSystemMetrics(SM_CYSCREEN) == 480)
{
m_bIsTrueVGA = true;
}
else
{
m_bIsTrueVGA = false;
}


Then I just fix the stylus like this in the stylus events in WindowProc.
Code:

if(m_bIsTrueVGA)
{
p.x = p.x >> 1;
p.y = p.y >> 1;
}


Now, the stylus works in both VGA modes.