[RAD C++] Form.procedure & Kompilierfehler
-
Guten Abend,
Ich verwende Code::Blocks, MinGW und RAD C++ (http://www.radcpp.com/) als GUI-Bibliothek.
Prozedural ging es mir RAD C++ sehr schnell und einfach eine GUI zu entwerfen, aber das war nur für den Anfang.
Also wollte ich das ganze mal oop-ieren^^
Aber an einer kleinen Stelle hakts und ich kriegs nicht in den Griff...Das ist mein Code:
man achte auf:
//######################################## this->procedure = this->formprocedure; //# //########################################
CForm.h
#ifndef CFORM_H #define CFORM_H #include <radc++.h> class CForm : public Form { public: ///Constructor CForm() { ///CForm this->create("Form"); //######################################## this->procedure = this->formprocedure; //# //######################################## ///textBox1 textBox1.create("", AUTO_ID, 0, 0, 200, 200, *this); } ///textBox1 TextBox textBox1; ///procedure1 FormProcedure formprocedure (FormProcArgs) { //Wenn Fenster geschlossen wird ON_CLOSE() { Application.close(); } //Wenn die Größe des Fensters verändert wurde ON_SIZE() { textBox1.setWidth (this->getCWidth() ); textBox1.setHeight (this->getCHeight() ); } return 0; } }; #endif
Fehlermeldung vom Compiler
'CForm::CForm()': CForm.h|15|error: no match for 'operator=' in '((Form*)((CForm*)this))->Form::procedure = ((CForm*)this)->CForm::formprocedure' C:\radc++\include\radc++.h|598|note: candidates are: ValueType __rproperty<Container, ValueType, nPropType>::operator=(const ValueType&) [with Container = Form, ValueType = FormProcedure (*)(HWND__*, UINT, WPARAM, LPARAM), int nPropType = 2] C:\radc++\include\radc++.h|599|note: __rproperty<Container, ValueType, nPropType> __rproperty<Container, ValueType, nPropType>::operator=(const __rproperty<Container, ValueType, nPropType>&) [with Container = Form, ValueType = FormProcedure (*)(HWND__*, UINT, WPARAM, LPARAM), int nPropType = 2]
#include "CForm.h" ///Hauptprogramm rad_main() CForm f; rad_end()
Wenn mir jemand bei diesem kleinen Fehlerchen, was mir nun schon einen Tag den Kopf zerbricht (schlechte Doku für RAD C++^^) wäre ich sehr froh
ich hab iwie eine Denkblockade...Vielen Dank schonmal
Fabian