Click here to Skip to main content
15,880,608 members
Articles / Desktop Programming / MFC

Selecting a Subfolder from a Particular Folder

Rate me:
Please Sign up or sign in to vote.
4.56/5 (10 votes)
23 Feb 2010CPOL2 min read 89.4K   2.9K   39  
Restricting the user to browse and select from a particular folder
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif //_WIN32\r\n"
    "#include ""res\\BrowsePF.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON                    "res\\BrowsePF.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_BROWSEPF_DIALOG DIALOGEX 0, 0, 280, 74
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Browse for particular folder"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    EDITTEXT        IDC_EDIT_ROOT_FOLDER,63,8,205,13,ES_AUTOHSCROLL
    PUSHBUTTON      "Browse Folder",IDC_BUTTON_FOLDER,87,47,50,14
    DEFPUSHBUTTON   "OK",IDOK,218,46,50,14,NOT WS_VISIBLE
    PUSHBUTTON      "Cancel",IDCANCEL,142,47,50,14
    LTEXT           "Root Folder :",IDC_STATIC_ROOT_FOLDER,9,11,42,8
    LTEXT           "Selected Folder :",IDC_STATIC_CHOSEN_FOLDER,9,27,54,8
    EDITTEXT        IDC_EDIT_CHOSEN_FOLDER,63,25,205,13,ES_AUTOHSCROLL | ES_READONLY
END


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "FileDescription", "BrowsePF MFC Application"
            VALUE "FileVersion", "1, 0, 0, 1"
            VALUE "InternalName", "BrowsePF"
            VALUE "LegalCopyright", "Copyright (C) 2003"
            VALUE "OriginalFilename", "BrowsePF.EXE"
            VALUE "ProductName", "BrowsePF Application"
            VALUE "ProductVersion", "1, 0, 0, 1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO 
BEGIN
    IDD_BROWSEPF_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 273
        TOPMARGIN, 7
        BOTTOMMARGIN, 67
    END
END
#endif    // APSTUDIO_INVOKED

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\BrowsePF.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#endif

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
CEO GIPL
India India
Ahamad has done M.Tech. in Information Technology. He has 15 years software development experience. He started learning programming with GW-BASIC. He learnt COBOL, Pascal, Fortran, C, C++, Java and C#. He worked with DOS, Unix, Novel Netware and Windows platforms. He has been working on Microsoft technologies for the last 10 years. He worked with .NET, Visual C++, ATL COM/DCOM, Win SDK, MFC, WTL, Visual Basic, ASP, JavaScript, XML, OOAD and Rational Rose. He has written three books on Computer Science:

1. Programming in GW-BASIC, BPB Publications, New Delhi, 1993
2. Computer Science with C++, Allied Publishers, New Delhi, 1997
3. Introduction to C++, Allied Publishers, New Delhi. 1998

He enjoys playing badminton and musical keyboards in his spare time. He also participates in community activities. He can be reached by ahamadalisha@yahoo.com

Comments and Discussions