Window::Window(EngineState* state, HINSTANCE hinstance, LPCWSTR name, DWORD style, DWORD exStyle, LPCWSTR iconResource, LPCWSTR smallIconResource, LPCWSTR menuResource, LPCWSTR accelResource) : style(style), exStyle(exStyle), appName(name), hinstance(hinstance), hwnd(NULL) { if (hinstance == NULL) this->hinstance = GetModuleHandle(NULL); INITCOMMONCONTROLSEX cce; cce.dwSize = sizeof(INITCOMMONCONTROLSEX); cce.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES | ICC_STANDARD_CLASSES | ICC_STANDARD_CLASSES; ::InitCommonControlsEx(&cce); MakeWindow(iconResource, smallIconResource, menuResource); SetClientArea(state->m_BackBufferDesc.Width, state->m_BackBufferDesc.Height); if (accelResource) { accelTable = ::LoadAccelerators(hinstance, accelResource); if (!accelTable) throw Win32Exception(::GetLastError()); } }
/***************************************************************************** * Function - Constructor * DESCRIPTION: * *****************************************************************************/ DataPointTime::DataPointTime() { GUI_SetFont(*DEFAULT_FONT_11_LANGUAGE_INDEP); // Select Font to use SetClientArea(0,0,GUI_GetFontSizeY(),50); SetAlign(GUI_TA_LEFT + GUI_TA_BOTTOM); mSecCounter = 0; mShowColon = false; mColon = ' '; mLastColonPosition = -1; ActTime::GetInstance()->Subscribe(this); SetTime(*(ActTime::GetInstance())); }