locked
ListView in Windows Mobile 5.0 RRS feed

  • Question

  • Hello All,

    I have developed application of windows mobile Pocket PC 5.0 in native language(unmanaged code) using 'C' language in visual studio 2008.

    And I use Windows Mobile 5.0 SDK.

    I want to develop a multi column ListView in my application.

    I have seen SDK example of list view but when i use this example in my application , below linker error is coming.

    "error LNK2019: unresolved external symbol "long __cdecl NotifyHandler(struct HWND__ *,unsigned int,unsigned int,long)" (?NotifyHandler@@YAJPAUHWND__@@IIJ@Z) referenced in function "long __cdecl WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YAJPAUHWND__@@IIJ@Z)    Test3.obj    Test3"

    "fatal error LNK1120: 1 unresolved externals"


    I have also included library which has been  included in that example.

    Is it possible to  make the default listbox control multicolumn  by using multicolumn to true?
    or is there any other way to make multicolumn listbox then please suggest me.

    I have also developed some code but its not working.

    e.g.:

    LVCOLUMN *mylist;
    LVCOLUMN *mylist1;

                    mylist = (LVCOLUMN *)malloc(sizeof(LVCOLUMN));

                    mylist->mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM;
                    mylist->fmt = LVCFMT_LEFT;
                    mylist->cx = 50;
                    mylist->pszText = _T("Name");
                    mylist->cchTextMax = 10;
                    mylist->iSubItem = 0;
                    mylist->iOrder = 0;


                    mylist1 = (LVCOLUMN *)malloc(sizeof(LVCOLUMN));

                    mylist1->mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM;
                    mylist1->fmt = LVCFMT_LEFT;
                    mylist1->cx = 50;
                    mylist1->pszText = _T("Relation");
                    mylist1->cchTextMax = 10;
                    mylist1->iSubItem = 0;
                    mylist1->iOrder = 1;

    SendMessage(GetDlgItem(hDlg, IDC_LIST1), LVM_INSERTCOLUMN, (WPARAM)0, (LPARAM)mylist);
    SendMessage(GetDlgItem(hDlg, IDC_LIST1), LVM_INSERTCOLUMN, (WPARAM)1, (LPARAM)mylist1);


    Thans in advance
    Wednesday, September 9, 2009 12:50 PM

Answers

All replies