Click here to Skip to main content
15,908,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to know if the card be inserted into the socket of the cardreader? Pin
Blake Miller4-Nov-04 6:16
Blake Miller4-Nov-04 6:16 
AnswerRe: How to know if the card be inserted into the socket of the cardreader? Pin
momer4-Nov-04 14:35
momer4-Nov-04 14:35 
GeneralDraw state machine diagram Pin
mfc_surfer4-Nov-04 0:38
mfc_surfer4-Nov-04 0:38 
GeneralRe: Draw state machine diagram Pin
Antony M Kancidrowski4-Nov-04 0:48
Antony M Kancidrowski4-Nov-04 0:48 
GeneralCannot move controls! Pin
pgibelin4-Nov-04 0:28
pgibelin4-Nov-04 0:28 
GeneralRe: Cannot move controls! Pin
Antony M Kancidrowski4-Nov-04 0:43
Antony M Kancidrowski4-Nov-04 0:43 
GeneralRe: Cannot move controls! Pin
pgibelin4-Nov-04 0:57
pgibelin4-Nov-04 0:57 
GeneralCListBox Under VB .NET 2003 Pin
Daed3-Nov-04 23:35
Daed3-Nov-04 23:35 
Hi,

I am building an MFC ActiveX control. This ActiveX has a child of type CListBox as follows:

In my ActiveXCtl.h file I created a new data member for the child:

CListBox* pmyListBox;

In the ActiveCtl.cpp OnCreate, I added the following:

pmyListBox = new (CListBox);
DWORD dwListStyle = WS_CHILD|WS_VISIBLE|LBS_OWNERDRAWVARIABLE|LBS_NOINTEGRALHEIGHT|LBS_NOTIFY;
pmyListBox->CreateEx(WS_EX_TOPMOST,_T("LISTBOX"), NULL, dwListStyle, CRect(0, 0, 1, 1), this, 1);

Then I added a new method called "AddRow" as follows:

void CMyListboxCtrl::AddRow()
{
CString str;
str.Format(_T("item string %d"), 1);
pmyListBox->AddString( str );
}

Everything works fine until I test my ActiveX under Visual Basic .NET 2003 project, when I call "AddRow" method a NULL reference error is generated. The strange thing is that the control works fine under VB6 and VB .NET 2002!!
Does anyone know the cause of this error, or can help me finding it or how I can get rid of it!

Thanks,


Daed
QuestionHow to get the Frame Rate of a WMV file Pin
ytod3-Nov-04 22:32
ytod3-Nov-04 22:32 
Generaldbgheap line 1011 Pin
vilmer3-Nov-04 22:29
vilmer3-Nov-04 22:29 
GeneralRe: dbgheap line 1011 Pin
Neville Franks3-Nov-04 23:40
Neville Franks3-Nov-04 23:40 
GeneralFlex grid prblm Pin
balajeedurai3-Nov-04 21:58
balajeedurai3-Nov-04 21:58 
GeneralGet WMV Frame Rate Pin
ytod3-Nov-04 21:38
ytod3-Nov-04 21:38 
GeneralCreateFile, error Pin
gunnar663-Nov-04 21:33
gunnar663-Nov-04 21:33 
GeneralRe: CreateFile, error Pin
Cedric Moonen3-Nov-04 22:03
Cedric Moonen3-Nov-04 22:03 
GeneralRe: CreateFile, error Pin
gunnar663-Nov-04 23:02
gunnar663-Nov-04 23:02 
GeneralRe: CreateFile, error Pin
Cedric Moonen3-Nov-04 23:06
Cedric Moonen3-Nov-04 23:06 
GeneralRe: CreateFile, error Pin
jan larsen4-Nov-04 0:48
jan larsen4-Nov-04 0:48 
GeneralRe: CreateFile, error Pin
Antony M Kancidrowski4-Nov-04 1:13
Antony M Kancidrowski4-Nov-04 1:13 
GeneralRe: CreateFile, error Pin
jan larsen4-Nov-04 1:17
jan larsen4-Nov-04 1:17 
GeneralRe: CreateFile, error Pin
Antony M Kancidrowski4-Nov-04 2:05
Antony M Kancidrowski4-Nov-04 2:05 
GeneralRe: CreateFile, error Pin
jan larsen4-Nov-04 1:25
jan larsen4-Nov-04 1:25 
GeneralRe: CreateFile, error Pin
gunnar664-Nov-04 1:31
gunnar664-Nov-04 1:31 
GeneralHelp ! A strange problem Pin
poodle773-Nov-04 21:03
poodle773-Nov-04 21:03 
GeneralWindows groups and languages Pin
ramskar3-Nov-04 20:48
ramskar3-Nov-04 20:48 

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.