Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Does a CListCtrl accepts a member variable name in edit mode? Pin
Mark Salsbery22-Jun-07 5:44
Mark Salsbery22-Jun-07 5:44 
GeneralRe: Does a CListCtrl accepts a member variable name in edit mode? Pin
Arris7422-Jun-07 7:40
Arris7422-Jun-07 7:40 
GeneralRe: Does a CListCtrl accepts a member variable name in edit mode? Pin
Mark Salsbery22-Jun-07 8:03
Mark Salsbery22-Jun-07 8:03 
Questionhow to get Unique ID of a device Pin
VC_RYK22-Jun-07 4:52
VC_RYK22-Jun-07 4:52 
QuestionApplication Hang Pin
cpp_prgmer22-Jun-07 4:18
cpp_prgmer22-Jun-07 4:18 
QuestionRe: Application Hang Pin
David Crow22-Jun-07 4:31
David Crow22-Jun-07 4:31 
AnswerRe: Application Hang Pin
cpp_prgmer24-Jun-07 19:00
cpp_prgmer24-Jun-07 19:00 
QuestionRe: Application Hang Pin
Hamid_RT22-Jun-07 4:34
Hamid_RT22-Jun-07 4:34 
AnswerRe: Application Hang Pin
Jonathan [Darka]22-Jun-07 4:54
professionalJonathan [Darka]22-Jun-07 4:54 
GeneralRe: Application Hang Pin
cpp_prgmer24-Jun-07 19:02
cpp_prgmer24-Jun-07 19:02 
GeneralRe: Application Hang Pin
cpp_prgmer25-Jun-07 0:45
cpp_prgmer25-Jun-07 0:45 
Questionphp.h header file missing Pin
Kiran Pinjala22-Jun-07 3:50
Kiran Pinjala22-Jun-07 3:50 
QuestionRe: php.h header file missing Pin
David Crow22-Jun-07 4:34
David Crow22-Jun-07 4:34 
Questionreturn value - destructor call? Pin
zqueezy22-Jun-07 2:45
zqueezy22-Jun-07 2:45 
AnswerRe: return value - destructor call? Pin
Iain Clarke, Warrior Programmer22-Jun-07 3:01
Iain Clarke, Warrior Programmer22-Jun-07 3:01 
GeneralRe: return value - destructor call? Pin
zqueezy22-Jun-07 3:12
zqueezy22-Jun-07 3:12 
GeneralRe: return value - destructor call? Pin
Iain Clarke, Warrior Programmer22-Jun-07 4:05
Iain Clarke, Warrior Programmer22-Jun-07 4:05 
AnswerRe: return value - destructor call? Pin
Nemanja Trifunovic22-Jun-07 3:03
Nemanja Trifunovic22-Jun-07 3:03 
GeneralRe: return value - destructor call? Pin
zqueezy22-Jun-07 3:24
zqueezy22-Jun-07 3:24 
GeneralRe: return value - destructor call? Pin
Nemanja Trifunovic22-Jun-07 3:28
Nemanja Trifunovic22-Jun-07 3:28 
AnswerRe: return value - destructor call? Pin
Iain Clarke, Warrior Programmer22-Jun-07 3:03
Iain Clarke, Warrior Programmer22-Jun-07 3:03 
AnswerRe: return value - destructor call? Pin
Taka Muraoka22-Jun-07 3:06
Taka Muraoka22-Jun-07 3:06 
GeneralRe: return value - destructor call? Pin
zqueezy22-Jun-07 3:14
zqueezy22-Jun-07 3:14 
AnswerRe: return value - destructor call? Pin
zqueezy25-Jun-07 11:27
zqueezy25-Jun-07 11:27 
QuestionRotating Bitmaps !!!! Pin
Adno22-Jun-07 2:43
Adno22-Jun-07 2:43 
Im using this method needless to say is not working and need some help.

void rotateb(Bitmap* image, HDC dc){<br />
	Graphics graphics(dc);<br />
	Bitmap* SrcBitmap1 = image;<br />
	Color mc;<br />
<br />
	int angle=45;        //45° for example <br />
	//Convert degrees to radians <br />
	float radians=(2*3.1416*angle)/360; <br />
<br />
	float cosine=(float)cos(radians); <br />
	float sine=(float)sin(radians); <br />
<br />
	float Point1x=(-SrcBitmap1->GetHeight()*sine); <br />
	float Point1y=(SrcBitmap1->GetHeight()*cosine); <br />
	float Point2x=(SrcBitmap1->GetWidth()*cosine-SrcBitmap1->GetHeight()*sine); <br />
	float Point2y=(SrcBitmap1->GetHeight()*cosine+SrcBitmap1->GetWidth()*sine); <br />
	float Point3x=(SrcBitmap1->GetWidth()*cosine); <br />
	float Point3y=(SrcBitmap1->GetWidth()*sine); <br />
<br />
<br />
	float minx=min(0,min(Point1x,min(Point2x,Point3x))); <br />
	float miny=min(0,min(Point1y,min(Point2y,Point3y))); <br />
	float maxx=max(Point1x,max(Point2x,Point3x)); <br />
	float maxy=max(Point1y,max(Point2y,Point3y)); <br />
<br />
	int DestBitmapWidth=(int)ceil(fabs(maxx)-minx); <br />
	int DestBitmapHeight=(int)ceil(fabs(maxy)-miny);<br />
<br />
	Bitmap* DestBitmap = new Bitmap(DestBitmapWidth, DestBitmapHeight);<br />
<br />
	//----------<br />
	for(int x=0;x<DestBitmapWidth;x++) <br />
	{ <br />
	  for(int y=0;y<DestBitmapHeight;y++) <br />
	  { <br />
		int SrcBitmapx=(int)((x+minx)*cosine+(y+miny)*sine); <br />
		int SrcBitmapy=(int)((y+miny)*cosine-(x+minx)*sine); <br />
		if(SrcBitmapx>=0&&SrcBitmapx<SrcBitmap1->GetWidth() && SrcBitmapy>= 0 && <br />
			 SrcBitmapy<SrcBitmap1->GetHeight()) <br />
		{ <br />
			SrcBitmap1->GetPixel(SrcBitmapx,SrcBitmapy,&mc);<br />
			DestBitmap->SetPixel(x,y,mc);<br />
		} <br />
	  } <br />
	} <br />
<br />
	graphics.DrawImage(DestBitmap,0, 0); <-- this does not <br />
	//graphics.DrawImage(SrcBitmap1,0,0); <-- this displays <br />
}


Thank you

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.