comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
January 2008
motuwethfrsasuw
 123456 1
78910111213 2
14151617181920 3
21222324252627 4
28293031    5
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  using DlgDirList         


Author: Ron
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));
Show full article (0.89Kb)
10 Comments