From d2c867bfde10f18019dcc65a4cf8298a62256683 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Sat, 15 Jun 2024 13:16:27 -0400 Subject: [PATCH 1/4] Use "MS Shell Dlg" as the dialog font in MFC Sample (Microsoft recommendation) --- samples/mfc/mfctest.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/mfc/mfctest.rc b/samples/mfc/mfctest.rc index 7c5da8b070..3d737ac939 100644 --- a/samples/mfc/mfctest.rc +++ b/samples/mfc/mfctest.rc @@ -59,7 +59,7 @@ END ABOUTBOX DIALOG DISCARDABLE 34, 22, 144, 75 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Hello" -FONT 8, "Helv" +FONT 8, "MS Shell Dlg" BEGIN CTEXT "Microsoft Windows",IDC_STATIC,0,5,144,8 CTEXT "Microsoft Foundation Classes",IDC_STATIC,0,14,144,8 From 857938ef5423dcf266f33169cfeee5903d8f3e9c Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Sat, 15 Jun 2024 13:17:43 -0400 Subject: [PATCH 2/4] Don't expose "HTML" in richedit sample to localization Doesn't seem like something you would want translated (IMO) --- samples/richtext/richtext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/richtext/richtext.cpp b/samples/richtext/richtext.cpp index ed00dbfb5c..337d9eb08b 100644 --- a/samples/richtext/richtext.cpp +++ b/samples/richtext/richtext.cpp @@ -1768,7 +1768,7 @@ void MyFrame::OnReload(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnViewHTML(wxCommandEvent& WXUNUSED(event)) { - wxDialog dialog(this, wxID_ANY, _("HTML"), wxDefaultPosition, wxSize(500, 400), wxDEFAULT_DIALOG_STYLE); + wxDialog dialog(this, wxID_ANY, "HTML", wxDefaultPosition, wxSize(500, 400), wxDEFAULT_DIALOG_STYLE); wxBoxSizer* boxSizer = new wxBoxSizer(wxVERTICAL); dialog.SetSizer(boxSizer); From 3bde9346b1f0c97177c2f20f298c2ec55ffe165f Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Sat, 15 Jun 2024 13:18:43 -0400 Subject: [PATCH 3/4] Remove wxT() macros --- samples/xti/xti.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/xti/xti.cpp b/samples/xti/xti.cpp index 06a31f420b..29f88d7958 100644 --- a/samples/xti/xti.cpp +++ b/samples/xti/xti.cpp @@ -276,13 +276,13 @@ public: // this approach would be used if the handler would not // be connected really in the designer, so we have to supply // the information - const wxObject* but = wxAnyGetAsObjectPtr( m_frame->GetProperty(wxT("Button")) ); + const wxObject* but = wxAnyGetAsObjectPtr( m_frame->GetProperty("Button") ); if ( object == but && - propInfo == wxCLASSINFO( wxButton )->FindPropertyInfo(wxT("OnClick")) ) + propInfo == wxCLASSINFO( wxButton )->FindPropertyInfo("OnClick") ) { eventSink = m_frame; handlerInfo = m_frame->GetClassInfo()-> - FindHandlerInfo(wxT("ButtonClickHandler")); + FindHandlerInfo("ButtonClickHandler"); return true; } return false; @@ -314,13 +314,13 @@ void RegisterFrameRTTI() wx_dynamic_cast( wxDynamicClassInfo *, wxClassInfo::FindClass("MyXTIFrame")); if ( dyninfo == nullptr ) { - dyninfo = new wxDynamicClassInfo(wxT("myxtiframe.h"), - wxT("MyXTIFrame"), + dyninfo = new wxDynamicClassInfo("myxtiframe.h", + "MyXTIFrame", CLASSINFO(wxFrame) ); // this class has a property named "Button" and the relative handler: - dyninfo->AddProperty(wxT("Button"), wxGetTypeInfo((wxButton**) nullptr)); - dyninfo->AddHandler(wxT("ButtonClickHandler"), + dyninfo->AddProperty("Button", wxGetTypeInfo((wxButton**) nullptr)); + dyninfo->AddHandler("ButtonClickHandler", nullptr /* no instance of the handler method */, CLASSINFO( wxEvent ) ); } } @@ -385,7 +385,7 @@ wxDynamicObject* CreateFrameRTTI() Params[4] = wxAny(wxSize(-1,-1)); Params[5] = wxAny((long)0); wxASSERT( info->Create(button, 6, Params )); - frameWrapper->SetProperty( wxT("Button"), wxAny( button ) ); + frameWrapper->SetProperty( "Button", wxAny( button ) ); // other controls page From e0daf9ed02ba177d28e6bfeb37d3260b843bcbe1 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Sat, 15 Jun 2024 13:20:39 -0400 Subject: [PATCH 4/4] Fix comment that mentions uncommenting something that is not commented Reworded it a bit also. --- samples/thread/thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp index 3db9681d52..4e93231449 100644 --- a/samples/thread/thread.cpp +++ b/samples/thread/thread.cpp @@ -304,8 +304,8 @@ bool MyApp::OnInit() if ( !wxApp::OnInit() ) return false; - // uncomment this to get some debugging messages from the trace code - // on the console (or just set WXTRACE env variable to include "thread") + // get any debugging messages from trace code onto the console + // (can also be done by setting the WXTRACE env variable to include "thread") wxLog::AddTraceMask("thread"); // Create the main frame window