BOOL CDialogEdit::OnInitDialog() { CDialogEx::OnInitDialog(); CWnd* pWnd = GetDesktopWindow(); CenterWindow(pWnd); SetWindowText(Title); // Create the Scintilla editor InitialiseEditor(); SendEditor(SCI_SETTEXT, 0, (WPARAM)Text.GetBuffer()); ShowWindow(SW_NORMAL); SizeEditor(); SendEditor(SCI_SETSEL, 0, 0); return FALSE; // return TRUE unless you set the focus to a control }
void CDialogEdit::OnSize(UINT nType, int cx, int cy) { CDialogEx::OnSize(nType, cx, cy); SizeEditor(); }
void VSTPlugin::SetSize(int x,int y,bool upd) { sizex = x; sizey = y; if(upd && Is() && IsEdited()) SizeEditor(this,sizex,sizey); }