Invisible Control Class
Brief Introduction to Invisible Control Class
Invisible control refers to the components which cannot be displayed on the window but have certain functions.
These components is encapsulation to some functional templates, guaranteeing that they can be edited in miniStudio like control
mObjectmComponentmInvsbComp
mInvsbComp
mInvsbCompControl name: None
English name: Invisible Component
Brief introduction: Basic class of invisible component
Schematic diagram: Foundation class, cannot be used directly
Style of mInvsbComp
mInvsbCompIt is inherited from the style of mComponent.
Property of mInvsbComp
mInvsbCompIt is inherited from the property of mComponent.
Method of mInvsbComp
mInvsbCompmInvsbComp provides realization of the following methods:
setIdgetIdsetReleatedgetReleatedgetChild
In addition, for the convenience of use of mInvsbComp, the following functions are provided
Create invisible component
NCS_INVSB_CREATE_INFO structure used by function ncsCreateInvsbCompIndirect is defined as below:
Note that it is not encouraged to directly use the function to create invisible component, and they have no advantage in handwritten codes. The advantage is that resources provided by miniStudio can be utilized to load.
So example is omitted.
Event of mInvsbComp
mInvsbCompIt is inherited from the event of mComponent.
mTimer
mTimerControl name:
NCSCTRL_TIMEREnglish name: Timer
Brief introduction: Encapsulation to MiniGUI
SetTimerExandKillTimer

Inheritance relationship:
mObjectmComponentmInvsbCompmTimer
Style of mTimer
mTimerIt is inherited from the style of mInvsbComp.
Property of mTimer
mTimerIt is inherited from the property of mInvsbComp.
Property ID
miniStudio name
Type
Authority
Explanation
NCSP_TIMER_INTERVAL
interval
DWORD
RW
Set time interval of Timer, with 10ms as the unit. If Timer is operating, it will restart Timer
Method of mTimer
mTimerIt is inherited from the method of mInvsbComp.
start
Start Timer
Return
TRUEfor start successful,FALSEfor start failed.stop
Stop the timer in operation
getParent
Get the window with Timer
Event of mTimer
mTimerIt is inherited from the event of mInvsbComp.
Event notification code
Explanation
Parameter
MSG_TIMER
Directly utilize the definition of MiniGUI
Total time amount that timer walks by, which is lParam value of MSG_TIMER
Note that the callback of the event is:
Return
TRUEto continue Timer,FALSEto stop TimerParams
DWORD total_count- Total time amount since Timer starts
Example of mTimer
mTimerThe example below demonstrates using timer to show a digital clock, and the operation effect drawing is as below:

Declare Timer uses the same structure as the control
Initialize Timer, establish a connection with Static control, and start Timer
When
MSG_TIMERevent occurs, update the time
For complete code, refer to the following List.
<< Other Advanced Control Classes | Table of Contents | Other Classes >>
Last updated