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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Dialog base application

Dialog base application

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiohelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nikesh Jagtap
    wrote on last edited by
    #1

    Hi, I have one dialog base application. It contains list control having some data in report view. After double clicking on it a new modeless dialog gets opened. It contains edit controls which contains data of list control's selected row. If i edit data in edit controls and press OK then data in list control should get updated with newly updated data. My problem is how I pass updated data to list control of parent dialog. I am using Microsoft Visual studio 6.0. Regards Nikesh

    CPalliniC L 2 Replies Last reply
    0
    • N Nikesh Jagtap

      Hi, I have one dialog base application. It contains list control having some data in report view. After double clicking on it a new modeless dialog gets opened. It contains edit controls which contains data of list control's selected row. If i edit data in edit controls and press OK then data in list control should get updated with newly updated data. My problem is how I pass updated data to list control of parent dialog. I am using Microsoft Visual studio 6.0. Regards Nikesh

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Implement an appropriate method in the parent dialog (the parent dialog, upon creation of the child one, should pass to the child a pointer to itself). See this CodeProject's article:"Dialogs Communication"[^]. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • N Nikesh Jagtap

        Hi, I have one dialog base application. It contains list control having some data in report view. After double clicking on it a new modeless dialog gets opened. It contains edit controls which contains data of list control's selected row. If i edit data in edit controls and press OK then data in list control should get updated with newly updated data. My problem is how I pass updated data to list control of parent dialog. I am using Microsoft Visual studio 6.0. Regards Nikesh

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        When creating the modeless dialog, you have to specify a HWND that owns the new dialog; enter the HWND of the dialog containing the list control here. You can use the GetParent[^] function to get the parent window HWND when the OK button is clicked on your modeless dialog. Use GetDlgItem[^] to get the HWND of the list view. Now you can use SendMessage[^] with LVM_INSERTITEM[^] or LVM_SETITEM[^] to add/edit data in your list control.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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