Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list-view ¦ tree-view ¦ WM_NOTIFY ¦ help?

Status
Not open for further replies.

NEVERSLEEP

Programmer
Apr 14, 2002
667
0
0
CA
Greetings,
im writing a simple chat application,
in this one, i wish to make a 'buddy' list. (comparable to msn messenger)

My 1st attempt was using a List-view control.
(allowing me to make a 'list' and add diferent icons)

All when well, except for the moment i wanted to do a right click menu.

On msdn library, it is said to use WM_NOTIFY to get right click (and enter key) messages

Code:
case WM_NOTIFY:
	MessageBox(0, "WM_NOTIFY received", "..", MB_OK);
	if (((LPNMHDR)lParam)->code == NM_RCLICK ||
		((LPNMHDR)lParam)->code == NM_RETURN)
		{

Unfortunatly i never get the MessageBox,
never receiving a WM_NOTIFY msg, like they said it would ..

Playing around _i_found_out_ that it works for dlg and pop, but not for main wnd or childs,
mine is a child. :(

So, i redid my control using this time a tree-view. (hoping the WM_NOTIFY will work with this one..)
However i am not able to set diferent images per item,
i can use only 4 in these terms :
[ul][li]An image, such as an open folder, displayed when the item is selected.[/li]
[li]An image, such as a closed folder, displayed when the item is not selected.[/li]
[li]An overlay image that is drawn transparently over the selected or nonselected image.[/li]
[li]A state image, which is an additional image displayed to the left of the selected or nonselected image. You can use state images, such as checked and cleared check boxes, to indicate application-defined item states.[/li]
[/ul]

Now for y, i have told u this little story :) :
- (list-view) Is there another way to retrive a right click ?
- (list-view) Anyone found a way around this issue/bug ?
- (tree-view) Is there a way to set diferent image/icon per item ?
- Is there another control that could do ?
- Sugjestions on approach ?
- I would have to create a custom control? [surprise]

thanks alot for all input




---------------------------------------
bah
 
actualy .. :p
never mind "(tree-view) Is there a way to set diferent image/icon per item "
sry

---------------------------------------
bah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top