hi
in the "Window" menu, there are menus that are added / removed when you open / close a tab. it seems to be an automatic feature of an MDI app, because i've not found anything related to it in WinUtil, where the menus are created.
so, i was wondering... where do they come from ? how are they created / removed ?
thanks
The menus to select a tab
Moderator: Moderators
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
They're handled automatically. Use a language file that translates "Window" to something else. When you do that, the MDI child windows will no longer be added and removed from the menu. Thus the behavior of the "Window" menu is dependent upon its name and is handled at a much lower level than in DC++'s code - you'll have to look in WTL itself.
thanks a lot "GMT" (ok easy joke...)
i searched a bit through WTL and found a nice match for "&Window", it's in atlframe.h and it begins with :
exactly what needed
so i believe that to translate correctly DC++ it would also be needed to set this _WTL_MDIWINDOWMENU_TEXT to the language's corresponding MENU_WINDOW (275'th line of StringDefs.h). but i don't really get how this could be done though, since _WTL_MDIWINDOWMENU_TEXT is set on the compile time
whatever, thanks
EDIT : maybe adding this :
to the beginning of stdafx.h would solve this problem
i searched a bit through WTL and found a nice match for "&Window", it's in atlframe.h and it begins with :
Code: Select all
#ifndef _WTL_MDIWINDOWMENU_TEXT
#define _WTL_MDIWINDOWMENU_TEXT _T("&Window")
#endif
so i believe that to translate correctly DC++ it would also be needed to set this _WTL_MDIWINDOWMENU_TEXT to the language's corresponding MENU_WINDOW (275'th line of StringDefs.h). but i don't really get how this could be done though, since _WTL_MDIWINDOWMENU_TEXT is set on the compile time
whatever, thanks
EDIT : maybe adding this :
Code: Select all
#define _WTL_MDIWINDOWMENU_TEXT CTSTRING(MENU_WINDOW)
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Yes, that is a problem. I'm not sure what the solution is. If you're interested in keeping it on the radar, you could enter it as a bug in Bugzilla...
sorry i'm not going through the registration and stuff and stuff... (you may have noticed i use a proxy, btw). several reasons in it...
but really i think that only adding :
to stdafx.h right before the #include of atlframe.h solves the problem (haven't tested though).
but really i think that only adding :
Code: Select all
#define _WTL_MDIWINDOWMENU_TEXT CTSTRING(MENU_WINDOW)