Click here to Skip to main content
15,920,956 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog debug error: DAMAGE Pin
xylo0419-Nov-04 10:11
xylo0419-Nov-04 10:11 
GeneralRe: Dialog debug error: DAMAGE Pin
zoid ! 19-Nov-04 10:40
zoid ! 19-Nov-04 10:40 
GeneralRe: Dialog debug error: DAMAGE Pin
zoid ! 19-Nov-04 10:42
zoid ! 19-Nov-04 10:42 
GeneralRe: Dialog debug error: DAMAGE Pin
xylo0419-Nov-04 12:03
xylo0419-Nov-04 12:03 
GeneralHelp!!! How to write single Event Handler for 100 buttons Pin
VikramDelhi19-Nov-04 9:56
VikramDelhi19-Nov-04 9:56 
GeneralRe: Help!!! How to write single Event Handler for 100 buttons Pin
David Crow19-Nov-04 10:06
David Crow19-Nov-04 10:06 
GeneralRe: Help!!! How to write single Event Handler for 100 buttons Pin
Member 30761219-Nov-04 19:07
Member 30761219-Nov-04 19:07 
GeneralGDI SetDIBitsToDevice help Pin
Budric B.19-Nov-04 7:51
Budric B.19-Nov-04 7:51 
Hi,
I'm having trouble displaying a picture by overriding OnPaint() method and putting the function SetDIBitsToDevice in there. Here's a bit of the code
<br />
void CProjectorFrame::ShowPattern()<br />
{<br />
	m_bBlank = false;<br />
	OnPaint();<br />
}<br />
void CProjectorFrame::OnPaint() <br />
{<br />
	CPaintDC dc(this); // device context for painting	<br />
	CRect rClient;<br />
	GetClientRect(&rClient);<br />
<br />
	if (m_bBlank)  //output black screen<br />
	{<br />
		dc.SetBkColor(RGB(0, 0, 0));<br />
		dc.ExtTextOut(0,0,ETO_OPAQUE, &rClient,0,0,0);<br />
		return;<br />
	}<br />
        else<br />
	{<br />
		int val = ::SetDIBitsToDevice(<br />
		dc,<br />
		m_nXOffset, <br />
		m_nYOffset,<br />
		m_BitmapInfo.bmiHeader.biWidth, <br />
		m_nImageHeight,<br />
		0, <br />
		0,<br />
		0, <br />
		m_nImageHeight,<br />
		m_pImage, <br />
		&m_BitmapInfo, <br />
		DIB_RGB_COLORS );<br />
	}<br />
}<br />
//...now in another function in a different class I call<br />
m_MyObject.ShowPattern();<br />

But the pattern doesn't display right after the call to ShowPattern(). I ran this through the debugger and everything seems to work fine. SetDIBitsToDevice actually returns that it set 768 lines, and all the code executes. I'm confused.

Thanks.
GeneralRe: GDI SetDIBitsToDevice help Pin
PJ Arends20-Nov-04 9:46
professionalPJ Arends20-Nov-04 9:46 
GeneralNetBios Shared Folders Scanner Pin
Y3YPnATOP19-Nov-04 7:16
Y3YPnATOP19-Nov-04 7:16 
GeneralRe: NetBios Shared Folders Scanner Pin
David Crow19-Nov-04 10:09
David Crow19-Nov-04 10:09 
GeneralCommand driven application Pin
Deelip19-Nov-04 7:14
Deelip19-Nov-04 7:14 
GeneralRe: Command driven application Pin
BlackDice19-Nov-04 7:22
BlackDice19-Nov-04 7:22 
GeneralRe: Command driven application Pin
Deelip19-Nov-04 17:16
Deelip19-Nov-04 17:16 
GeneralRe: Command driven application Pin
Maximilien19-Nov-04 7:36
Maximilien19-Nov-04 7:36 
Generalchanging defaut button Pin
toxcct19-Nov-04 6:09
toxcct19-Nov-04 6:09 
GeneralRe: changing defaut button Pin
basementman19-Nov-04 6:30
basementman19-Nov-04 6:30 
GeneralRe: changing defaut button Pin
BlackDice19-Nov-04 6:33
BlackDice19-Nov-04 6:33 
GeneralRe: changing defaut button Pin
Yulianto.19-Nov-04 14:03
Yulianto.19-Nov-04 14:03 
GeneralRe: changing defaut button Pin
toxcct20-Nov-04 7:52
toxcct20-Nov-04 7:52 
GeneralRe: changing defaut button Pin
Yulianto.21-Nov-04 21:21
Yulianto.21-Nov-04 21:21 
GeneralRe: changing defaut button Pin
Yulianto.22-Nov-04 15:56
Yulianto.22-Nov-04 15:56 
GeneralRe: changing defaut button Pin
toxcct22-Nov-04 20:34
toxcct22-Nov-04 20:34 
GeneralRe: changing defaut button Pin
bmzhao19-Nov-04 15:01
bmzhao19-Nov-04 15:01 
GeneralRe: changing defaut button Pin
toxcct20-Nov-04 7:53
toxcct20-Nov-04 7:53 

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.