Précédent   Forum du club des développeurs et IT Pro > C et C++ > Bibliothèques > wxWidgets
wxWidgets Forums d'entraide pour la programmation wxWidgets en C++
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 01/01/2011, 12h37   #1
DavidLord
Invité de passage
 
Inscription : août 2010
Messages : 3
Détails du profil
Informations forums :
Inscription : août 2010
Messages : 3
Points : 0
Points : 0
Par défaut Ce code de About.cpp peut-il être optimisé ?

Bonjour,


Je souhaiterais savoir si ce code pouvait être optimiser ?
Si oui qu'est ce qu'on peut modifier, ré-organiser, supprimer?

Merci beaucoup.

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
BEGIN_EVENT_TABLE(AboutTest, wxDialog)
        EVT_CLOSE(AboutTest::OnClose)
        EVT_BUTTON(wxID_CLOSE, AboutTest::CloseClick)
END_EVENT_TABLE()
 
AboutTest::AboutTest(wxWindow *parent, wxWindowID id,
                                const wxString &title, const wxPoint &position,
                                const wxSize& size, long style)
        : wxDialog(parent, id, title, position, size, style)
 
void AboutTest::CreateGUIControls()
{
        m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"),
                wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
 
        wxMemoryInputStream istream(test_logo_png, sizeof test_logo_png);
        wxImage iTestLogo(istream, wxBITMAP_TYPE_PNG);
        sbTestLogo = new wxStaticBitmap(this, ID_LOGO,
                wxBitmap(iTestLogo), wxDefaultPosition, wxDefaultSize, 0);
 
        std::string Text = std::string("") +
                "Test SVN revision " + svn_rev_str + "\n"
                "Copyright (c) 2010+ Team\n"
                "\n"
                "Just an example"
 
                ;
        Message = new wxStaticText(this, ID_MESSAGE,
                wxString::FromAscii(Text.c_str()),
                wxDefaultPosition, wxDefaultSize, 0);
        Message->Wrap(this->GetSize().GetWidth());
 
        sMain = new wxBoxSizer(wxVERTICAL);
        sMainHor = new wxBoxSizer(wxHORIZONTAL);
        sMainHor->Add(sbTestLogo);
 
        sInfo = new wxBoxSizer(wxVERTICAL);
        sInfo->Add(Message, 1, wxEXPAND|wxALL, 5);
        sMainHor->Add(sInfo);
        sMain->Add(sMainHor, 1, wxEXPAND);
 
        sButtons = new wxBoxSizer(wxHORIZONTAL);
        sButtons->Add(0, 0, 1, wxEXPAND, 5);
        sButtons->Add(m_Close, 0, wxALL, 5);
        sMain->Add(sButtons, 0, wxEXPAND);
 
        this->SetSizer(sMain);
        sMain->Layout();
 
        Fit();
        CenterOnParent();
}
DavidLord est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 19h07.


 
 
 
 
Partenaires

Hébergement Web