Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralClistbox greying Pin
SVPG17-Feb-04 23:43
SVPG17-Feb-04 23:43 
GeneralRe: Clistbox greying Pin
sps-itsec4618-Feb-04 0:30
sps-itsec4618-Feb-04 0:30 
GeneralRe: Clistbox greying Pin
SVPG18-Feb-04 0:36
SVPG18-Feb-04 0:36 
GeneralRe: Clistbox greying Pin
Robert A. T. Káldy18-Feb-04 0:53
Robert A. T. Káldy18-Feb-04 0:53 
GeneralRe: Clistbox greying Pin
sps-itsec4618-Feb-04 1:29
sps-itsec4618-Feb-04 1:29 
GeneralRe: Dialog application on TOP Pin
Robert A. T. Káldy17-Feb-04 23:36
Robert A. T. Káldy17-Feb-04 23:36 
GeneralRe: Dialog application on TOP Pin
neokialo17-Feb-04 23:47
neokialo17-Feb-04 23:47 
GeneralRotating a BitMap Pin
Pazzuzu17-Feb-04 23:13
Pazzuzu17-Feb-04 23:13 
Hi,

Iam in trouble rotating the bitmap.
Iam doing it as follows:

HBITMAP handle;
//Functin from which I get a handle
//to the Bitmap.

handle = GetBitmapHandle();
CDC dcMemory;
dcMemory.CreateCompatibleDC(pDC);
CBitmap *bitmap=CBitmap::FromHandle(handle);
BITMAP bm;
bitmap->GetBitmap(&bm);
//Rotating the Bitmap by 90.
XFORM xFormBarcode;
SetGraphicsMode(pDC->GetSafeHdc(),GM_ADVANCED);
xFormBarcode.eM11 = (FLOAT)cos(90*DEGREES2RADIANS);
xFormBarcode.eM12 = (FLOAT)sin(90*DEGREES2RADIANS);
xFormBarcode.eM21 = (FLOAT)-sin(90*DEGREES2RADIANS);
xFormBarcode.eM22 = (FLOAT) cos(90*DEGREES2RADIANS);
xFormBarcode.eDx = 0;
xFormBarcode.eDy = 0;


int xCord =0;
int yCord =0;

int x =abs((xCord*(FLOAT)cos(90*DEGREES2RADIANS)) + (yCord * (FLOAT)-sin(90*DEGREES2RADIANS)));
int y = (xCord*(FLOAT)sin(90*DEGREES2RADIANS)) + (yCord * (FLOAT)cos(90*DEGREES2RADIANS));

SetWorldTransform(pDC->GetSafeHdc(),&xFormBarcode);



CBitmap* pOldBitmap = dcMemory.SelectObject(bitmap);
double bmWidth = bm.bmWidth;
double bmHeight = bm.bmHeight;

pDC->BitBlt(100,100,bm.bmWidth,bm.bmHeight, &dcMemory, 0,0,SRCCOPY);
dcMemory.SelectObject(pOldBitmap);


I can't see the rotated effect.How Could I rotate it..

Any help is appreciated...

Thanks...
GeneralRe: Rotating a BitMap Pin
TchouTchou Project18-Feb-04 2:52
TchouTchou Project18-Feb-04 2:52 
GeneralRe: Rotating a BitMap Pin
Pazzuzu18-Feb-04 2:55
Pazzuzu18-Feb-04 2:55 
GeneralQuestion on CEvent Pin
DimpleSurana17-Feb-04 22:14
DimpleSurana17-Feb-04 22:14 
GeneralRe: Question on CEvent Pin
Prakash Nadar17-Feb-04 22:20
Prakash Nadar17-Feb-04 22:20 
GeneralRe: Question on CEvent Pin
DimpleSurana17-Feb-04 22:27
DimpleSurana17-Feb-04 22:27 
GeneralRe: Question on CEvent Pin
DimpleSurana17-Feb-04 22:28
DimpleSurana17-Feb-04 22:28 
GeneralRe: Question on CEvent Pin
Prakash Nadar17-Feb-04 23:06
Prakash Nadar17-Feb-04 23:06 
GeneralRe: Question on CEvent Pin
DimpleSurana17-Feb-04 23:11
DimpleSurana17-Feb-04 23:11 
GeneralRe: Question on CEvent Pin
_Magnus_17-Feb-04 23:21
_Magnus_17-Feb-04 23:21 
GeneralRe: Question on CEvent Pin
DimpleSurana17-Feb-04 23:31
DimpleSurana17-Feb-04 23:31 
GeneralRe: Question on CEvent Pin
_Magnus_17-Feb-04 23:35
_Magnus_17-Feb-04 23:35 
GeneralRe: Question on CEvent Pin
DimpleSurana17-Feb-04 23:49
DimpleSurana17-Feb-04 23:49 
GeneralRe: Question on CEvent Pin
_Magnus_17-Feb-04 23:52
_Magnus_17-Feb-04 23:52 
GeneralRe: Question on CEvent Pin
DimpleSurana18-Feb-04 0:10
DimpleSurana18-Feb-04 0:10 
GeneralRe: Question on CEvent Pin
DimpleSurana18-Feb-04 0:50
DimpleSurana18-Feb-04 0:50 
GeneralRe: Question on CEvent Pin
Antti Keskinen18-Feb-04 0:54
Antti Keskinen18-Feb-04 0:54 
GeneralRe: Question on CEvent Pin
_Magnus_18-Feb-04 1:14
_Magnus_18-Feb-04 1:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.