Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: jkrPosted on 2006-08-21 at 11:35:43ID: 17358071
The docs state that "For some notification messages, this parameter points to a larger structure that has the NMHDR structure as its first member.". You can only be be sure that you are receiving an 'LVN_ITEMACTIVATE' afer examining the NMHDR, so I'd recommend to
case WM_NOTIFY:
{
LPNMHDR pnmh = (LPNMHDR)lParam;
switch(pnmh->code)
{
case LVN_ITEMACTIVATE:
{
LPNMITEMACTIVATE lpnia = (LPNMITEMACTIVATE)lParam;
switch(lpnia->hdr.idFrom)
{
case IDC_USED_ADDR:
{
OnUsedAddr(hWnd, lParam);
return FALSE;
}
}
}
}
}