How to write a boarding control

xiaoxiao2021-03-06  45

Class Chelloview: Public CCoecontrol

{

PUBLIC:

Static Chelloview * Newl (const trect& all);

~ Chelloview ();

Void ConstructL (Const Treat &)

Private:

Void Draw (const trect) const;

Private:

HBUFC * iHELLOTEXT;

}

Void Chelloview :: ConstructL (Const Ccoecontrol & Acontainer, Const Treat & Arect) {

SetContainerWindowl (ACONTAINER); / / Description Chelloview is ACONTAINER

// A host control;

SetRect (all);

..........

} Also, in the main control, ACONTAINER

Change CCoecontrol * ComponentControl (Tint Aindex) const; CountComponentControls Returns the number of controls.

Note Before the control is redrawn, be sure to set the area to be redrawn into an invalid area, otherwise it will not be redrawn.

转载请注明原文地址:https://www.9cbs.com/read-60322.html

New Post(0)