Click here to Skip to main content
15,890,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Mikhail Edoshin2-Mar-11 23:29
Mikhail Edoshin2-Mar-11 23:29 
AnswerRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Hans Dietrich2-Mar-11 16:45
mentorHans Dietrich2-Mar-11 16:45 
GeneralRe: MFC app doesn't repaint when a non-MFC dll shows a modal dialog Pin
Mikhail Edoshin2-Mar-11 23:22
Mikhail Edoshin2-Mar-11 23:22 
QuestionOpening Disk Defragmenter from inside a WIN32 app [modified] Pin
dipuks2-Mar-11 9:04
dipuks2-Mar-11 9:04 
AnswerRe: Opening Disk Defragmenter from inside a WIN32 app Pin
David Crow2-Mar-11 9:24
David Crow2-Mar-11 9:24 
AnswerRe: Opening Disk Defragmenter from inside a WIN32 app Pin
Niklas L2-Mar-11 9:25
Niklas L2-Mar-11 9:25 
GeneralRe: Opening Disk Defragmenter from inside a WIN32 app Pin
dipuks2-Mar-11 12:35
dipuks2-Mar-11 12:35 
QuestionStretchBlt problem Pin
csrss2-Mar-11 4:14
csrss2-Mar-11 4:14 
Ok, so here is the thing. I got a window, simple win32 window with a black background which was applied with FillRect function to fill whole client rectangle with black color. Now i am trying to paint some picture on this window with StretchBlt. Basically, here is my function:

void PaintBkgImage(__in HWND hWnd, 
		__in HDC PaintDC, 
		__in BITMAP bmp, 
		__in HDC prevDC,
		__in int StretchFromLeft,
		__in int StretchFromRight,
		__in int StretchFromTop,
	        __in int StretchFromBottom)
{
	SetStretchBltMode(PaintDC, HALFTONE);
	StretchBlt(PaintDC, 
			   StretchFromLeft, 
			   StretchFromTop, 
			   _client_rect.right, 
			   _client_rect.bottom - StretchFromBottom,
			   prevDC, 
			   StretchFromRight, 
			   0, 
			   bmp.bmWidth, 
			   bmp.bmHeight, 
			   SRCCOPY);
}


and now StretchFromLeft = 10 for example, so the pic should be stretched from left by 10 units. Ok, StretchBlt does this, but it leaves a nasty white rectangle on left side. Same thing with any other parameter =/
I have tried filling window with black color yet again but it has no effect at all after calling StretchBlt. How can i make it work? So basically i need my window to remain black and only picture should be stretched from every side (left , right, bottom ,top)?
Thanks
011011010110000101100011011010000110100101101110
0110010101110011

AnswerRe: StretchBlt problem Pin
Hans Dietrich2-Mar-11 4:26
mentorHans Dietrich2-Mar-11 4:26 
GeneralRe: StretchBlt problem Pin
csrss2-Mar-11 7:02
csrss2-Mar-11 7:02 
QuestionRe: StretchBlt problem Pin
CPallini2-Mar-11 4:57
mveCPallini2-Mar-11 4:57 
GeneralRe: StretchBlt problem Pin
csrss2-Mar-11 5:14
csrss2-Mar-11 5:14 
AnswerRe: StretchBlt problem Pin
Chris Meech2-Mar-11 6:15
Chris Meech2-Mar-11 6:15 
GeneralRe: StretchBlt problem [Solved] Pin
csrss2-Mar-11 6:58
csrss2-Mar-11 6:58 
QuestionHow to calculate to get new pixel color by mix alpha value with r, g and b value [modified] Pin
Amrit Agr2-Mar-11 2:11
Amrit Agr2-Mar-11 2:11 
AnswerRe: How to calculate to get new pixel color by mix alpha value with r, g and b value Pin
«_Superman_»2-Mar-11 2:43
professional«_Superman_»2-Mar-11 2:43 
GeneralRe: How to calculate to get new pixel color by mix alpha value with r, g and b value Pin
Amrit Agr3-Mar-11 0:17
Amrit Agr3-Mar-11 0:17 
QuestionProblem with SetWindowExtEx() Pin
ashtwin2-Mar-11 1:30
ashtwin2-Mar-11 1:30 
AnswerRe: Problem with SetWindowExtEx() Pin
Luc Pattyn2-Mar-11 1:37
sitebuilderLuc Pattyn2-Mar-11 1:37 
QuestionReadFile overlapped i\o Pin
sawerr2-Mar-11 0:39
sawerr2-Mar-11 0:39 
AnswerRe: ReadFile overlapped i\o Pin
Luc Pattyn2-Mar-11 1:31
sitebuilderLuc Pattyn2-Mar-11 1:31 
AnswerRe: ReadFile overlapped i\o Pin
«_Superman_»2-Mar-11 2:57
professional«_Superman_»2-Mar-11 2:57 
AnswerRe: ReadFile overlapped i\o Pin
Richard MacCutchan2-Mar-11 3:05
mveRichard MacCutchan2-Mar-11 3:05 
GeneralRe: ReadFile overlapped i\o Pin
CPallini2-Mar-11 3:13
mveCPallini2-Mar-11 3:13 
GeneralRe: ReadFile overlapped i\o Pin
sawerr2-Mar-11 12:00
sawerr2-Mar-11 12:00 

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.