Win32 Programmierung Tutorial

Prophet
Kennt irgend jemand ein gut verständliches Tutorial das einem erklärt wie man Fenster in C++ (unter Windows) programmiert. Also ein Tutorial für Win32 Programmierung. Ich habe zwar eins gefunden, aber das ist auf Englisch. Kennt ihr nicht eines auf Deutsch? Grundsätzlich habe ich keine Probleme damit Englisch zu lesen aber auf Deutsch ist es doch verständlicher. Also wenn ihr irgendwelche kennt sagt sie mir bitte!

mfg Prophet
p-Logic
Klick mich! Schnell! großes Grinsen
Oder, wenn du Plattformübergreifend programmieren willst:
Klickklick!
Prophet
Man muss nur wissen worunter man suchen muss. Also danke für das Tutorial. Aber ich glaube ich fange mit wxWidgets an das sieht mir sehr gut aus. Und es ist wirklich absolut Plattformportable? Also muss nur entsprechend Kompiliert werden?

EDIT: Tutorials für wxWidgets? großes Grinsen

EDIT2: also auf Deutsch in Englisch finde ich massen...
Prophet
Kennt den keiner eins?
joschi
http://www.robsite.de

mal hier schauen vielleicht findest ja was
Prophet
nein dort ist nichts zu finden..
ronin
ich habe mich auch mit wxWidgets auseinandergesetzt, aber kein (für mich verständliches) Tutorial gefunden. Ich habe jedoch eine kleine Hilfe gefunden, mit der man sich das gröbste zusammenreimen kann.
Wenn du mal bei google nach "wxGlade" suchst findest du ein Programm mit dem du dir die GUIs zusammenziehen kannst. Das Programm generiert dann automatisch den Code. Und dann heisst anschauen, ausprobieren, versuchen zu verstehen... Augen rollen

hasta luego
ronin
Prophet
ich habe momentan probleme die bibliothek zu installieren...
ronin
Welche Entwicklungsumgebung benutzt du denn?
Prophet
Ich habe auf meinem PC Dev-C++ 4 und Code::Blocks installiert also beide auf MinGW Compiler Basis. ABer wie schon gesagt schnalle ich das installations Tutorial von WXWidgets nicht...
ronin
Es gibt eine ältere Version von wxWidgets als dev-pack, das ist dann ganz einfach zu installieren. Ich lads mal rauf, und poste dann den link wenns on ist..

//EDIT
DevC++ + sämtliche nötigen Devpacks
ich verwende genau diese Version und diese dev-Packs.
Bei der Reihenfolge der Installationen bin ich mir nicht ganz sicher, aber ich glaube als erstes wxWindows2.4.2.DevPack, danach imagelib-2.DevPack und zu guter letzt noch die contribs....

hasta luego
ronin
Prophet
Es funktioniert jetzt zwar einwandfrei aber ich werde ja wohl kaum immer ein DevPack geben welches ich einfach mal installieren kann.
Daher immernoch die Frage wie ich denn mit den Sources umgehe?
ronin
Falls du mit Sources das wx-Programmieren meinst:
Wenn du die DevPacks installiert hast solltest du wenn du ein Projekt erstellen willst unter dem Tab "wxWidgets" auswählen können. In Kombination mit wxGlade kann man sich den Aufbau zusammenreimen... cool
andernfalls habe ich die Frage falsch verstanden
Prophet
Ja du hast mich falsch verstanden großes Grinsen
Es ging mir darum wie ich mir selber wx widgets compiliere damit ich nachher vll auch mal aktuellere versionen nutzen kann.
Ich habe mir mal ein Programm geschrieben und ich muss sagen das es sehr intuitiv aufgebaut ist. Man kann sich gut durch testen einfinden. Nur momentan stürtzt mein erstes programm immer wieder ab :/
Hast du tiefere kenntnisse in sachen wxWidgets Programmierung?
ronin
Nein leider nicht heulen Ich habe nur ein bisschen rumgebastelt wie wx so funktioniert, habe aber bis jetzt noch nichts richtiges gemacht. sorry...

Gibt es eine Fehlermeldung? Wenn ja wie lautet sie? Bin auch interessiert großes Grinsen
Prophet
das programm stürtzt einfach ab...

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:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
/*
 * Copyright (c) 2006 Jan Bracker
 *
 * main.cpp
 */


