Minor samples cleanup.

See #24617.
This commit is contained in:
Vadim Zeitlin
2024-06-16 00:13:16 +02:00
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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
+8 -8
View File
@@ -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