Click here to Skip to main content
15,912,069 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to load a png image in PictureControl? Pin
yu-jian29-Jan-13 15:40
yu-jian29-Jan-13 15:40 
C++
#include "atlimage.h"

Image*	m_pImage;

char *pStr = strTempIMGPath.GetBuffer(0);
int size = MultiByteToWideChar(GetACP(), 0, pStr, -1, NULL, 0);
MultiByteToWideChar(GetACP(), 0, pStr, -1, szFile, size);
strTempIMGPath.ReleaseBuffer();
if (m_pImage != NULL)
{
	delete m_pImage;
	m_pImage = NULL;
}
m_pImage = new Image(szFile, FALSE);


void CPNGButton::OnPaint()
{
	CPaintDC dc(this);
	Graphics graphics(dc.m_hDC);
	if(m_pImage != NULL && (m_pImage->GetLastStatus() == Gdiplus::Status::Ok))
	{
		graphics.DrawImage(m_pImage, 0, 0, m_pImage->GetWidth(), m_pImage->GetHeight());
	}
}

GeneralRe: How to load a png image in PictureControl? Pin
VCProgrammer30-Jan-13 22:19
VCProgrammer30-Jan-13 22:19 
GeneralRe: How to load a png image in PictureControl? Pin
yu-jian1-Feb-13 4:04
yu-jian1-Feb-13 4:04 
GeneralRe: How to load a png image in PictureControl? Pin
VCProgrammer4-Feb-13 1:24
VCProgrammer4-Feb-13 1:24 
QuestionIn win7 ,how to modify registry with Non - administrator permission Pin
haha_c28-Jan-13 21:08
haha_c28-Jan-13 21:08 
AnswerRe: In win7 ,how to modify registry with Non - administrator permission Pin
Jochen Arndt28-Jan-13 21:38
professionalJochen Arndt28-Jan-13 21:38 
GeneralRe: In win7 ,how to modify registry with Non - administrator permission Pin
haha_c28-Jan-13 22:02
haha_c28-Jan-13 22:02 
GeneralRe: In win7 ,how to modify registry with Non - administrator permission Pin
Jochen Arndt28-Jan-13 22:57
professionalJochen Arndt28-Jan-13 22:57 
GeneralRe: In win7 ,how to modify registry with Non - administrator permission Pin
haha_c28-Jan-13 23:18
haha_c28-Jan-13 23:18 
GeneralRe: In win7 ,how to modify registry with Non - administrator permission Pin
Jochen Arndt28-Jan-13 23:33
professionalJochen Arndt28-Jan-13 23:33 
QuestionGet CBitmap from CDib Pin
_Flaviu28-Jan-13 20:30
_Flaviu28-Jan-13 20:30 
AnswerRe: Get CBitmap from CDib Pin
Jochen Arndt28-Jan-13 21:31
professionalJochen Arndt28-Jan-13 21:31 
QuestionAbout virtual function Pin
EhtishamArshad28-Jan-13 19:40
EhtishamArshad28-Jan-13 19:40 
AnswerRe: About virtual function Pin
Jibesh28-Jan-13 19:51
professionalJibesh28-Jan-13 19:51 
GeneralRe: About virtual function Pin
EhtishamArshad28-Jan-13 22:32
EhtishamArshad28-Jan-13 22:32 
AnswerRe: About virtual function Pin
Richard MacCutchan28-Jan-13 22:48
mveRichard MacCutchan28-Jan-13 22:48 
Questionwhere can download comment macro? Pin
yu-jian28-Jan-13 15:36
yu-jian28-Jan-13 15:36 
AnswerRe: where can download comment macro? Pin
Jibesh28-Jan-13 19:48
professionalJibesh28-Jan-13 19:48 
QuestionFilter the EN_KILLFOCUS message from CIPAddressCtrl Pin
zhangyoung28-Jan-13 14:53
zhangyoung28-Jan-13 14:53 
AnswerRe: Filter the EN_KILLFOCUS message from CIPAddressCtrl Pin
Code-o-mat28-Jan-13 22:27
Code-o-mat28-Jan-13 22:27 
GeneralRe: Filter the EN_KILLFOCUS message from CIPAddressCtrl Pin
zhangyoung29-Jan-13 3:04
zhangyoung29-Jan-13 3:04 
GeneralRe: Filter the EN_KILLFOCUS message from CIPAddressCtrl Pin
Code-o-mat29-Jan-13 3:13
Code-o-mat29-Jan-13 3:13 
QuestionHow to create an uncompressed avi file from a matrix of data? Pin
Kiran Satish27-Jan-13 16:40
Kiran Satish27-Jan-13 16:40 
QuestionRe: How to create an uncompressed avi file from a matrix of data? Pin
CPallini27-Jan-13 22:38
mveCPallini27-Jan-13 22:38 
AnswerRe: How to create an uncompressed avi file from a matrix of data? Pin
Kiran Satish28-Jan-13 4:42
Kiran Satish28-Jan-13 4:42 

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.