From 4f3b37fd0e60dcdf61c951e3c220fe267e8257f8 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 16 Aug 2002 09:55:54 +0000 Subject: [PATCH] Applied patch [ 594416 ] MDI Previous Child From Benjamin I. Williams git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/html/faqgtk.htm | 27 +++++++++++++++++++++++++-- docs/html/faqmac.htm | 2 +- docs/html/faqmsw.htm | 23 +++++++++++++++++++++-- docs/html/platform.htm | 8 ++++---- docs/latex/wx/hashmap.tex | 2 +- src/mac/carbon/mdi.cpp | 1 + src/mac/mdi.cpp | 1 + src/msw/mdi.cpp | 11 ++++++++++- src/os2/mdi.cpp | 1 + 9 files changed, 65 insertions(+), 11 deletions(-) diff --git a/docs/html/faqgtk.htm b/docs/html/faqgtk.htm index 54bbdb5c10..c93ebad47e 100644 --- a/docs/html/faqgtk.htm +++ b/docs/html/faqgtk.htm @@ -1,4 +1,3 @@ - @@ -24,19 +23,43 @@ See also top-level FAQ page.

List of questions in this category

+ +
+

What is wxWindows 2 for GTK?

+ wxWindows 2 for GTK is a port of wxWindows to the GTK+ toolkit, which is freely available for most flavours of Unix with X. wxWindows 2 for GTK is often abbreviated to wxGTK. wxGTK has a separate home page here.

+

Why doesn't reading floating point numbers work when using wxWindows?

+ +If your program reads the floating point numbers in the format 123.45 +from a file, it may suddently start returning just 123 instead of the +correct value on some systems -- which is all the more mysterious as the same +code in a standalone program works just fine. + +

+The explanation is that GTK+ changes the current locale on program startup. If +the decimal point character in the current locale is not the period (for +example, it is comma in the French locale), all the standard C functions won't +recognize the numbers such as above as floating point ones any more. + +

+The solution is to either use your own function for reading the floating point +numbers (probably the best one) or to call setlocale(LC_NUMERIC, "C") +before reading from file and restore the old locale back afterwards if needed. +

Does wxGTK have GNOME support?

