Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiongcov linker errors Pin
Vaclav_30-Jan-20 9:05
Vaclav_30-Jan-20 9:05 
AnswerRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 9:15
mveRichard MacCutchan30-Jan-20 9:15 
GeneralRe: gcov linker errors Pin
Vaclav_30-Jan-20 9:49
Vaclav_30-Jan-20 9:49 
GeneralRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 9:55
mveRichard MacCutchan30-Jan-20 9:55 
GeneralRe: gcov linker errors Pin
leon de boer30-Jan-20 21:43
leon de boer30-Jan-20 21:43 
GeneralRe: gcov linker errors Pin
Vaclav_31-Jan-20 5:32
Vaclav_31-Jan-20 5:32 
AnswerSOLVED Re: gcov linker errors Pin
Vaclav_30-Jan-20 10:30
Vaclav_30-Jan-20 10:30 
QuestionPNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 2:53
sdancer7530-Jan-20 2: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 6:29
mveRichard MacCutchan30-Jan-20 6:29 
AnswerRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 6:53
sdancer7530-Jan-20 6:53 
QuestionIGNORE THIS !!! file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 5:45
Vaclav_29-Jan-20 5:45 
AnswerRe: file not recognized: File format not recognized Pin
k505429-Jan-20 6:03
mvek505429-Jan-20 6:03 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 6:44
Vaclav_29-Jan-20 6:44 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 6:58
Vaclav_29-Jan-20 6:58 
GeneralRe: file not recognized: File format not recognized Pin
k505429-Jan-20 7:15
mvek505429-Jan-20 7:15 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 15:39
Vaclav_29-Jan-20 15:39 
Questionreplace words in a file Pin
Member 1295754729-Jan-20 4:19
Member 1295754729-Jan-20 4:19 
AnswerRe: replace words in a file Pin
Victor Nijegorodov29-Jan-20 5:30
Victor Nijegorodov29-Jan-20 5:30 
GeneralRe: replace words in a file Pin
Member 1295754729-Jan-20 5:34
Member 1295754729-Jan-20 5:34 
GeneralRe: replace words in a file Pin
k505429-Jan-20 5:52
mvek505429-Jan-20 5:52 
AnswerRe: replace words in a file Pin
k505429-Jan-20 5:42
mvek505429-Jan-20 5:42 
SuggestionRe: replace words in a file Pin
David Crow29-Jan-20 17:04
David Crow29-Jan-20 17:04 
AnswerRe: replace words in a file Pin
Stefan_Lang29-Jan-20 21:21
Stefan_Lang29-Jan-20 21:21 
QuestionLinking libraries - follow-up- gcc++ won't link Pin
Vaclav_28-Jan-20 4:22
Vaclav_28-Jan-20 4:22 
AnswerRe: Linking libraries - follow-up- gcc++ won't link Pin
Richard MacCutchan28-Jan-20 5:04
mveRichard MacCutchan28-Jan-20 5: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.