void AnotherMainWindow::on_CreateButton_clicked() { _createFileParams = 0; _createFileParams = new FileCreateParams(); _createFileDialog = 0; DestroyThis(_createFileDialog); _createFileDialog = new CreateFileDialog(_createFileParams, this); //CreateFileDialog dialog(_createFileParams, this); connect(_createFileDialog, SIGNAL(CreateComplete()), this, SLOT(on_CreateFileDialog_accepted())); //connect(_createFileDialog, SIGNAL(rejected()), this, SLOT(on_CreateFileDialog_rejected())); _createFileDialog->setModal(true); _createFileDialog->show(); }
bool WindowControl::CreateControl( DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, bool redirectProc ) { setHandle(CreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, GetModuleHandle(NULL), (LPVOID)this)); if ( getHandle() != NULL && redirectProc && !RedirectProc() ) DestroyThis(); return getHandle() != NULL; }