Author: RonRon
Date: Jan 20, 2008 21:51
I am having a problem using the DlgDirList function.
I have created a Dialog Box that contains a List Box which has an ID of
IDC_LIST1.
The code I am using was based on what I saw on MSDN, plus some code from an
Win32 API book.
This is the relevant parts of the code;
#define BUFFER MAX_PATH
TCHAR tchBuffer[BUFFER+1];
BOOL fResult;
HWND hDlgBox = 0;
DWORD dwCurDir = 0;
LPTSTR strCurDir;
strCurDir = chBuffer;
GetCurrentDirectory(dwCurDir,strCurDir);
strCurDir[BUFFER+1] = '\0';
DlgDirList(hDlgBox,strCurDir,IDC_LIST1,0,DDL_DRIVES | DDL_DIRECTORY);
SetFocus(GetDlgItem(hDlgBox,IDC_LIST1));
|