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. ATL Win32 issue

ATL Win32 issue

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++visual-studiocom
2 Posts 2 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.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I am developing a COM exe using ATL in Visual Studio 2005 . I have a list control in a ATL dialog however I cannot get it to show any text . I am adding the code to display some status in the List Control but fail to display anything LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { CAxDialogImpl::OnInitDialog(uMsg, wParam, lParam, bHandled); **WCHAR str[] = _T("Initialization Done"); SendDlgItemMessage(IDC_LIST1,LB_ADDSTRING , 0 , (LPARAM)&str);** bHandled = TRUE; return 1; // Let the system set the focus } Am I missing something here or doing this initialization at the wrong place ? Help is appreciated div class="ForumSig">Engineering is the effort !

    N 1 Reply Last reply
    0
    • A act_x

      I am developing a COM exe using ATL in Visual Studio 2005 . I have a list control in a ATL dialog however I cannot get it to show any text . I am adding the code to display some status in the List Control but fail to display anything LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { CAxDialogImpl::OnInitDialog(uMsg, wParam, lParam, bHandled); **WCHAR str[] = _T("Initialization Done"); SendDlgItemMessage(IDC_LIST1,LB_ADDSTRING , 0 , (LPARAM)&str);** bHandled = TRUE; return 1; // Let the system set the focus } Am I missing something here or doing this initialization at the wrong place ? Help is appreciated div class="ForumSig">Engineering is the effort !

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      act_x wrote:

      I am adding the code to display some status in the List Control

      If you are using list control, LB_ADDSTRING is wrong message to send. LB_ADDSTRING is used to insert item into list box. Use the LVM_INSERTITEM message.

      nave [OpenedFileFinder]

      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