Click here to Skip to main content
15,909,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCListCtrl and Graphic Pin
ensger7-Jul-06 3:44
ensger7-Jul-06 3:44 
AnswerRe: CListCtrl and Graphic Pin
Zac Howland7-Jul-06 5:25
Zac Howland7-Jul-06 5:25 
GeneralRe: CListCtrl and Graphic Pin
ensger7-Jul-06 9:10
ensger7-Jul-06 9:10 
QuestionCreating a Bitmap from a Framegrabber Image Pin
im797-Jul-06 3:41
im797-Jul-06 3:41 
AnswerRe: Creating a Bitmap from a Framegrabber Image Pin
Justin Tay7-Jul-06 6:27
Justin Tay7-Jul-06 6:27 
AnswerRe: Creating a Bitmap from a Framegrabber Image Pin
im799-Jul-06 4:37
im799-Jul-06 4:37 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
Justin Tay9-Jul-06 11:40
Justin Tay9-Jul-06 11:40 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
im7910-Jul-06 21:43
im7910-Jul-06 21:43 
Hi, i've tried your code in my appicaltion and have another problem now Sigh | :sigh: . I need a CBitmap object, so i tried the following:
<br />
CDC *pDC = GetDC();<br />
CBitmap* myBitmap;<br />
<br />
myBitmap = CBitmap::FromHandle(hBitmap);<br />
myBitmap->CreateCompatibleBitmap(pDC, m_iWidth, m_iHeight);<br />
myBitmap->LoadBitmap(IDC_STATIC_PICTURE);//picture control in my dialog<br />


I get an Unhandled exception in wingdi.cpp line 1102:
<br />
BOOL CGdiObject::Attach(HGDIOBJ hObject)<br />
{<br />
 ASSERT(m_hObject == NULL); // <= line 1102<br />
   if (hObject == NULL)<br />
     return FALSE;<br />
 CHandleMap* pMap = afxMapHGDIOBJ(TRUE);<br />
 ASSERT(pMap != NULL);<br />
 pMap->SetPermanent(m_hObject = hObject, this);<br />
 return TRUE;<br />
}<br />


This is the call stack:
>mfc71d.dll!CGdiObject::Attach(void * hObject=0x0305061d) Line 1102 + 0x1c C++
mfc71d.dll!CBitmap::CreateCompatibleBitmap(CDC * pDC=0x00816af4, int nWidth=400, int nHeight=400) Line 217 + 0x25 C++

I hope you can help me again hereSmile | :)
im79
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
Justin Tay10-Jul-06 22:55
Justin Tay10-Jul-06 22:55 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
im7910-Jul-06 23:12
im7910-Jul-06 23:12 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
Justin Tay10-Jul-06 23:37
Justin Tay10-Jul-06 23:37 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
im7911-Jul-06 1:16
im7911-Jul-06 1:16 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
im7930-Mar-08 13:06
im7930-Mar-08 13:06 
GeneralRe: Creating a Bitmap from a Framegrabber Image Pin
Justin Tay1-Apr-08 4:09
Justin Tay1-Apr-08 4:09 
QuestionWhat is wrong with this class - C2248 error Pin
charlieg7-Jul-06 3:24
charlieg7-Jul-06 3:24 
AnswerRe: What is wrong with this class - C2248 error Pin
Taka Muraoka7-Jul-06 3:29
Taka Muraoka7-Jul-06 3:29 
GeneralRe: What is wrong with this class - C2248 error Pin
charlieg7-Jul-06 3:39
charlieg7-Jul-06 3:39 
AnswerRe: What is wrong with this class - C2248 error Pin
Chris Losinger7-Jul-06 3:32
professionalChris Losinger7-Jul-06 3:32 
Questionusing C in VC express Pin
giddy_guitarist7-Jul-06 3:23
giddy_guitarist7-Jul-06 3:23 
AnswerRe: using C in VC express Pin
Chris Losinger7-Jul-06 3:27
professionalChris Losinger7-Jul-06 3:27 
AnswerRe: using C in VC express Pin
Zac Howland7-Jul-06 3:52
Zac Howland7-Jul-06 3:52 
GeneralRe: using C in VC express Pin
giddy_guitarist31-Mar-07 5:23
giddy_guitarist31-Mar-07 5:23 
QuestionStatic method, non-static variable Pin
Daniel Kanev7-Jul-06 2:45
Daniel Kanev7-Jul-06 2:45 
AnswerRe: Static method, non-static variable Pin
RChin7-Jul-06 3:11
RChin7-Jul-06 3:11 
AnswerRe: Static method, non-static variable Pin
Zac Howland7-Jul-06 4:01
Zac Howland7-Jul-06 4: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.