Currently wxGTK does not have any features that would involve dependence on any desktop diff --git a/docs/html/faqmac.htm b/docs/html/faqmac.htm index 722f83ca55..3db0a016a8 100644 --- a/docs/html/faqmac.htm +++ b/docs/html/faqmac.htm @@ -34,7 +34,7 @@ See also top-level FAQ page.
  • How does CVS handle file types/creators under Mac OS X?
  • What steps are required to build wxMac using CodeWarrior P ro 5.3?
  • What steps are required to build wxMac under Mac OS X?
  • -
  • What important settings are required in the CodeWarrior P roject Preferences?
  • +
  • What important settings are required in the CodeWarrior Project Preferences?
  • What are the smart preprocessing errors with the Apple Developer Tools?
  • How does wxMac support the standard Apple About menu item and Help menu?
  • diff --git a/docs/html/faqmsw.htm b/docs/html/faqmsw.htm index 30970bb620..2c56fedb31 100644 --- a/docs/html/faqmsw.htm +++ b/docs/html/faqmsw.htm @@ -1,4 +1,3 @@ - @@ -35,6 +34,7 @@ See also top-level FAQ page.
  • Can you compile wxWindows 2 as a DLL?
  • How can I reduce executable size?
  • Is wxWindows compatible with MFC?
  • +
  • Why do I get errors about FooBarA when I only use FooBar in my program?
  • Why my code fails to compile with strange errors about new operator?
  • How do I port MFC applications to wxWindows?
  • Why do I sometimes get bizarre crash problems using VC++ 5/6?
  • @@ -216,6 +216,25 @@ There is a sample which demonstrates MFC and wxWindows code co-existing in the s application. However, don't expect to be able to enable wxWindows windows with OLE-2 functionality using MFC.

    +

    Why do I get errors about FooBarA when I only use FooBar in my program?

    + +If you get errors like +

    +

    +no matching function for call to 'wxDC::DrawTextA(const char[5], int, +int)' +
    +

    +or similar ones for the other functions, i.e. the compiler error messages +mention the function with the 'A' suffix while you didn't +use it in your code, the explanation is that you had included +<windows.h> header which redefines many symbols to have such +suffix (or 'W' in the Unicode builds). + +

    +The fix is to either not include <windows.h> at all or include +"wx/msw/winundef.h" immediately after it. +

    Why my code fails to compile with strange errors about new operator?

    The most common cause of this problem is the memory debugging settings in @@ -395,7 +414,7 @@ First, you can use wxRegKey directly, for example: regKey.SetName(idName); { - wxLogNull dummy; + wxLogNull dummy; if (!regKey.Create()) { idName = wxT("HKEY_CURRENT_USER\\SOFTWARE\\My Company\\My Product\\Stuff\\"); diff --git a/docs/html/platform.htm b/docs/html/platform.htm index f9c96fc26b..cb2e2d6feb 100644 --- a/docs/html/platform.htm +++ b/docs/html/platform.htm @@ -22,8 +22,8 @@ You will find below the list of all supported platforms for different ports of wxWindows 2.x (wxMSW/wxGTK/wxMotif ports only). The cross icon in the third column doesn't mean that the platform is not supported, but just that wxWindows hasn't -been tested on it recently (the table is being updated for wxWindows 2.1.14 -beta currently). +been tested on it recently (the table is being updated for wxWindows 2.3.3 +currently).

    See also: @@ -102,8 +102,8 @@ often don't work. AIX - wxGTK with AIX CCUnknown

    - wxGTK 2.2.9 with gcc 3.0.4OkIan BrownShared library building doesn't work, use --disable-shared + wxGTK 2.2.9 with gcc 3.0.4OkIan BrownShared library building doesn't work, use --disable-shared + wxGTK 2.3.3 with xlC (AIX 4.3.2)OkIrvin ProbstBoth static and shared wxGTK libraries work, but only with static GTK+ and GLib wxMotif with xlC 3.1.4.0 (AIX 4.2)Ok Bernhard Eck Some problems with OpenGL and native X server diff --git a/docs/latex/wx/hashmap.tex b/docs/latex/wx/hashmap.tex index 916b4dbe4d..fcaaab9044 100644 --- a/docs/latex/wx/hashmap.tex +++ b/docs/latex/wx/hashmap.tex @@ -8,7 +8,7 @@ whose interface is a subset of the interface of STL containers. \begin{verbatim} class MyClass { /* ... */ }; - // declare an hash map with string keys and int values + // declare a hash map with string keys and int values WX_DECLARE_STRING_HASH_MAP( int, MyHash5 ); // same, with int keys and MyClass* values WX_DECLARE_HASH_MAP( int, MyClass*, wxIntegerHash, wxIntegerEqual, MyHash1 ); diff --git a/src/mac/carbon/mdi.cpp b/src/mac/carbon/mdi.cpp index 94b0244562..1ce76a692c 100644 --- a/src/mac/carbon/mdi.cpp +++ b/src/mac/carbon/mdi.cpp @@ -44,6 +44,7 @@ static const int IDM_WINDOWCASCADE = 4002; static const int IDM_WINDOWICONS = 4003; static const int IDM_WINDOWNEXT = 4004; static const int IDM_WINDOWTILEVERT = 4005; +static const int IDM_WINDOWPREV = 4006; // This range gives a maximum of 500 MDI children. Should be enough :-) static const int wxFIRST_MDI_CHILD = 4100; diff --git a/src/mac/mdi.cpp b/src/mac/mdi.cpp index 94b0244562..1ce76a692c 100644 --- a/src/mac/mdi.cpp +++ b/src/mac/mdi.cpp @@ -44,6 +44,7 @@ static const int IDM_WINDOWCASCADE = 4002; static const int IDM_WINDOWICONS = 4003; static const int IDM_WINDOWNEXT = 4004; static const int IDM_WINDOWTILEVERT = 4005; +static const int IDM_WINDOWPREV = 4006; // This range gives a maximum of 500 MDI children. Should be enough :-) static const int wxFIRST_MDI_CHILD = 4100; diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 1d295a13dc..611dbbe4ae 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -82,6 +82,7 @@ static const int IDM_WINDOWCASCADE = 4002; static const int IDM_WINDOWICONS = 4003; static const int IDM_WINDOWNEXT = 4004; static const int IDM_WINDOWTILEVERT = 4005; +static const int IDM_WINDOWPREV = 4006; // This range gives a maximum of 500 MDI children. Should be enough :-) static const int wxFIRST_MDI_CHILD = 4100; @@ -188,6 +189,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent, m_windowMenu->AppendSeparator(); m_windowMenu->Append(IDM_WINDOWICONS, _("&Arrange Icons")); m_windowMenu->Append(IDM_WINDOWNEXT, _("&Next")); + m_windowMenu->Append(IDM_WINDOWPREV, _("&Previous")); } m_parentFrameActive = TRUE; @@ -500,6 +502,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) // is it one of standard MDI commands? WXWPARAM wParam = 0; + WXLPARAM lParam = 0; int msg; switch ( id ) { @@ -525,6 +528,12 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) case IDM_WINDOWNEXT: msg = WM_MDINEXT; + lParam = 0; // next child + break; + + case IDM_WINDOWPREV: + msg = WM_MDINEXT; + lParam = 1; // previous child break; default: @@ -533,7 +542,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) if ( msg ) { - ::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, 0); + ::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, lParam); return TRUE; } diff --git a/src/os2/mdi.cpp b/src/os2/mdi.cpp index 1fccebacb2..70dedddf64 100644 --- a/src/os2/mdi.cpp +++ b/src/os2/mdi.cpp @@ -53,6 +53,7 @@ static const int IDM_WINDOWCASCADE = 4002; static const int IDM_WINDOWICONS = 4003; static const int IDM_WINDOWNEXT = 4004; static const int IDM_WINDOWTILEVERT = 4005; +static const int IDM_WINDOWPREV = 4006; // This range gives a maximum of 500 MDI children. Should be enough :-) static const int wxFIRST_MDI_CHILD = 4100; -- 2.45.2