void DrawSelect(HDC destDC,int fromX,int fromY, int toX, int toY) { int tmpfromX,tmpfromY,tmptoX,tmptoY; if(toX>=fromX){ tmpfromX=fromX; tmptoX=toX; }else{ tmpfromX=toX; tmptoX=fromX; } if(toY>=fromY){ tmpfromY=fromY; tmptoY=toY; }else{ tmpfromY=toY; tmptoY=fromY; } BitBlt(destDC,tmpfromX,tmpfromY,tmptoX-tmpfromX,tmptoY-tmpfromY,destDC,tmpfromX,tmpfromY,DSTINVERT); }