Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::PSI::OnCreateCommon Macro
C++
int (__cdecl * init)(PSI_CONTROL);
#define OnCreateCommon(name) \
    __DefineRegistryMethodP(PSI_PRELOAD_PRIORITY,PSI_ROOT_REGISTRY,unused_name,WIDE("control"),name WIDE("/rtti"),WIDE("init"),int,(PSI_CONTROL), __LINE__)

This is the first event a control will receive. When it is created with MakeNamedControl, et al. this event will be called. It allows the control to initialize its personal data to something. It can be considered a constructor of the control.

Registers under 

/psi/control/<name>/rtt/init=(PSI_CONTROL)@int@_@init

static int OnCreateCommon(name)( PSI_CONTROL control )
{
    POINTER user_data = ControlData( control );
   
    //return 0; // return 0 or FALSE to fail control creation.
    return 1; // allow the control to be created
}
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!