Discussione: C++ reversare l'asse Y
View Single Post
Old 04-04-2003, 12:35   #5
cionci
Senior Member
 
L'Avatar di cionci
 
Iscritto dal: Apr 2000
Cittā: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
int SetMapMode(
HDC hdc, // handle to device context
int fnMapMode // new mapping mode
);

MM_LOMETRIC Each logical unit is mapped to 0.1 millimeter. Positive x is to the right; positive y is up.

Comunque se vuoi continuare a lvaorare in pixel...ti basta una cosa del genere...
Codice:
inline LONG _y(LONG y, HWND wnd = INVALID_HANDLE_VALUE)
{
   static LONG clientHeight = 0;
   if(wnd != INVALID_HANDLE_VALUE)
   {
      RECT r;      
      if(!GetClientRect(wnd, &r))
         return -1;
      clientHeight = r.bottom - r.top;
   }
   return clientHeight - y;
}
cionci č offline   Rispondi citando il messaggio o parte di esso