Click here to Skip to main content
15,844,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiongcov linker errors Pin
Vaclav_30-Jan-20 10:05
Vaclav_30-Jan-20 10:05 
AnswerRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 10:15
mveRichard MacCutchan30-Jan-20 10:15 
GeneralRe: gcov linker errors Pin
Vaclav_30-Jan-20 10:49
Vaclav_30-Jan-20 10:49 
GeneralRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 10:55
mveRichard MacCutchan30-Jan-20 10:55 
GeneralRe: gcov linker errors Pin
leon de boer30-Jan-20 22:43
leon de boer30-Jan-20 22:43 
GeneralRe: gcov linker errors Pin
Vaclav_31-Jan-20 6:32
Vaclav_31-Jan-20 6:32 
AnswerSOLVED Re: gcov linker errors Pin
Vaclav_30-Jan-20 11:30
Vaclav_30-Jan-20 11:30 
QuestionPNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 3:53
sdancer7530-Jan-20 3:53 
Using the code below (called from void CLoadPngDlg::OnPaint()) I am trying to view a PNG file that already included in the resource (IDB_FULLSCRINFOBAR_OPAQ_TEST).

As you can see in the image attached the bottom red line and the rightmost column of pixels are not shown.

https://i.imgur.com/Ug6gYjr.jpg

Image Attached[^]


What seems to be the problem here?

C++
BOOL CLoadPngDlg::ShowPngAt(CDC *dcWnd) {	

	CGdiPlusBitmapResource		*pPngChannel;
	UINT						nWidth,nHeight;
	CRect						rectClient;
	CBitmap						Bitmap, *pOldBitmap;	
	CDC							bitmapDC;
	CDC							*dialogDC;

	pPngChannel	= NULL;
	pPngChannel = new CGdiPlusBitmapResource;

	if (!pPngChannel->Load(IDB_FULLSCRINFOBAR_OPAQ_TEST, _T("PNG"))) {
		delete pPngChannel;
		return TRUE;
	}

	GetWindowRect(&rectClient);

	// Get size of bitmap.
	nWidth = pPngChannel->m_pBitmap->GetWidth();
	nHeight = pPngChannel->m_pBitmap->GetHeight();

	bitmapDC.CreateCompatibleDC( dcWnd ); 
	Bitmap.CreateCompatibleBitmap(dcWnd, nWidth, nHeight);
	pOldBitmap = bitmapDC.SelectObject(&Bitmap);	

	Gdiplus::Graphics graphics(bitmapDC.GetSafeHdc());										
	graphics.DrawImage(*pPngChannel, 0, 0);

	dcWnd->BitBlt(0, 0, rectClient.Width(), rectClient.Height(), &bitmapDC,   0,  0,   SRCCOPY );

	bitmapDC.SelectObject( pOldBitmap );
	bitmapDC.DeleteDC();


	if (pPngChannel != NULL)
		delete pPngChannel;


	return FALSE;

}

sdancer75

QuestionRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
Richard MacCutchan30-Jan-20 7:29
mveRichard MacCutchan30-Jan-20 7:29 
AnswerRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 7:53
sdancer7530-Jan-20 7:53 
QuestionIGNORE THIS !!! file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 6:45
Vaclav_29-Jan-20 6:45 
AnswerRe: file not recognized: File format not recognized Pin
k505429-Jan-20 7:03
mvek505429-Jan-20 7:03 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 7:44
Vaclav_29-Jan-20 7:44 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 7:58
Vaclav_29-Jan-20 7:58 
GeneralRe: file not recognized: File format not recognized Pin
k505429-Jan-20 8:15
mvek505429-Jan-20 8:15 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 16:39
Vaclav_29-Jan-20 16:39 
Questionreplace words in a file Pin
Member 1295754729-Jan-20 5:19
Member 1295754729-Jan-20 5:19 
AnswerRe: replace words in a file Pin
Victor Nijegorodov29-Jan-20 6:30
Victor Nijegorodov29-Jan-20 6:30 
GeneralRe: replace words in a file Pin
Member 1295754729-Jan-20 6:34
Member 1295754729-Jan-20 6:34 
GeneralRe: replace words in a file Pin
k505429-Jan-20 6:52
mvek505429-Jan-20 6:52 
AnswerRe: replace words in a file Pin
k505429-Jan-20 6:42
mvek505429-Jan-20 6:42 
SuggestionRe: replace words in a file Pin
David Crow29-Jan-20 18:04
David Crow29-Jan-20 18:04 
AnswerRe: replace words in a file Pin
Stefan_Lang29-Jan-20 22:21
Stefan_Lang29-Jan-20 22:21 
QuestionLinking libraries - follow-up- gcc++ won't link Pin
Vaclav_28-Jan-20 5:22
Vaclav_28-Jan-20 5:22 
AnswerRe: Linking libraries - follow-up- gcc++ won't link Pin
Richard MacCutchan28-Jan-20 6:04
mveRichard MacCutchan28-Jan-20 6:04 

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.