Click here to Skip to main content
15,915,019 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shall I release a Dll? Pin
Maer72717-Oct-01 2:02
Maer72717-Oct-01 2:02 
QuestionWhich type of file is : .ocx ? Pin
16-Oct-01 22:59
suss16-Oct-01 22:59 
AnswerRe: Which type of file is : .ocx ? Pin
Jon Hulatt17-Oct-01 1:10
Jon Hulatt17-Oct-01 1:10 
QuestionHow to get global caret position in screen? Pin
tfElep16-Oct-01 21:49
tfElep16-Oct-01 21:49 
AnswerRe: How to get global caret position in screen? Pin
Tomasz Sowinski17-Oct-01 0:40
Tomasz Sowinski17-Oct-01 0:40 
GeneralShared network resources Pin
Daniel Visan16-Oct-01 21:20
Daniel Visan16-Oct-01 21:20 
GeneralRe: Shared network resources Pin
Andres Manggini17-Oct-01 5:46
Andres Manggini17-Oct-01 5:46 
GeneralRe: Shared network resources Pin
Andres Manggini17-Oct-01 5:54
Andres Manggini17-Oct-01 5:54 
this one could be helpful too:

BOOL CNetScanDlg::AddItem(NETRESOURCE NetRes)
{
// CSADDR_INFO AddrInfo[100];
// DWORD dwSize = sizeof(CSADDR_INFO)*100;
// HOSTENT hostent;

CString strTemp;
switch( NetRes.dwDisplayType )
{
case RESOURCEDISPLAYTYPE_ROOT:
case RESOURCEDISPLAYTYPE_NETWORK:
{
m_htiNetwork = m_NetTree.InsertItem( NetRes.lpRemoteName, 1, 1, TVI_ROOT );
} break;
case RESOURCEDISPLAYTYPE_DOMAIN:
{
m_htiDomain = m_NetTree.InsertItem( NetRes.lpRemoteName, 0, 0, m_htiNetwork );
} break;
case RESOURCEDISPLAYTYPE_SERVER:
{
m_htiServer = m_NetTree.InsertItem( NetRes.lpRemoteName, 3, 3, m_htiDomain );
//int iGetResult =
/*
hostent = gethostbyname(NetRes.lpRemoteName);

if( iGetResult == ERROR_INSUFFICIENT_BUFFER )
m_NetTree.InsertItem("Error!", 4, 4, m_htiServer);
*/
//Incremento el numero de maquinas y actualizo la pantalla
m_nMachines++;
strTemp.Format("%d", m_nMachines);
SetDlgItemText(IDC_STATIC_MAQUINAS, strTemp);
//
} break;

case RESOURCEDISPLAYTYPE_GENERIC:
case RESOURCEDISPLAYTYPE_SHARE:
{
//Intento listar los archivos
CFileFind FileFind;
CString strPath(NetRes.lpRemoteName);
strPath += "\\*.*";
BOOL bResult = FileFind.FindFile(strPath, 0);
//

if( bResult ) //Si pude acceder a los archivos
{
m_NetTree.InsertItem( NetRes.lpRemoteName, 4, 4, m_htiServer );
//Incremento el nro de dir. habilitados y actualizo la pantalla
m_nDirHabilitados++;
strTemp.Format("%d", m_nDirHabilitados);
SetDlgItemText( IDC_STATIC_DIR_HABILITADOS, strTemp );
}
else //No pude acceder a ese SharePoint
{
m_NetTree.InsertItem( NetRes.lpRemoteName, 2, 2, m_htiServer );

//Incremento el nro de dir. Deshabilitados y actualizo la pantalla
m_nDirDeshabilitados++;
strTemp.Format("%d", m_nDirDeshabilitados);
SetDlgItemText( IDC_STATIC_DIR_DESHABILITADOS, strTemp );
//
}

//Incremento el numero de directorios y actualizo la pantalla
m_nDirectorios++;
strTemp.Format("%d", m_nDirectorios);
SetDlgItemText(IDC_STATIC_DIRECTORIOS, strTemp);
//
} break;
default: return FALSE;
}
m_NetTree.Invalidate();
return TRUE;
}



Anybody knows how to paste a code snippet into the forum with the original formatting (like tabs) ?



Andres Manggini.
Buenos Aires - Argentina.
GeneralSharing a data segment in a DLL Pin
Mr.Freeze16-Oct-01 18:51
Mr.Freeze16-Oct-01 18:51 
GeneralRe: Sharing a data segment in a DLL Pin
Michael Dunn16-Oct-01 19:47
sitebuilderMichael Dunn16-Oct-01 19:47 
GeneralRe: Sharing a data segment in a DLL Pin
Mr.Freeze16-Oct-01 20:29
Mr.Freeze16-Oct-01 20:29 
GeneralDetecting List View Header Click in Dialog Pin
16-Oct-01 16:54
suss16-Oct-01 16:54 
GeneralRe: Detecting List View Header Click in Dialog Pin
Michael Dunn16-Oct-01 17:25
sitebuilderMichael Dunn16-Oct-01 17:25 
GeneralCreating Property ... Pin
Hadi Rezaee16-Oct-01 12:35
Hadi Rezaee16-Oct-01 12:35 
GeneralDLL in ATL . small question ! Pin
mimi16-Oct-01 11:48
mimi16-Oct-01 11:48 
GeneralRe: DLL in ATL . small question ! Pin
Christian Graus17-Oct-01 11:22
protectorChristian Graus17-Oct-01 11:22 
GeneralCStrings Pin
Chris Klecker16-Oct-01 10:25
Chris Klecker16-Oct-01 10:25 
GeneralRe: CStrings Pin
Ravi Bhavnani16-Oct-01 10:30
professionalRavi Bhavnani16-Oct-01 10:30 
GeneralRe: CStrings Pin
Jamie Nordmeyer16-Oct-01 11:15
Jamie Nordmeyer16-Oct-01 11:15 
GeneralRe: CStrings Pin
Nish Nishant16-Oct-01 22:08
sitebuilderNish Nishant16-Oct-01 22:08 
GeneralRe: CStrings Pin
#realJSOP17-Oct-01 0:26
professional#realJSOP17-Oct-01 0:26 
GeneralMaking things pretty by returning BSTR's (ATLCOM) Pin
Tim Rymer16-Oct-01 10:02
Tim Rymer16-Oct-01 10:02 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Carlos Antollini16-Oct-01 10:27
Carlos Antollini16-Oct-01 10:27 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Tim Rymer16-Oct-01 10:48
Tim Rymer16-Oct-01 10:48 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Carlos Antollini16-Oct-01 10:59
Carlos Antollini16-Oct-01 10:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.