Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/tests/treeview.c:
} case TVN_ITEMEXPANDINGA: {
UINT newmask = pTreeView->itemNew.mask & ~TVIF_CHILDREN;
UINT newmask;
if (tvn_itemexpanding_ret)
{
tvn_itemexpanding_ret = 0;
Let's use a similar naming convention like other global variables, for example, g_reject_tvn_itemexpanding. And let parent_wnd_proc always return TRUE when g_reject_tvn_itemexpanding is TRUE and then reset the variable to zero in test_expandnotify() after your tests.