Página Principal | Software | Soporte | Ventas | Contacto | de Nosotros | Noticias | Referencias | Checo | Inglés
Clase CSHBrowseFolder
simplifique
selección de carpeta
extremamente simple y pequeño | |
módelo de clase y de funcion | |
callback implementado | |
gratis con fuente código abierto |
Requirements: Windows 32bit, Visual C++ 5.0 (SP3 recommended)
Herramienta para selección de carpeta para Visual C++ que ofrece una manera simple de seleccionar la carpeta en las aplicaciones desarolladas en Visual C++. Versión de objeto y de función son disponibles, todo con soporte de callback.
Esta utilidad es gratis con código completamente abierto.
To set up you application or library to work with this class:
- Copy SHBrowseFolder.h and SHBrowseFolder.cpp files to your
project directory
- Include SHBrowseFolder.h and SHBrowseFolder.cpp files in your
project
- In stdafx.h or similar file, include shlobj.h file
- In stdafx.h or in your source file, include SHBrowseFolder.h
file
- Call the selector using the syntax:
CSHBrowseFolder(m_hWnd).DoModal(pszPath, pszTitle);
where:
- m_hWnd is parent window handle and may be NULL
- pszPath sends and receives full path selected
- pszTitle will display the title of the tree
DoModal method returns 'pidle' or NULL if selection was canceled.
See SHBrowseForFolder and SHGetPathFromIDList API functions and
BROWSEINFO structure for more information.
See the example dialog methods OnSimple and OnAction to see the
implementation.
Methods:
CSHBrowseFolder::CSHBrowseFolder(HWND hwndOwner, UINT uiFlags =/*
BIF_RETURNONLYFSDIRS*/)
- hwndOwner is a handle, CWnd-derived class may use m_hWnd member
or *this (calls conversion to HWND)
- uiFlags default parameter may be ORed with BIF_STATUSTEXT to
display current selection or any other text
LPITEMIDLIST CSHBrowseFolder::DoModal(char *pszPath, const char
*pszTitle, char *pszDisplayName/* = 0*/)
- pszPath sends and receives the full path of the selection or is
NULL
- pszTitle may point to text or CString using resource ID
- pszDisplayName receives name of the item selected or is NULL
int WINAPI CSHBrowseFolder::BrowseCallbackProc(HWND hwnd, UINT
uMsg, LPARAM lParam, LPARAM lpData)
- callback procedure that handles only initialization to setup
default folder and selection change to update the status
- may be extended to enable or disable OK button when item
selection changes, etc.
There's abother one implemetaion in this project. See files
BrowseFolder.h and BrowseFolder.cpp, and the function:
LPITEMIDLIST BrowseFolder(HWND hwndOwner, char *pszPath, const
char *pszTitle, UINT uiFlags = BIF_RETURNONLYFSDIRS, char
*pszDisplayName = 0);
- arguments description is the same, only include these files
instead of SHBrowseFolder.h and SHBrowseFolder.cpp
- call the function similary like in commented versions of
OnSimple and OnAction methods
Bajar |
Código Abierto Gratis |
©
2004 Jakub Sika. Reservados todos los derechos.
Último cambio: 14.10.2005 15:55