Click here to Skip to main content
16,011,805 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using CFileDialog to Set Current Directory Pin
Andy2023-Sep-08 3:44
Andy2023-Sep-08 3:44 
QuestionRe: Using CFileDialog to Set Current Directory Pin
David Crow3-Sep-08 5:00
David Crow3-Sep-08 5:00 
AnswerRe: Using CFileDialog to Set Current Directory Pin
Andy2024-Sep-08 5:05
Andy2024-Sep-08 5:05 
GeneralRe: Using CFileDialog to Set Current Directory Pin
David Crow4-Sep-08 5:30
David Crow4-Sep-08 5:30 
QuestionBook Of MFC and VC++ Pin
rdop3-Sep-08 0:09
rdop3-Sep-08 0:09 
AnswerRe: Book Of MFC and VC++ Pin
Jijo.Raj3-Sep-08 0:48
Jijo.Raj3-Sep-08 0:48 
QuestionRe: Book Of MFC and VC++ Pin
David Crow3-Sep-08 5:05
David Crow3-Sep-08 5:05 
QuestionCListCtrl Crash On Add Item Pin
dehseth2-Sep-08 22:44
dehseth2-Sep-08 22:44 
Hello,

I have created a MFC application in Visual Studio 2005. I have added to my dialog based app a CListCtrl with View lvwReport. I add a pointer to this ctrl in header file:

CListCtrl* listView;


And I get the pointer at init dialog and insert columns:

this->listView = (CListCtrl*) GetDlgItem(LISTVIEW);
this->listView->InsertColumn(0, "Sıra No", LVCFMT_LEFT, 50);
this->listView->InsertColumn(1, "Dosya Adı", LVCFMT_LEFT, 170);
this->listView->InsertColumn(2, "Bağlantı", LVCFMT_LEFT, 320);
this->listView->InsertColumn(3, "Durum", LVCFMT_CENTER, 100);
this->listView->InsertColumn(4, "Dosya Şifresi", LVCFMT_LEFT, 130);


which is fine till now. I also added a textbox and a button in dialog.
When user enters something to dialog and clicks button. The text in textbox should be inserted to list control:

int r = this->listView->InsertItem(count, countStr.getBuffer());


When I started app in debug mode enter smt and clikc it it gives me an error:

<big>Unhandled exception at 0x275b9098 in dot.exe: 0xC0000005: Access violation reading location 0x00000050.</big> D'Oh! | :doh:

and shows a line in afxwin2.inl file:

_AFXWIN_INLINE LRESULT CWnd::_AFX_FUNCNAME(SendMessage)(UINT message, WPARAM wParam, LPARAM lParam)<br />
	{ ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, message, wParam, lParam); }


Seems like I am not creating smt. What am I missing in here Confused | :confused:
AnswerRe: CListCtrl Crash On Add Item Pin
Cedric Moonen2-Sep-08 22:47
Cedric Moonen2-Sep-08 22:47 
GeneralRe: CListCtrl Crash On Add Item Pin
dehseth2-Sep-08 23:07
dehseth2-Sep-08 23:07 
GeneralRe: CListCtrl Crash On Add Item Pin
Cedric Moonen2-Sep-08 23:17
Cedric Moonen2-Sep-08 23:17 
GeneralRe: CListCtrl Crash On Add Item [modified] Pin
dehseth3-Sep-08 0:10
dehseth3-Sep-08 0:10 
GeneralRe: CListCtrl Crash On Add Item Pin
Cedric Moonen3-Sep-08 1:52
Cedric Moonen3-Sep-08 1:52 
GeneralRe: CListCtrl Crash On Add Item Pin
dehseth3-Sep-08 3:14
dehseth3-Sep-08 3:14 
GeneralRe: CListCtrl Crash On Add Item Pin
Cedric Moonen3-Sep-08 3:19
Cedric Moonen3-Sep-08 3:19 
QuestionParent and chield Dialog Pin
NewVC++2-Sep-08 22:27
NewVC++2-Sep-08 22:27 
AnswerRe: Parent and chield Dialog Pin
_AnsHUMAN_ 2-Sep-08 22:34
_AnsHUMAN_ 2-Sep-08 22:34 
AnswerRe: Parent and chield Dialog Pin
toxcct2-Sep-08 22:35
toxcct2-Sep-08 22:35 
AnswerRe: Parent and chield Dialog Pin
onlyjaypatel2-Sep-08 22:36
onlyjaypatel2-Sep-08 22:36 
QuestionInstall Speech REcognization Files.... Pin
onlyjaypatel2-Sep-08 21:49
onlyjaypatel2-Sep-08 21:49 
AnswerRe: Install Speech REcognization Files.... Pin
Rane2-Sep-08 22:01
Rane2-Sep-08 22:01 
GeneralRe: Install Speech REcognization Files.... Pin
onlyjaypatel2-Sep-08 22:04
onlyjaypatel2-Sep-08 22:04 
GeneralRe: Install Speech REcognization Files.... Pin
Sauce!3-Sep-08 20:03
Sauce!3-Sep-08 20:03 
QuestionAdd two exe Pin
polopo2-Sep-08 20:28
polopo2-Sep-08 20:28 
AnswerRe: Add two exe Pin
Cedric Moonen2-Sep-08 20:30
Cedric Moonen2-Sep-08 20:30 

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.