The "Ctrl_Draw()" function is called when sliceOmatic need to redraw the content of your interface window.
Syntax
extern "C" __declspec(dllexport) int Ctrl_Draw(
HWND wnd
)
Parameters
wnd
A handle to the interface's window
Return value
The function returns "0" if an error occurred, "1" otherwise.
Remarks
If the window is not "On" or if it is invisible, we do not need to redraw. The following template provide the lines for this:
|
extern "C" __declspec(dllexport) int Ctrl_Draw( HWND wnd )
{
if ( ! Flag_Ctrl_Wnd_On )
return( 1 ) ;
if ( ! Flag_Ctrl_Visible )
return( 1 ) ;
...
return( 1 ) ;
}
|
|
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
Sample Draw function from the "Edit mode" module.
|
...
// ----------------------------------------------------------------------------
//
// Function: Ctrl_Draw
//
// Parameters: wnd (HWND) Pointer to Window's created window
// Returns: (int) 0 if error
//
// This is called each time your menu has to be re-drawn
//
// ----------------------------------------------------------------------------
extern "C" __declspec(dllexport) int Ctrl_Draw( HWND wnd )
{
if ( ! Flag_Ctrl_Wnd_On )
return( 1 ) ;
if ( ! Flag_Ctrl_Visible )
return( 1 ) ;
box_box.Draw() ;
but_load.Draw() ;
but_undo.Draw() ;
but_erose.Draw() ;
but_dilat.Draw() ;
but_open1.Draw() ;
but_open2.Draw() ;
but_close1.Draw() ;
but_close2.Draw() ;
// --- TAG Selection Tool ---
tool_tag.Draw() ;
// --- Brush Selection Tool ---
tool_brush.Draw() ;
return( 1 ) ;
}
...
|
|
See also