Click here to Skip to main content
15,921,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralVC++5.0 and displaying Chinese characters Pin
mshuster25-Jul-05 6:32
mshuster25-Jul-05 6:32 
GeneralRe: VC++5.0 and displaying Chinese characters Pin
Trollslayer25-Jul-05 7:04
mentorTrollslayer25-Jul-05 7:04 
GeneralRe: VC++5.0 and displaying Chinese characters Pin
mshuster25-Jul-05 7:32
mshuster25-Jul-05 7:32 
GeneralRe: VC++5.0 and displaying Chinese characters Pin
Jose Lamas Rios25-Jul-05 15:59
Jose Lamas Rios25-Jul-05 15:59 
GeneralRe: VC++5.0 and displaying Chinese characters Pin
mshuster26-Jul-05 3:07
mshuster26-Jul-05 3:07 
GeneralDebug assertion failed Pin
Bruce Pataki25-Jul-05 6:09
Bruce Pataki25-Jul-05 6:09 
GeneralRe: Debug assertion failed Pin
David Crow25-Jul-05 6:32
David Crow25-Jul-05 6:32 
GeneralRe: Debug assertion failed Pin
Bruce Pataki25-Jul-05 7:11
Bruce Pataki25-Jul-05 7:11 
David,

Thank for replying. Let me share some details...

i have created the listview control. I tried to create the listview in the function OnInitialUpdate and it worked successfully.

My need is to keep both windows open like receiver and sender mechanism i.e. Data is passed from one form having edit control and after sending data, display them in listview in separate form. But when i tried to do the same in my defined function (in addition to OnInitialUpdate) i.e. AddData(), I face this problem.

The sequence of code follows. Both Functions exist in the same cpp file.

void CTestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
ResizeParentToFit();

m_pSelection = NULL; // initialize selection
CListCtrl* pList = (CListCtrl*) GetDlgItem(IDC_LIST1); // THIS ONE WORKS
pList->InsertColumn(0,"ym",LVCFMT_CENTER,140);
pList->InsertColumn(1,"Ws",LVCFMT_CENTER,70);
pList->InsertColumn(2,"State",LVCFMT_CENTER,50);
}

void CTestView::AddData(LPCTSTR tn,LPCTSTR cn,LPCTSTR ts,LPCTSTR cv)
{
int i=0,j=0;
int flag = 0;

j=rowcount-1;
//pointer to the listview control

CListCtrl* pList = (CListCtrl*) GetDlgItem(IDC_LIST1); // THIS ONE DOES NOT WORK
pList->InsertItem(0,ts);
}

Bruce
GeneralRe: Debug assertion failed Pin
David Crow25-Jul-05 7:36
David Crow25-Jul-05 7:36 
GeneralRe: Debug assertion failed Pin
Trollslayer25-Jul-05 7:07
mentorTrollslayer25-Jul-05 7:07 
Generali dont know Pin
Halawlaws25-Jul-05 6:01
Halawlaws25-Jul-05 6:01 
GeneralRe: i dont know Pin
David Crow25-Jul-05 6:30
David Crow25-Jul-05 6:30 
GeneralRe: i dont know Pin
Halawlaws25-Jul-05 6:32
Halawlaws25-Jul-05 6:32 
GeneralGetInputDesktop Pin
sarah carlson25-Jul-05 5:42
sarah carlson25-Jul-05 5:42 
GeneralRe: GetInputDesktop Pin
David Crow25-Jul-05 7:45
David Crow25-Jul-05 7:45 
GeneralRe: GetInputDesktop Pin
sarah carlson25-Jul-05 7:54
sarah carlson25-Jul-05 7:54 
GeneralRe: GetInputDesktop Pin
David Crow25-Jul-05 7:58
David Crow25-Jul-05 7:58 
GeneralRe: GetInputDesktop Pin
Jose Lamas Rios25-Jul-05 16:15
Jose Lamas Rios25-Jul-05 16:15 
GeneralWindow focus Pin
Halawlaws25-Jul-05 5:22
Halawlaws25-Jul-05 5:22 
GeneralRe: Window focus Pin
David Crow25-Jul-05 5:31
David Crow25-Jul-05 5:31 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 5:33
Halawlaws25-Jul-05 5:33 
GeneralRe: Window focus Pin
toxcct25-Jul-05 5:41
toxcct25-Jul-05 5:41 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 5:49
Halawlaws25-Jul-05 5:49 
GeneralRe: Window focus Pin
toxcct25-Jul-05 5:50
toxcct25-Jul-05 5:50 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 5:51
Halawlaws25-Jul-05 5:51 

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.