XP Style mit VC++ und MFC

thodtie

Mitglied
Hi,

ich möchte gern mit VC++ und MFC mein Win Proggie in den Win XP Style bringen nur weiß ich leider nicht wie.

Die Einstellungen der Manifestdateien stimmen. Ich habe bei MSDN noch folgendes gefunden dazu:

Code:
#using <mscorlib.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;

namespace VStyles {
public __gc class Form1 : public System::Windows::Forms::Form {

private:
   System::Windows::Forms::Button*  button1;

public:
   Form1() {
	  this->button1 = new System::Windows::Forms::Button();
	  this->button1->Location = System::Drawing::Point(24, 16);
	  this->button1->Size = System::Drawing::Size(120, 100);
	  this->button1->FlatStyle = FlatStyle::System;
	  this->button1->Text = S"I am themed.";

	  // Sets up how the form should be displayed and adds the controls to the form.
	  this->ClientSize = System::Drawing::Size(300, 286);
	  this->Controls->Add(this->button1);

	  this->Text = S"Application::EnableVisualStyles Example";

   }
};
}
[STAThread]
int main() {
   Application::EnableVisualStyles();
   Application::Run(new VStyles::Form1());
}

Aber leider kann ich damit auch nicht sehr viel anfangen und bei mir einbauen geht nicht, weil ich mein Dialog mit dem Ressourcen Editor erstelle und nicht mit Code.

Kann mir da jemand weiterhelfen?

Grüße
 
Zurück