Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Utility to fix #includes Pin
Stephen Hewitt7-Jun-10 17:10
Stephen Hewitt7-Jun-10 17:10 
QuestionWhy not C++ reflection? Pin
milestanley6-Jun-10 23:25
milestanley6-Jun-10 23:25 
AnswerRe: Why not C++ reflection? Pin
CPallini6-Jun-10 23:44
mveCPallini6-Jun-10 23:44 
AnswerRe: Why not C++ reflection? Pin
Aescleal7-Jun-10 2:04
Aescleal7-Jun-10 2:04 
QuestionCustom ProgressBar Pin
AbhiHcl6-Jun-10 21:59
AbhiHcl6-Jun-10 21:59 
AnswerRe: Custom ProgressBar Pin
Niklas L6-Jun-10 22:50
Niklas L6-Jun-10 22:50 
GeneralRe: Custom ProgressBar Pin
AbhiHcl6-Jun-10 23:07
AbhiHcl6-Jun-10 23:07 
GeneralRe: Custom ProgressBar Pin
Niklas L6-Jun-10 23:31
Niklas L6-Jun-10 23:31 
If the image can be stretched you can do the following. (Its MFC and without error checking)

void CMyProgressCtrl::OnPaint()
{
	CPaintDC dc(this); // device context for painting
	
	CRect rc;
	GetClientRect(rc);

	int nLower, nUpper;
	GetRange(nLower, nUpper);

	int nPos = GetPos();

	int nWidth = (int) ((nPos / (float) (nUpper - nLower)) *rc.Width());

	BITMAP bm;
	m_bitmap.GetBitmap(&bm);

	CDC dc2;
	dc2.CreateCompatibleDC(&dc);
	CBitmap *pOldBitmap = dc2.SelectObject(&m_bitmap);

	dc.StretchBlt(rc.left, rc.top, nWidth, rc.Height(), &dc2, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);

	dc2.SelectObject(pOldBitmap);
}


GeneralRe: Custom ProgressBar Pin
AbhiHcl7-Jun-10 0:02
AbhiHcl7-Jun-10 0:02 
GeneralRe: Custom ProgressBar Pin
Niklas L7-Jun-10 1:14
Niklas L7-Jun-10 1:14 
GeneralRe: Custom ProgressBar Pin
AbhiHcl7-Jun-10 1:28
AbhiHcl7-Jun-10 1:28 
GeneralRe: Custom ProgressBar Pin
Niklas L7-Jun-10 1:44
Niklas L7-Jun-10 1:44 
QuestionRe: Custom ProgressBar Pin
David Crow7-Jun-10 4:12
David Crow7-Jun-10 4:12 
Questionfatal error C1900 Pin
T.RATHA KRISHNAN6-Jun-10 18:07
T.RATHA KRISHNAN6-Jun-10 18:07 
AnswerRe: fatal error C1900 Pin
Stephen Hewitt6-Jun-10 18:08
Stephen Hewitt6-Jun-10 18:08 
GeneralRe: fatal error C1900 Pin
T.RATHA KRISHNAN7-Jun-10 0:21
T.RATHA KRISHNAN7-Jun-10 0:21 
GeneralRe: fatal error C1900 Pin
Stephen Hewitt7-Jun-10 14:03
Stephen Hewitt7-Jun-10 14:03 
QuestionRe: fatal error C1900 Pin
David Crow7-Jun-10 4:14
David Crow7-Jun-10 4:14 
QuestionDoxygen is melting my face, need pointers Pin
Trevor Johansen6-Jun-10 8:24
Trevor Johansen6-Jun-10 8:24 
AnswerRe: Doxygen is melting my face, need pointers Pin
Aescleal6-Jun-10 8:29
Aescleal6-Jun-10 8:29 
GeneralRe: Doxygen is melting my face, need pointers Pin
Trevor Johansen6-Jun-10 8:46
Trevor Johansen6-Jun-10 8:46 
GeneralRe: Doxygen is melting my face, need pointers Pin
Aescleal6-Jun-10 11:01
Aescleal6-Jun-10 11:01 
AnswerRe: Doxygen is melting my face, need pointers Pin
Moak6-Jun-10 10:18
Moak6-Jun-10 10:18 
GeneralRe: Doxygen is melting my face, need pointers Pin
Trevor Johansen6-Jun-10 12:29
Trevor Johansen6-Jun-10 12:29 
QuestionBitblt Transparency question Pin
ForNow5-Jun-10 23:31
ForNow5-Jun-10 23:31 

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.