dreamkiller  | Bonjours voila je vien de me remettre a la prog et je test la lib wxwidgets
 Je suis en train de definir une IHM a l'aide de wxformbuilder mais j'arrive pas bien a maitriser les sizers
   Je voudrai mettre une image et cree tout un menu dessus mais plus je cherche plus je me dit que c'est impossible
   fichier cpp:
  Code :
 - ///////////////////////////////////////////////////////////////////////////
 - // C++ code generated with wxFormBuilder (version Sep  3 2006)
 - // http://www.wxformbuilder.org/
 - //
 - // PLEASE DO "NOT" EDIT THIS FILE!
 - ///////////////////////////////////////////////////////////////////////////
 - #include "wx/wxprec.h"
 - #ifdef __BORLANDC__
 - #pragma hdrstop
 - #endif //__BORLANDC__
 - #ifndef WX_PRECOMP
 - #include <wx/wx.h>
 - #endif //WX_PRECOMP
 - #include "noname.h"
 - ///////////////////////////////////////////////////////////////////////////
 - MainMenu::MainMenu( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxFrame( parent, id, title, pos, size, style )
 - {
 - 	this->SetMinSize( wxSize( 400,562 ) );
 - 	wxBoxSizer* bSizer1;
 - 	bSizer1 = new wxBoxSizer( wxVERTICAL );
 - 	lbl_titre = new wxStaticText( this, ID_DEFAULT, wxT("test" ), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
 - 	lbl_titre->SetForegroundColour( wxColour( 255, 0, 31 ) );
 - 	bSizer1->Add( lbl_titre, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
 - 	wxBoxSizer* bSizer2;
 - 	bSizer2 = new wxBoxSizer( wxVERTICAL );
 - 	m_bitmap3 = new wxStaticBitmap( this, ID_DEFAULT, wxBitmap( wxT("../../Desktop/Toto.jpeg" ), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
 - 	bSizer2->Add( m_bitmap3, 0, wxALL, 5 );
 - 	bSizer1->Add( bSizer2, 1, wxEXPAND, 5 );
 - 	this->SetSizer( bSizer1 );
 - 	this->Layout();
 - }
 
  |  
 
     fichier.h
  Code :
 - ///////////////////////////////////////////////////////////////////////////
 - // C++ code generated with wxFormBuilder (version Sep  3 2006)
 - // http://www.wxformbuilder.org/
 - //
 - // PLEASE DO "NOT" EDIT THIS FILE!
 - ///////////////////////////////////////////////////////////////////////////
 - #ifndef __noname__
 - #define __noname__
 - // Define WX_GCH in order to support precompiled headers with GCC compiler.
 - // You have to create the header "wx_pch.h" and include all files needed
 - // for compile your gui inside it.
 - // Then, compile it and place the file "wx_pch.h.gch" into the same
 - // directory that "wx_pch.h".
 - #ifdef WX_GCH
 - #include <wx_pch.h>
 - #else
 - #include <wx/wx.h>
 - #endif
 - #include <wx/statbmp.h>
 - ///////////////////////////////////////////////////////////////////////////
 - #define ID_DEFAULT wxID_ANY // Default
 - /**
 -  * Class MainMenu
 -  */
 - class MainMenu : public wxFrame
 - {
 - 	private:
 - 	protected:
 -   wxStaticText* lbl_titre;
 -   wxStaticBitmap* m_bitmap3;
 - 	public:
 -   MainMenu( wxWindow* parent, int id = -1, wxString title = wxT("Gestion Adhérents" ), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 400,562 ), int style = wxCLOSE_BOX|wxMINIMIZE_BOX|wxTAB_TRAVERSAL );
 - };
 - #endif //__noname__
 
  |  
    |