summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2004-12-28 08:45:31 (GMT)
committerchengyemao <chengyemao>2004-12-28 08:45:31 (GMT)
commitf82a6ef646a08bece15a3a9cd666440490f8ff53 (patch)
tree7559e7ec0ff3706d667a923258f6f8954aa71bea /win/tkWinMenu.c
parent0e1531b68058ccd93a6905f122977cfc551db964 (diff)
downloadtk-f82a6ef646a08bece15a3a9cd666440490f8ff53.zip
tk-f82a6ef646a08bece15a3a9cd666440490f8ff53.tar.gz
tk-f82a6ef646a08bece15a3a9cd666440490f8ff53.tar.bz2
Modified to support embedded menu widget
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 677b090..7daa307 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinMenu.c,v 1.36 2004/09/21 19:13:58 mdejong Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.37 2004/12/28 08:45:31 chengyemao Exp $
*/
#define OEMRESOURCE
@@ -3082,6 +3082,36 @@ TkpMenuInit()
TkCreateExitHandler(MenuExitHandler, (ClientData) NULL);
SetDefaults(1);
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tk_GetMenuHWND --
+ *
+ * This function returns the HWND of a hidden menu Window that
+ * processes messages of a popup menu. This hidden menu window
+ * is used to handle either a dynamic popup menu in the same
+ * process or a pull-down menu of an embedded window in a
+ * different process.
+ *
+ * Results:
+ * Returns the HWND of the hidden menu Window.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+HWND
+Tk_GetMenuHWND(tkwin)
+ Tk_Window tkwin;
+{
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ TkMenuInit();
+ return tsdPtr->menuHWND;
+}
/*
*----------------------------------------------------------------------