Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. CasperTheGhost

    DDX Problem

    If you use classes derived from the common dialog classes (for example CFileDialog) in the MFC, DDX member variables do not get updated when you choose the "OK" button. The reason for this is that the base class "OnOK()", provided for these classes, does not call...
  2. CasperTheGhost

    Find a window based on its title and......

    Below sample code will find a window based on its name/title // ?????????? is the name/title of the window you want // to find LPCTSTR lpWindowName = ??????????; HWND hWnd = ::FindWindow(NULL, lpWindowName); if (hWnd) { // Add additional code here } If this is win32 include windows.h
  3. CasperTheGhost

    dialog box in system tray

    Although not "Bullet Proof" this may help: In you Dialog's InitInstance() add this: CWnd* PrevWnd, ChildWnd; // Returns NULL if no such window is found PrevWnd = CWnd::FindWindow(NULL, "NameOfYourDialogWindow"); if (PrevWnd) { ChildWnd = PrevWnd->GetLastActivePopup()...
  4. CasperTheGhost

    reading CFile object contents in a CString obj

    If you're using a Text file try this: try { CString sFileLine; CStdioFile fileRead(sFilePathName, CFile::modeRead | CFile::typeText); while (fileRead.ReadString(sFileLine)) { ....whatever } } catch (CFileException* e) {...
  5. CasperTheGhost

    Add entries to "Look in" control of CFileDialog

    Good source on CFileDialog: http://www.devx.com/premier/mgznarch/vcdj/1998/oct98/opensave1.asp
  6. CasperTheGhost

    CFileDialog - How to Center Window?

    I am using a derived CFileDialog class in my app (Explorer "2000" style) but can't Center the Dialog to the DesktopWindow. Tried first in OnInitDialog using CenterWindow(), goes to default Upper Left Hand corner. Tried MoveWindow() too, but same results. Last resort used a CALLBACK...
  7. CasperTheGhost

    CFileDialog File Order Selection

    How do you get the correct file order selection from CFileDialog? When selecting multiple-files (OFN_ALLOWMULTISELECT flag set) the string returned (using GetStartPosition, GetNextPathName, etc) is NOT necessarily the selected file order? Example: select 1.txt, 2.txt, 3.txt from the OPEN dialog...
  8. CasperTheGhost

    Visual C++ OPENFILENAME

    I use the Common Dialogs through my .dll interface to Comdlg32.dll (I actually use PowerBuilder as my main GUI tool, hence the .dll). My problem lies when I use the OFN_MULTISELECT flag. Example: Choose at least two files for the Open Dialog and the FIRST chosen file becomes second in the...

Part and Inventory Search

Back
Top