I'm new to win32 API programming and I try to understand source code of treeview from codeproject.
But I really don't understand this :
BOOL TreeView::DoNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// blah blah
HTREEVIEW Selected = (HTREEITEM)SendDlgItemMessage(hWnd,ID_TREE,TVM_GETNEXTITEM,TVGN_CARET,(LPARAM)Selected);
// halb halb
}
It doesn't work ( Selected is used without initializing) until I declare Selected as global variable.
Thanks for reading this and I need your help .