Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

danag

@danag
About
Posts
33
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • getting selected row index
    D danag

    I have written an handler when the user presses the left mouse button in the list control. I am doing the following in the handler code { Invalidate(); HWND hWnd1 = ::GetDlgItem (m_hWnd,IDC_LIST2); LPNMITEMACTIVATE temp = (LPNMITEMACTIVATE) pNMHDR; RECT rect; //get the row number nItem = temp->iItem; .. .. .. } nItem is having -1 and not a valid row number? Could anyone tell why it is so. Thanks

    C / C++ / MFC database question

  • index of selected item in listctrl
    D danag

    THANKS. I GOT IT.

    C / C++ / MFC question database

  • index of selected item in listctrl
    D danag

    Thanks, I am able to get the index. I have 1 more Qs. I have written an message hanler for the list control for the message LVN_ENDLABELEDIT. After i edit the selected field , I want to put the newly typed data in it. So, i tried to use the listctrl.GetNextItem(); listctrl.GetItemText(); --- But this fucntion has the original text & not the new text and listctrl.SetItemText().

    C / C++ / MFC question database

  • index of selected item in listctrl
    D danag

    How do i get the index of the selected item in list control?

    C / C++ / MFC question database

  • Multicolumn listbox
    D danag

    I fixed the problem. The assertion failure is thrown when calling DoDataExchange(); CDialog::OnInitialUpdate() calling CDialog::UpdateData(FALSE) calling CDialog::DoDataExchange(..). Actually I had an button control in the dialog and an corresponding button variable in the Dialog class and hence the DoDataExchange() had an line containing button variable. Then I removed the Button variable from the resource. But didnot remove from the code. I tried to remove the button variable from the Dialogs class and DoDataExchange() and thus it worked. Thanks for your help. Sorry for the trouble.

    C / C++ / MFC tutorial question

  • Multicolumn listbox
    D danag

    Getting an assertion failure immediately. If I click 'Ignore' button, an message box appears with msg 'unsupported operation was attempted'

    C / C++ / MFC tutorial question

  • Multicolumn listbox
    D danag

    No, it doesnot work.

    C / C++ / MFC tutorial question

  • Multicolumn listbox
    D danag

    Yes, having 3 records. If i comment out return CDialog::OnInitialUpdate() and return TRUE, then I am not getting this assertion failure. Only after the dailog with the listctrl filled with the records, the assertion failure appears.

    C / C++ / MFC tutorial question

  • Multicolumn listbox
    D danag

    I am getting an assertion failure in the last line of this function. When I click the 'Ignore' button, I am getting a message box with the message 'Unsupported operation was attempted'. I donot have any clue to fix it? Pl help me. BOOL displaydlg::OnInitDialog() { CListCtrl *plistb = (CListCtrl *) GetDlgItem(IDC_LIST2); LV_ITEM lvI; // Initialize LV_ITEM members that are common to all items lvI.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE; lvI.state = 0; lvI.stateMask = 0; lvI.iImage = 0; CString str; int i =0; if (m_pSet1->IsOpen()) { m_pSet1->Close(); } m_pSet1->Open(); while (!m_pSet1->IsEOF()) { lvI.iItem =i; lvI.iSubItem = 0; str = m_pSet1->m_Type; lvI.pszText = (LPSTR)LPCTSTR(str); lvI.cchTextMax = MAX_ITEMLEN; lvI.lParam = (LPARAM) i; if (plistb->InsertItem(&lvI) == -1) AfxMessageBox(_T("ListSelectData::FillListCtrl error"), MB_OK); i++; m_pSet1->MoveNext(); } return CDialog::OnInitDialog(); }

    C / C++ / MFC tutorial question

  • Multicolumn listbox
    D danag

    Thanks for a quick response. I will try listcontrol.

    C / C++ / MFC tutorial question

  • Multicolumn listbox
    D danag

    I have a requirement to fill the listbox with 2 columns. I know how to implement a listbox with single column? Could someone tell me how to do it? Thanks

    C / C++ / MFC tutorial question

  • Dialog class
    D danag

    How do I access a documents data from the dialog? Is there any function for doing? I know abt the GetDocument() that can be used in the View to access Document's data.. can anyone help me? Thanks

    C / C++ / MFC question help

  • Access listbox from view's class
    D danag

    Yes, u are correct. But I would like to initailize with the data I read from the database. I am reading the records in the View's member function, so how do i pass the values read to the listbox?

    C / C++ / MFC question

  • Access listbox from view's class
    D danag

    How do I initialize the dialog's list box in the View's member function ? Actually, I want to display a record in the listbox in the view button down handler fucntion? When I try to do, my program aborts in the listbox.AddString(...) fucntion? What could be possible wrong?

    C / C++ / MFC question

  • error in displaying in listbox
    D danag

    Adding ASSERT(plistb) doesnot solve the problem. Still get the same error.

    C / C++ / MFC help c++ testing beta-testing

  • error in displaying in listbox
    D danag

    I am trying to display the records in the listbox. When I try to Initialize the listbox with the value in *View.cpp, I am getting an 'Access violation'. Can someone help fixing it. here is the code: void CListdatabaseView::OnLButtonDblClk(UINT nFlags, CPoint point) { ... ... ... CListBox *plistb = (CListBox *) GetDlgItem(IDC_LIST1); CString str1; str1.Format("%s","TESTING"); plistb->AddString(str1); ddlg.DoModal(); }

    C / C++ / MFC help c++ testing beta-testing

  • MSFlexGrid
    D danag

    any ptrs to exmaple using MSFlexGrid with each cell displaying a combo box control upon clicking? Thanks

    C / C++ / MFC question

  • database data in listbox
    D danag

    I want to display the database records in the listbox. All I have done with database is specifiying the database support while creating the project so that I get a record by record display. Could anyone tell how to implement it? Thank You

    C / C++ / MFC database tutorial question

  • Ole Drag and Drop
    D danag

    I have implemented Ole Drag and Drop, and i want the item dragged to remain in the source list after it is dropped in the destination list? what should be done? Thanks

    C / C++ / MFC com question

  • COleDropTarget. register(pWnd *) returning 0
    D danag

    I am trying to implement Ole drag and drop, and the register() with OLE dll is returning 0. where could i have been wrong? Thanks

    C / C++ / MFC com question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups