Click here to Skip to main content
15,914,014 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
Russell'22-May-06 5:02
Russell'22-May-06 5:02 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
YaronNir22-May-06 5:26
YaronNir22-May-06 5:26 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
Russell'22-May-06 5:36
Russell'22-May-06 5:36 
QuestionShared Networked Printers Pin
tcss22-May-06 4:32
tcss22-May-06 4:32 
AnswerRe: Shared Networked Printers Pin
ThatsAlok22-May-06 4:53
ThatsAlok22-May-06 4:53 
AnswerRe: Shared Networked Printers Pin
Ganesh_T22-May-06 4:57
Ganesh_T22-May-06 4:57 
AnswerRe: Shared Networked Printers Pin
tcss22-May-06 5:27
tcss22-May-06 5:27 
AnswerRe: Shared Networked Printers Pin
Laxman Auti22-May-06 19:37
Laxman Auti22-May-06 19:37 
tcss wrote:
go away and try this.

Try the Following Code
doEnum(int level, NETRESOURCE *pnr)
{
	DWORD rc;
	HANDLE hEnum;
	CString strTemp;
	DWORD count, bufsize, ui;
	NETRESOURCE buf[200];
	const char *type, *cont;
	rc = WNetOpenEnum( RESOURCE_GLOBALNET, RESOURCETYPE_PRINT, 0, pnr, &hEnum );
	
	if ( rc == ERROR_ACCESS_DENIED )
	{
		return 1;
	}
	while ( 1 )
	{
		count = (DWORD) -1L;
		bufsize = sizeof buf;
		rc = WNetEnumResource( hEnum, &count, buf, &bufsize );
		if ( rc != NO_ERROR )
			break;
		for ( ui = 0; ui < count; ++ ui )
		{
			switch ( buf[ui].dwDisplayType )
			{
				case RESOURCEDISPLAYTYPE_DOMAIN:
					type = "domain"; break;
				case RESOURCEDISPLAYTYPE_GENERIC:
					type = "generic"; break;
				case RESOURCEDISPLAYTYPE_SERVER:
					type = "server"; break;
				case RESOURCEDISPLAYTYPE_SHARE:
					type = "share"; break;
				default:
					type = "unknown"; break;
			}
			cont = ( buf[ui].dwUsage & RESOURCEUSAGE_CONTAINER )? "container": "";
			if(level==2)
			{
				CString networkmachinename;
				networkmachinename=buf[ui].lpRemoteName ;
				networkmachinename.TrimLeft("\\");
				m_machinenames.AddString(networkmachinename);
			}
			if(level==3)
			{
                               m_sharedfolder.AddString(buf[ui].lpRemoteName);
			       return 0;
			}
			if ( buf[ui].dwUsage & RESOURCEUSAGE_CONTAINER)
				doEnum( level + 1, &buf[ui] );
		}
	}
	WNetCloseEnum( hEnum );
	return 1;
}



Knock out 't' from can't,
You can if you think you can
Cool | :cool:
Questionhex url entities to real text conversion [modified] Pin
scoroop22-May-06 3:29
scoroop22-May-06 3:29 
AnswerRe: hex url entities to real text conversion [modified] Pin
toxcct22-May-06 3:33
toxcct22-May-06 3:33 
GeneralRe: hex url entities to real text conversion [modified] Pin
Laxman Auti22-May-06 3:49
Laxman Auti22-May-06 3:49 
AnswerRe: hex url entities to real text conversion [modified] Pin
David Crow22-May-06 4:14
David Crow22-May-06 4:14 
AnswerRe: hex url entities to real text conversion [modified] Pin
ThatsAlok22-May-06 4:32
ThatsAlok22-May-06 4:32 
GeneralRe: hex url entities to real text conversion [modified] Pin
scoroop22-May-06 5:29
scoroop22-May-06 5:29 
QuestionButtons in child dialog do no respons to enter key Pin
YaronNir22-May-06 3:04
YaronNir22-May-06 3:04 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
Laxman Auti22-May-06 3:14
Laxman Auti22-May-06 3:14 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
YaronNir22-May-06 3:19
YaronNir22-May-06 3:19 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
toxcct22-May-06 3:23
toxcct22-May-06 3:23 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
YaronNir22-May-06 3:26
YaronNir22-May-06 3:26 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
toxcct22-May-06 3:28
toxcct22-May-06 3:28 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
YaronNir22-May-06 3:29
YaronNir22-May-06 3:29 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
toxcct22-May-06 3:31
toxcct22-May-06 3:31 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
YaronNir22-May-06 3:33
YaronNir22-May-06 3:33 
GeneralRe: Buttons in child dialog do no respons to enter key Pin
Russell'22-May-06 4:50
Russell'22-May-06 4:50 
AnswerRe: Buttons in child dialog do no respons to enter key Pin
_AnsHUMAN_ 22-May-06 4:17
_AnsHUMAN_ 22-May-06 4:17 

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.