browse dialog popup

This is a discussion on browse dialog popup within the C++ Programming forums, part of the General Programming Boards category; i need some information on implementing a 'browse for file' dialog popup box... thanks! Kilo~...

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    9

    browse dialog popup

    i need some information on implementing a 'browse for file' dialog popup box... thanks! Kilo~

  2. #2
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    9
    Code:
    void DoFileOpen(HWND hwnd)
    {
    	OPENFILENAME ofn;
    	char szFileName[MAX_PATH] = "";
    
    	ZeroMemory(&ofn, sizeof(ofn));
    
    	ofn.lStructSize = sizeof(OPENFILENAME);
    	ofn.hwndOwner = hwnd;
    	ofn.lpstrFilter = "All Files (*.*)\0*.*\0";
    	ofn.lpstrFile = szFileName;
    	ofn.nMaxFile = MAX_PATH;
    	ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
    	ofn.lpstrDefExt = "txt";
    
    	if(GetOpenFileName(&ofn))
    	{
    		SetDlgItemText(hwnd, ID_EDITEN, ofn.lpstrInitialDir);
    	}
    }
    im getting starting with

    C:\Documents and Settings\---\Desktop\ddcrypt\ddcrypt.cpp(179) : error C2065: 'OPENFILENAME' : undeclared identifier

  4. #4
    Registered User
    Join Date
    May 2005
    Posts
    9

    hhhheeeellllpppp

    hhhheeelllpppp mmmeeeee

  5. #5
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903

    Browse for Folder

    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  6. #6
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    A quick search suggests that you have WIN32_LEAN_AND_MEAN defined. If so, get rid of it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 20
    Last Post: 02-23-2010, 12:49 AM
  2. Graphical Popup Dialog
    By mani_monaj in forum Windows Programming
    Replies: 0
    Last Post: 05-05-2006, 01:27 AM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  4. Dialog popup when program executed.
    By xlnk in forum Windows Programming
    Replies: 1
    Last Post: 03-03-2004, 05:44 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21