summaryrefslogtreecommitdiff
path: root/iup/src/win/iupwin_common.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/src/win/iupwin_common.c
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/src/win/iupwin_common.c')
-rwxr-xr-xiup/src/win/iupwin_common.c10
1 files changed, 7 insertions, 3 deletions
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)