Win32 listbox problem
Allright, I''ve searched the MSDN Library like crazy but I can''t find the answer to this problem(Which is a bit strange, since I''m sure it''s there somewhere...)
How do I add items to a listbox?
As the title says, I''m using the win32 api...
Thanks
-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
You need to use the SendMessage function. This function takes four parameters. In your case the first parameter is a handle to the listbox. For the second parameter you will use LB_ADDSTRING. The third parameter must be zero. For the fourth parameter send the address of the string you wish to add.
Here is an example.
TCHAR *pstringvar;
SendMessage(hwndlist, LB_ADDSTRING, 0, (LPARAM) pstringvar);
Hope this helps
-Will
Here is an example.
TCHAR *pstringvar;
SendMessage(hwndlist, LB_ADDSTRING, 0, (LPARAM) pstringvar);
Hope this helps
-Will
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement