Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window1.SetTitle("My Program")
- ->SetSize({ 640,480 })
- ->SetPosition({ 100,100 })
- ->SetClosesProgram(true)
- ->Show();
- Control* Control::SetSomething(int something)
- {
- //Тут оснвной код метода
- return this;
- }
- template <class Derived>
- class WQUERY_API ControlBase
- {
- private:
- Derived * pDerived_; // Указатель на наследника
- public:
- ControlBase(Derived * pDerived):pDerived_(pDerived)
- Derived* SetText(const std::string &title)
- {
- if (this->hWnd_)
- {
- SetWindowTextA(this->hWnd_, title.c_str());
- }
- return this->pDerived_;
- }
- class Button;
- template class WQUERY_API ControlBase<Button>;
- /**
- * brief Класс наследуется от базового шаблонного класса ControlBase
- */
- class WQUERY_API Button : public ControlBase<Button>
- {
- Button::Button(Window * window):ControlBase(this){}
Add Comment
Please, Sign In to add comment