Click here to Skip to main content
15,902,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A modal dlg in muli-thread Pin
Gary R. Wheeler15-Jun-03 3:34
Gary R. Wheeler15-Jun-03 3:34 
GeneralRe: A modal dlg in muli-thread Pin
FlyingDancer15-Jun-03 3:43
FlyingDancer15-Jun-03 3:43 
Generaldrag and drop Pin
shanila15-Jun-03 0:56
shanila15-Jun-03 0:56 
QuestionWhy won't CStatic paint? Pin
murdoc515014-Jun-03 23:45
murdoc515014-Jun-03 23:45 
AnswerRe: Why won't CStatic paint? Pin
Stan the man15-Jun-03 2:34
Stan the man15-Jun-03 2:34 
GeneralRe: Why won't CStatic paint? Pin
murdoc515015-Jun-03 3:29
murdoc515015-Jun-03 3:29 
GeneralRe: Why won't CStatic paint? Pin
Stan the man15-Jun-03 15:25
Stan the man15-Jun-03 15:25 
GeneralRe: Why won't CStatic paint? Pin
murdoc515016-Jun-03 4:15
murdoc515016-Jun-03 4:15 
whew! Hmmm... well I tinkered with Bitblt. Tried quite a few variations on a theme, poked around other examples and still can't seem to make this work. Cry | :((

Here is the code I finished with
<br />
	CPaintDC dc( this ); // device context for painting<br />
	HICON hIcon;<br />
<br />
	// Create a compatible memory DC<br />
	CDC memDC;<br />
	memDC.CreateCompatibleDC( &dc );<br />
<br />
	if(m_hWnd && !PaintOnce)<br />
	{<br />
		pToolbarImages.Create(IDB_TOOLBARICONS, 14, 2, RGB(255, 0, 255));<br />
		PaintOnce = true;<br />
	}<br />
<br />
	// Get aware of the size of the client area<br />
	CRect rcClient, rcOriginal;<br />
	m_StyleHeaderFrame.GetWindowRect( &rcClient );<br />
	ScreenToClient(&rcClient);<br />
	rcOriginal = rcClient;<br />
<br />
	rcClient.OffsetRect(-24, 0);<br />
	hIcon = pToolbarImages.ExtractIcon(4);<br />
	memDC.DrawIcon(rcClient.right, rcClient.top, hIcon);<br />
	memDC.BitBlt(rcClient.right, rcClient.top, rcClient.right+24, rcClient.bottom, &memDC, 0, 0, SRCCOPY);<br />
<br />
	rcClient.OffsetRect(-24, 0);<br />
	hIcon = pToolbarImages.ExtractIcon(1);<br />
	memDC.DrawIcon(rcClient.right, rcClient.top, hIcon);<br />
	memDC.BitBlt(rcClient.right, rcClient.top, rcClient.right+24, rcClient.bottom, &memDC, 0, 0, SRCCOPY);<br />
<br />
	dc.BitBlt(rcOriginal.left, rcOriginal.top, rcOriginal.right, rcOriginal.bottom, &memDC, 0, 0, SRCCOPY);<br />


Did I use BitBlt correctly or have I messed up on that too? Wink | ;) Confused | :confused:

Thanks for the help!

Chris
GeneralRe: Why won't CStatic paint? Pin
Stan the man16-Jun-03 5:20
Stan the man16-Jun-03 5:20 
GeneralAbout an "unexpected #else " probelm Pin
FlyingDancer14-Jun-03 21:22
FlyingDancer14-Jun-03 21:22 
GeneralRe: About an &quot;unexpected #else &quot; probelm Pin
Gary R. Wheeler15-Jun-03 2:49
Gary R. Wheeler15-Jun-03 2:49 
GeneralRe: About an &quot;unexpected #else &quot; probelm Pin
FlyingDancer15-Jun-03 3:21
FlyingDancer15-Jun-03 3:21 
QuestionDLL ? Pin
Stan the man14-Jun-03 20:20
Stan the man14-Jun-03 20:20 
AnswerRe: DLL ? Pin
Roger Allen16-Jun-03 1:54
Roger Allen16-Jun-03 1:54 
GeneralRe: DLL ? Pin
Stan the man16-Jun-03 5:24
Stan the man16-Jun-03 5:24 
GeneralQuestion about run at start up Pin
Mazdak14-Jun-03 19:38
Mazdak14-Jun-03 19:38 
GeneralRe: Question about run at start up Pin
valikac14-Jun-03 19:52
valikac14-Jun-03 19:52 
GeneralRe: Question about run at start up Pin
Mazdak14-Jun-03 20:01
Mazdak14-Jun-03 20:01 
GeneralRe: Question about run at start up Pin
Nicolas Bonamy14-Jun-03 20:30
Nicolas Bonamy14-Jun-03 20:30 
GeneralRe: Question about run at start up Pin
Mazdak14-Jun-03 20:54
Mazdak14-Jun-03 20:54 
GeneralRe: Question about run at start up Pin
Ryan Binns14-Jun-03 22:26
Ryan Binns14-Jun-03 22:26 
GeneralRe: Question about run at start up Pin
Mazdak14-Jun-03 22:56
Mazdak14-Jun-03 22:56 
GeneralRe: Question about run at start up Pin
Ryan Binns15-Jun-03 2:59
Ryan Binns15-Jun-03 2:59 
GeneralRe: Question about run at start up Pin
Anonymous15-Jun-03 0:33
Anonymous15-Jun-03 0:33 
GeneralRe: Question about run at start up Pin
Ryan Binns15-Jun-03 3:01
Ryan Binns15-Jun-03 3:01 

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.