http://la2start.com/ - новÑй ÑеÑÐ²ÐµÑ Lineage 2 High Five Ð´Ð»Ñ Ð½Ð¾Ð²Ð¸Ñков! ÐÐ°Ñ Ð¾Ð´Ð¸Ñе и пÑиÑоединÑйÑеÑÑ! ÐÑÑÑÐ°Ñ Ð¸Ð³Ñа вÑÐµÑ Ð²Ñемен! ÐÑ ÑолÑко ÑÑо оÑкÑÑлиÑÑ! РейÑÑ Ñ 100 (кÑаÑÑ-пвп ÑеÑвеÑ)
ReplyOriginally posted by: jose
OK
i define the bordel of :
#define _WIN32_WINNT 0x0400
in stdafx.h before all
Thanks
ReplyOriginally posted by: Efrat
Hi,
thanks for the usefull code.
i want to ask u if know that ReadDirectoryChangesW with FILE_NOTIFY_CHANGE_FILE_NAME is not giving consistent notification. it sometime misses files.
if u encountered this problem, do u know about a workaround or a another similar method?
efrat
Originally posted by: Ruslan Teluk
Thank!
ReplyOriginally posted by: anil
But it does't show Network Neighborhood?
it shows only if mapped !
but it is far backward than windows explorer
more work is required .
if anyone have solution (in vc++)
pl. send it to me at anil003@hotmail.com
bye
Originally posted by: DMD
Ive been leaking. Ooops. I mean that there are many memory leaks within this app code
ReplyOriginally posted by: 孤独的行路者
看了你的代码,不错,正用得上,多谢!
还想向你请教响应Check消息的操作!
Originally posted by: VMB
I am new to this fuction. The NextEntryOffByte is the number of bytes to be skipped to get to the next record. Does that mean you can (somehow) scroll through and get information on more files, if they exist?
Thanks again
I was racking my brain on why I kept getting a compile error 2605 when attempting to us ReadDirectoryChangesW(). Thank for putting this project here.
Reply
Originally posted by: Alex Huber
void CDirTreeCtrl::Init(CString initdir)
In the InitDriveInfo function I added the following code to the bottom of the function. This will call a function ParsePath (taken from code posted by John McTainsh on this web site)
void CDirTreeCtrl::InitDriveInfo(CString initDir)
//
while( ParsePath( initDir, nLevel, &sDirName ) )
//find the passed in path
//if we have a c: psDirName, append a \\ to make it 'c:\'
This control was great, but I wanted to start in a particular directory and center the scrollbar on that directory. It only required modifying the Init and InitDriveInfo functions to take in a CString, and a path parsing function. This is how I managed to do it. (Note, ... indicates code deleted for brevity)
{
...
//Pass in the initdir to set up a directory
InitDriveInfo(initdir);
}
{
...
HTREEITEM hDriveItem = GetDriveItem((LPCSTR)initDir);
//Expand the Tree to the Inital Path.
//
int nLevel = 0;
CString sDirName;
HTREEITEM hCurrent = hRootItem; //Current item in the list being expanded.
if( initDir.IsEmpty() )
initDir = _T("C:\\"); //if nothing is passed in, default to c:\
{
//Search for the matching tree item and expand
HTREEITEM hItem = GetChildItem( hCurrent );
while( hItem )
{
if( sDirName.CompareNoCase( GetItemText( hItem ) ) == 0 )
{
hCurrent = hItem;
Expand( hCurrent, TVE_EXPAND );
EnsureVisible(hCurrent); //centers control onto the current directory
break;
}
hItem = GetNextSiblingItem( hItem );
}
nLevel++;
}
}
bool CDirTreeCtrl::ParsePath( CString sPath, int nLevel, CString *const psDirName )
{
//find first match
int nStart = 0; //Location in sPath to search from
while( nLevel )
{
nStart = sPath.Find( _T('\\'), nStart );
if( nStart < 0 )
return false;
nLevel--;
nStart++;
}
//We now have the start point to find the end.
int nEnd = sPath.Find( _T('\\'), nStart );
if( nEnd < 0 )
*psDirName = sPath.Mid( nStart );
else
*psDirName = sPath.Mid( nStart, nEnd-nStart);
if ((*psDirName).Right(1) == _T(":"))
*psDirName += "\\";
return true;
}
I hope this helps someone out.
Originally posted by: Alejandro
Hi.
If have been spoting what you did and it was nearly what I was looking for.
I'm triyng to use a treeview control in Visual Basic and see the directory tree.
Can you convert it to a control or you know the way to do what i want to do with the VB treeview control ???
Thank's ... great job !!
Al.