ATL Win32 issue
-
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 ! -
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 !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]