int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nCmdShow){ MSG messages; windowSetups(hThisInstance,hPrevInstance,lpszArgument,nCmdShow,wincl,WindowProcedure); mainWindow = new MainWindow(szClassName, "Main Window", WS_OVERLAPPEDWINDOW, new Dimensions(1376/2 - 500,768/2 - 300,1010,600), HWND_DESKTOP, hThisInstance, NULL); ::SetWindowLong(mainWindow->getInstance(), GWL_STYLE, GetWindowLong(mainWindow->getInstance(), GWL_STYLE)&~WS_SIZEBOX); ctrl_R = new ShortKey(mainWindow->getInstance(),0x52); ctrl_E = new ShortKey(mainWindow->getInstance(),0x45); toolBarInit(); hWndToolbar = CreateToolbarEx(mainWindow->getInstance(), WS_VISIBLE | WS_CHILD | WS_EX_OVERLAPPEDWINDOW, IDB_STANDARD, NUMBUTTONS, hThisInstance, IDB_STANDARD, tbrButtons, NUMBUTTONS, 32, 32, 32, 32, sizeof(TBBUTTON)); ShowWindow (mainWindow->getInstance(), nCmdShow); while (GetMessage (&messages, NULL, 0, 0)){ TranslateMessage(&messages); DispatchMessage(&messages); } return messages.wParam; }
KfindTop::KfindTop(const char *searchPath) : KTopLevelWidget() { // setCaption(QString("KFind ")+KFIND_VERSION); _toolBar = new KToolBar( this, "_toolBar" ); _toolBar->setBarPos( KToolBar::Top ); _toolBar->show(); enableToolBar( KToolBar::Show, addToolBar( _toolBar ) ); _kfind = new Kfind(this,"dialog",searchPath); setView( _kfind, FALSE ); _kfind->show(); menuInit(); toolBarInit(); setMenu(_mainMenu); _mainMenu->show(); //_mainMenu->enableMoving(false); _statusBar = new KStatusBar( this, "_statusBar"); _statusBar->insertItem("0 file(s) found", 0); _statusBar->enable(KStatusBar::Hide); setStatusBar( _statusBar ); connect(_kfind,SIGNAL(haveResults(bool)), this,SLOT(enableSaveResults(bool))); connect(_kfind,SIGNAL(resultSelected(bool)), this,SLOT(enableMenuItems(bool))); connect(this,SIGNAL(deleteFile()), _kfind,SIGNAL(deleteFile())); connect(this,SIGNAL(properties()), _kfind,SIGNAL(properties())); connect(this,SIGNAL(openFolder()), _kfind,SIGNAL(openFolder())); connect(this,SIGNAL(saveResults()), _kfind,SIGNAL(saveResults())); connect(this,SIGNAL(addToArchive()), _kfind,SIGNAL(addToArchive())); connect(this,SIGNAL(open()), _kfind,SIGNAL(open())); connect(_kfind ,SIGNAL(statusChanged(const char *)), this,SLOT(statusChanged(const char *))); connect(_kfind ,SIGNAL(enableSearchButton(bool)), this,SLOT(enableSearchButton(bool))); connect(_kfind ,SIGNAL(enableStatusBar(bool)), this,SLOT(enableStatusBar(bool))); // No, No, No!!! This is pointless! (sven) // connect(_mainMenu ,SIGNAL(moved(menuPosition)), // this,SLOT(resizeOnFloating())); // connect(_toolBar ,SIGNAL(moved(BarPosition)), // this,SLOT(resizeOnFloating())); //_width=(440>_toolBar->width())?440:_toolBar->width(); _width=520; //_height=(_kfind->sizeHint()).height(); // Unused as far as I can tell // Fixed and Y-fixed guys: Please, please, please stop setting fixed size // on KTW! Fix it on your main view! // sven this->enableStatusBar(false); // _kfile emited before connected (sven) }; // and what's this semi-colon for? Grrrr!!!! (sven, too)