Click here to Skip to main content
16,013,642 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalc++ and managed c++ Pin
joshfl26-Dec-02 8:30
joshfl26-Dec-02 8:30 
GeneralRe: c++ and managed c++ Pin
AlexO26-Dec-02 8:37
AlexO26-Dec-02 8:37 
GeneralRe: c++ and managed c++ Pin
S O S26-Dec-02 9:47
S O S26-Dec-02 9:47 
GeneralRe: c++ and managed c++ Pin
Vagif Abilov26-Dec-02 9:45
professionalVagif Abilov26-Dec-02 9:45 
GeneralRe: c++ and managed c++ Pin
Nish Nishant26-Dec-02 10:24
sitebuilderNish Nishant26-Dec-02 10:24 
GeneralRe: c++ and managed c++ Pin
Christian Graus26-Dec-02 13:02
protectorChristian Graus26-Dec-02 13:02 
GeneralRe: c++ and managed c++ Pin
joshfl27-Dec-02 3:41
joshfl27-Dec-02 3:41 
GeneralProblems with drawing Pin
S O S26-Dec-02 7:58
S O S26-Dec-02 7:58 
The CxImage *i is just an image that I want to get drawn onto this CDC.
It works fine if I Draw() straight to the window DC, but if i use this class and try to BitBlt() from this to the window DC, I get nothing.
What could be causing this?

class CSomeDC :<br />
	public CDC<br />
{<br />
	CBitmap bmp;<br />
	CBitmap *bmpOld;<br />
public:<br />
<br />
	Uint32 w, h;<br />
<br />
	void Init(CxImage *i)<br />
	{<br />
		w = i->GetWidth();<br />
		h = i->GetHeight();<br />
<br />
		VERIFY(CreateCompatibleDC(0));<br />
		VERIFY(bmp.CreateCompatibleBitmap(this, w, h));<br />
		bmpOld = (CBitmap*)SelectObject(bmp);<br />
		i->Draw(m_hDC);	// Works if I do this on the window DC straight away<br />
	}<br />
};

GeneralRe: Problems with drawing Pin
Neville Franks26-Dec-02 10:02
Neville Franks26-Dec-02 10:02 
GeneralRe: Problems with drawing Pin
S O S26-Dec-02 11:04
S O S26-Dec-02 11:04 
GeneralFor Mr.Locked Ghost Pin
HellShrimp4free26-Dec-02 11:22
HellShrimp4free26-Dec-02 11:22 
GeneralRe: For Mr.Locked Ghost Pin
S O S26-Dec-02 21:47
S O S26-Dec-02 21:47 
GeneralRe: Problems with drawing Pin
Neville Franks26-Dec-02 13:00
Neville Franks26-Dec-02 13:00 
GeneralRe: Problems with drawing Pin
S O S26-Dec-02 21:49
S O S26-Dec-02 21:49 
GeneralRe: Problems with drawing Pin
Iain Clarke, Warrior Programmer27-Dec-02 7:43
Iain Clarke, Warrior Programmer27-Dec-02 7:43 
GeneralRe: Problems with drawing Pin
S O S27-Dec-02 8:18
S O S27-Dec-02 8:18 
GeneralRe: Problems with drawing Pin
Iain Clarke, Warrior Programmer28-Dec-02 13:11
Iain Clarke, Warrior Programmer28-Dec-02 13:11 
GeneralMetafile Pin
Anthony988726-Dec-02 7:48
Anthony988726-Dec-02 7:48 
GeneralSendMessage and BN_CLICKED doesn't work Pin
User 665826-Dec-02 6:40
User 665826-Dec-02 6:40 
GeneralRe: SendMessage and BN_CLICKED doesn't work Pin
AlexO26-Dec-02 6:51
AlexO26-Dec-02 6:51 
GeneralRe: SendMessage and BN_CLICKED doesn't work Pin
User 665826-Dec-02 7:17
User 665826-Dec-02 7:17 
GeneralRe: SendMessage and BN_CLICKED doesn't work Pin
Brian Delahunty26-Dec-02 8:07
Brian Delahunty26-Dec-02 8:07 
GeneralOwner of a process Pin
Nish Nishant26-Dec-02 6:09
sitebuilderNish Nishant26-Dec-02 6:09 
GeneralRe: Owner of a process Pin
AlexO26-Dec-02 6:35
AlexO26-Dec-02 6:35 
GeneralRe: Owner of a process Pin
Nish Nishant26-Dec-02 7:19
sitebuilderNish Nishant26-Dec-02 7:19 

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.