C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieve ListBox items

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Kodiak
Guest





PostPosted: Fri Sep 15, 2006 8:57 am    Post subject: Retrieve ListBox items Reply with quote



I am currently trying to retrieve a certain item in a listbox by
passing in the window handle and the string value of the item I am
looking for. I know that once I have the window handle of the listbox
I can retrieve the item where it matches the string value I passed in
to the method. Once I retrieve the correct item I want to be able to
highlight that item, but the problem is that I do not know the correct
syntax for this to happen. The code is not compiling correctly. If
someone could please help me out with this simple task I would
appreciate it.

void CListBoxTest::TestHighLight( HWnd hwnd, string value )
{
int itemValue = SendMessage( hwnd, LB_FINDSTRINGEXACT, -1, value );


//To add the code here for highlighting listbox item once the index
is found
}
Back to top
Phlip
Guest





PostPosted: Fri Sep 15, 2006 9:00 am    Post subject: Re: Retrieve ListBox items Reply with quote



Kodiak wrote:

Quote:
int itemValue = SendMessage( hwnd, LB_FINDSTRINGEXACT, -1, value );

value.c_str()

Even if your next question has a C++ answer, you will do much better to
learn more C++ before coding a hard library like the Win32 SDK, and you
ought to post your next question to a newsgroup with 'microsoft' in its
name.

This newsgroup is only qualified to discuss the raw C++ language itself, not
the minutia of all its libraries.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.