From 7505e88db66798b2b8fcdff2d92a7136cd826b5b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 9 Sep 2010 02:26:30 +0200 Subject: Upgrading to IUP 3.2 - and cleaning up. --- iup/src/win/iupwin_common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'iup/src/win/iupwin_common.c') diff --git a/iup/src/win/iupwin_common.c b/iup/src/win/iupwin_common.c index ba68b78..0f53e68 100755 --- a/iup/src/win/iupwin_common.c +++ b/iup/src/win/iupwin_common.c @@ -372,7 +372,7 @@ int iupwinBaseContainerProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT case WM_CTLCOLORSTATIC: { Ihandle* child = iupwinHandleGet((void*)lp); - if (child) + if (child && iupChildTreeGetNativeParent(child)==ih) { IFctlColor cb = (IFctlColor)IupGetCallback(child, "_IUPWIN_CTLCOLOR_CB"); if (cb) @@ -390,7 +390,11 @@ int iupwinBaseContainerProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT if (wp == 0) /* a menu */ child = iupwinMenuGetItemHandle((HMENU)drawitem->hwndItem, drawitem->itemID); else + { child = iupwinHandleGet(drawitem->hwndItem); + if (child && iupChildTreeGetNativeParent(child)!=ih) + child = NULL; + } if (child) { @@ -408,7 +412,7 @@ int iupwinBaseContainerProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT case WM_VSCROLL: { Ihandle *child = iupwinHandleGet((void*)lp); - if (child) + if (child && iupChildTreeGetNativeParent(child)==ih) { IFni cb = (IFni)IupGetCallback(child, "_IUPWIN_CUSTOMSCROLL_CB"); if (cb) @@ -426,7 +430,7 @@ int iupwinBaseContainerProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT break; child = iupwinHandleGet(msg_info->hwndFrom); - if (child) + if (child && iupChildTreeGetNativeParent(child)==ih) { IFnotify cb = (IFnotify)IupGetCallback(child, "_IUPWIN_NOTIFY_CB"); if (cb) -- cgit v1.2.3