DzHandle DzCreateCallbackTimer( int milSec, BOOL repeat, DzEntry callback, intptr_t context, int priority, int sType ) { DzHost* host = GetHost(); assert( host ); if( priority == CP_DEFAULT ){ priority = host->dftPri; } if( sType == ST_DEFAULT ){ sType = host->dftSType; } assert( milSec > 0 ); assert( host->timerCount < TIME_HEAP_SIZE ); assert( callback ); assert( priority >= CP_FIRST && priority <= host->lowestPri ); assert( sType >= ST_FIRST && sType < STACK_TYPE_COUNT ); return CreateCallbackTimer( host, milSec, repeat, callback, context, priority, sType ); }
void CTaskDialog::LayoutWindow(void) { // customize post-creation window styles EnableSystemClose(HasFlag(TDF_ALLOW_DIALOG_CANCELLATION)); // create and position controls GenerateControlIDs(); LayoutControls(); SetFontControls(); SetZOrderControls(); // update various graphical items UpdateMainIcon(MainIcon()); UpdateWindowTitle(WindowTitle()); UpdateFooterIcon(FooterIcon()); // set the keyboard focus to the default button // and select the default radio button SetControlFocus(config_.iDefaultButton); if (!HasFlag(TDF_NO_DEFAULT_RADIO_BUTTON) && config_.nDefaultRadioButton != 0) CheckDlgButton(config_.nDefaultRadioButton, BST_CHECKED); // position dialog if (HasFlag(TDF_POSITION_RELATIVE_TO_WINDOW)) CenterWindow(Parent()); else CenterWindow(::GetDesktopWindow()); if (HasFlag(TDF_CALLBACK_TIMER)) CreateCallbackTimer(); Callback(TDN_DIALOG_CONSTRUCTED); }