This site is no longer active and is available for archival purposes only. Registration and login is disabled.

GetPixel()


GetPixel()

Postby maoz » Sep 7, 2003 @ 3:14pm

Hi all,
I am trying to GetPixel(x,y) of a specific Surface on stylus down event.
Well, following the code i wrote and it doesn't work.


m_surf = LoadImage(display, IDB_WHAT_EVER);

HDC hDC = m_region_table->GetDC ();
if( hDC ) {
COLORREF c = GetPixel(hDC, stylus.x, stylus.y);
int b = GetBValue(c);
int r = GetRValue(c);
int g = GetGValue(c);
m_region_table->ReleaseDC( hDC );
}

Any idea?
Regards Maoz.
maoz
 


Postby BurningSheep » Sep 8, 2003 @ 9:49am

You don't need to get the DC of a surface to use GetPixel().

color = m_surface.GetPixel(stylus.x, stylus.y);
Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron