void CVST2KSPIGUI::MakeWindow(void* p) { if (mpVSTEffect == NULL) { mpVSTEffect = dynamic_cast<CVST2KSPIPlugIn*>(GetPlugIn())->GetEffect(); } try { PreCreate(); // Create the window mpWindow = ge::IWindow::Create(); // Tell the window what context it's in mpWindow->SetContext(mpContext); #ifdef WIN32 mhWndParent = (HWND)p; mpVSTEffect->dispatcher(mpVSTEffect, effEditOpen, 0, 0, p, 0.0); #endif #ifdef _Mac /*void**/ mhWndParent = p; mpVSTEffect->dispatcher(mpVSTEffect, effEditOpen, 0, 0, p, 0.0); #endif tuint32 iSizeX; tuint32 iSizeY; GetSize(&iSizeX, &iSizeY); ge::SRect rct(0, 0, iSizeX, iSizeY); // mpWindow->MakeWindow(mhWndParent, &rct, false); Initialize(); // Make the window visible // mpWindow->ShowWindow(); // mpWindow->InstallKeyboardHook(); // mpWindow->AcquireKeyboardInput(); mbWindowMade = true; } catch(IException* pException) { const tchar* psz = pException->GetFullDescription(); // DoMsgBox(psz); pException->Destroy(); } catch(...) { // DoMsgBox("Unknown Exception"); } }
/*---------------------------------------------------------------------------------------------- Create a new TssEdit. ptss can be NULL if the control should start out empty. ----------------------------------------------------------------------------------------------*/ void TssEdit::Create(HWND hwndPar, int cid, DWORD dwStyle, HWND hwndToolTip, ITsString * ptss, ILgWritingSystemFactory * pwsf, int ws, IActionHandler * pacth) { AssertPtr(pwsf); PreCreate(pwsf, ws, ptss, pacth); m_cid = cid; m_hwndToolTip = hwndToolTip; m_wsBase = ws; m_qwsf = pwsf; if (!m_wsBase) CheckHr(pwsf->get_UserWs(&m_wsBase)); // get the user interface writing system id. // Create the window. WndCreateStruct wcs; wcs.lpszClass = _T("AfVwWnd"); wcs.hwndParent = hwndPar; wcs.SetWid(cid); wcs.style = dwStyle; CreateHwnd(wcs); // Add a tool tip. if (HasToolTip()) { // Add the combo information to the tooltip. TOOLINFO ti = { isizeof(ti), TTF_IDISHWND }; #ifdef DEBUG static StrApp s_str; s_str.Format(_T("Missing a tooltip for edit control with ID %d"), m_cid); ti.lpszText = const_cast<achar *>(s_str.Chars()); #else // !DEBUG ti.lpszText = _T("Dummy text"); #endif // !DEBUG ti.hwnd = Hwnd(); ti.uId = (uint)ti.hwnd; ::GetClientRect(Hwnd(), &ti.rect); ::SendMessage(m_hwndToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti); } PostCreate(ptss); }
uint32 KeyframerLight::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData) { switch(messageID) { case MID_PRECREATE: { PreCreate((ObjectCreateStruct*)pData); } break; case MID_INITIALUPDATE: { InitialUpdate(); } break; } return BaseClass::EngineMessageFn(messageID, pData, fData); }