// HEADER-INFOMATION ===========================================================
#include "wx/wxprec.h"

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

#ifndef WX_PRECOMP
    #include "wx/wx.h"
#endif

// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------

// the application icon (under Windows and OS/2 it is in resources)
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
    #include "mondrian.xpm"
#endif


// MAIN APPLICATION ============================================================
class MainApplication : public wxApp
{
public:
    virtual bool OnInit();

    void OnClickTestButton();
	void OnClickBottomButton();

private:
	wxFrame *mainFrame;
	wxButton *testButton;
	wxButton *bottomButton;
	wxTextCtrl *textArea;
};

// MAIN FRAMM CLASS ============================================================
class MainFrame : public wxFrame
{
public:
    MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
            long style = wxDEFAULT_FRAME_STYLE);

    void OnQuit(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);

private:
    DECLARE_EVENT_TABLE();
};

// MAIN PROGRAMM SOURCE ========================================================

// MainApplication::OnInit() ---------------------------------------------------
bool MainApplication::OnInit()
{
	this->mainFrame = new MainFrame(_T("Minimal wxWindows App"), wxPoint(50, 50), wxSize(450, 340));
	this->mainFrame->SetBackgroundColour(0x00ff0000);

	this->testButton = new wxButton(this->mainFrame, 100, _T("Close"),
			wxPoint(20, 20), wxSize(100, 50), wxBU_TOP);
	this->testButton->Show(true);

	this->bottomButton = new wxButton(this->mainFrame, 101, _T("Hallo"),
			wxPoint(120, 20), wxSize(100, 50), wxBU_LEFT);
	this->bottomButton->Show(true);

	this->textArea = new wxTextCtrl(this->mainFrame, wxID_ANY, wxString("Initial Value of a TextField"), wxPoint(100, 100), wxSize(300, 300));
	this->textArea->Show(true);

    this->mainFrame->Show(true);

    return true;
}

void MainApplication::OnClickTestButton()
{
	this->mainFrame->Close(true);
}
void MainApplication::OnClickBottomButton()
{
	this->textArea->SetValue(wxString("Test"));
//	this->bottomButton->SetLabel(this->textArea->GetValue());
}

MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
       : wxFrame(NULL, -1, title, pos, size, style)
{
    SetIcon(wxICON(mondrian));
}

// MainFrame Event Handlers ----------------------------------------------------
void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
    Close(true);
}

void MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
    wxString msg;
    msg.Printf( _T("This is the About dialog of the minimal sample.\n")
                _T("Welcome to %s"), wxVERSION_STRING);

    wxMessageBox(msg, _T("About Minimal"), wxOK | wxICON_INFORMATION, this);
}








// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------

// IDs for the controls and the menu commands
enum
{
    // menu items
    Minimal_Quit = 1,

    // it is important for the id corresponding to the "About" command to have
    // this standard value as otherwise it won't be handled properly under Mac
    // (where it is special and put into the "Apple" menu)
    Minimal_About = wxID_ABOUT
};

// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------

// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MainFrame, wxFrame)
    EVT_MENU(Minimal_Quit,  MainFrame::OnQuit)
    EVT_MENU(Minimal_About, MainFrame::OnAbout)
	EVT_BUTTON(100, MainApplication::OnClickTestButton)
	EVT_BUTTON(101, MainApplication::OnClickBottomButton)
END_EVENT_TABLE()

// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MainApplication)


Das Problem tritt auf wenn ich auf bottomBUtton (id : 101) klicke. Er stürtzt einfach ab...
tunceli-adem
Prophet
nur leider sind auch dort keine tutorials für wxWidgets oder WinAPI programmierung...
Bernasconi
gibt es auch eine Möglichkeit mit C Win32 Anwendungen zu Programmieren? Ich kann (leider) nur C bis jetzt.
Hanfling
bla...

@Bernasconi:
Wems Spass macht: http://www.win-api.de/
Ansonsten vllt. GTK+, etc.

Übrigens gefällt mir mitlerweile wxWidgets / wxGTK nicht mehr wirklich, weil es mächtig bloating ist. xfc gefällt mir irgendwie.