Click here to Skip to main content
16,006,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Fail to initialise a CView derived view within a Splitter Window Pin
Andrew Quinn AUS8-Jun-04 0:26
Andrew Quinn AUS8-Jun-04 0:26 
GeneralRe: Fail to initialise a CView derived view within a Splitter Window Pin
Seve Ho8-Jun-04 18:08
Seve Ho8-Jun-04 18:08 
Questionhow to add acess record in thread? Pin
Lido Paul7-Jun-04 21:33
Lido Paul7-Jun-04 21:33 
AnswerRe: how to add acess record in thread? Pin
Hesham Amin7-Jun-04 22:01
Hesham Amin7-Jun-04 22:01 
GeneralRe: how to add acess record in thread? Pin
Lido Paul7-Jun-04 22:47
Lido Paul7-Jun-04 22:47 
GeneralRe: how to add acess record in thread? Pin
Lido Paul7-Jun-04 22:48
Lido Paul7-Jun-04 22:48 
QuestionHow to get the correct data type of table struct? Pin
utiao7-Jun-04 20:47
utiao7-Jun-04 20:47 
QuestionHow can I get local computer names on Windows 98? Pin
windsock7-Jun-04 20:09
windsock7-Jun-04 20:09 
Hi!
in the a function of a dialog i've got below code:
It's a part of seeking local computer names, when I click a button.
If i click the button, a dialog box is created and the new one shows up.
But no one can be showed in a list control view of the dialog box on Windows 98.
It hasn't nothing in the list control...
but It can be shown the list on Windows 2000 or XP.

Is the problem here?
Should i put everything in a codes?
Thanks!



noname_function ()
{
// WNetOpenEnum parameters
DWORD dwScope = RESOURCE_CONTEXT;
NETRESOURCE *NetResource = NULL;
HANDLE hEnum;

// WNetOpenEnum for Windows 98
unsigned long strWNetMSG = WNetOpenEnum(dwScope, RESOURCETYPE_ANY, NULL, NULL, &hEnum);

// WSADATA wsaData;
WSAStartup(MAKEWORD(1, 1),&wsaData);
//
if (hEnum)
{
// paremeters for WNetEnumResource
DWORD dwCount = 0xFFFFFFFF;
DWORD dwBufferSize = 16384;
LPVOID lpBuffer = new char[16384];
// continues a network-resource enumeration
unsigned long strWNetResourceMSG = WNetEnumResource(hEnum, &dwCount, lpBuffer, dwBufferSize);

NetResource = (NETRESOURCE*)lpBuffer;
// Earase items in List control
if(m_ListSearchPc.GetItemCount() != 0)
m_ListSearchPc.DeleteAllItems();
m_dwCountTotalPc = 0;
for(unsigned int i = 0; i < dwCount; i++, NetResource++)
{
if (NetResource->dwUsage == RESOURCEUSAGE_CONTAINER && NetResource->dwType == RESOURCETYPE_ANY)
{
if (NetResource->lpRemoteName)
{
CString strFullName = NetResource->lpRemoteName;
// delete \\
if (strFullName.Left(2).Compare("\\\\") == 0)
strFullName = strFullName.Right(strFullName.GetLength() - 2);
// Insert a Local network pc name to List control
if(strFullName.IsEmpty())
continue;

// 1. number
CString pcNo;
pcNo.Format("%d", m_dwCountTotalPc + 1);
m_ListSearchPc.InsertItem(m_dwCountTotalPc, pcNo);

// 2. PC name
strFullName.MakeLower();
m_ListSearchPc.SetItemText(m_dwCountTotalPc, 1, (LPCTSTR)strFullName);
m_dwCountTotalPc++;

////////////////// -->> Nothing in the ListCtl
}
}
}
delete lpBuffer;
WNetCloseEnum(hEnum);
}
WSACleanup();
}
Questionhow to use RegisterHotKey? Pin
Abhi Lahare7-Jun-04 19:44
Abhi Lahare7-Jun-04 19:44 
AnswerRe: how to use RegisterHotKey? Pin
Mike Dimmick8-Jun-04 1:33
Mike Dimmick8-Jun-04 1:33 
QuestionHow to append software register mechanism? Pin
toowit7-Jun-04 19:38
toowit7-Jun-04 19:38 
AnswerRe: How to append software register mechanism? Pin
Vadim Tabakman7-Jun-04 19:42
Vadim Tabakman7-Jun-04 19:42 
GeneralRe: How to append software register mechanism? Pin
toowit7-Jun-04 20:04
toowit7-Jun-04 20:04 
GeneralRe: How to append software register mechanism? Pin
Vadim Tabakman7-Jun-04 20:19
Vadim Tabakman7-Jun-04 20:19 
GeneralRe: How to append software register mechanism? Pin
toowit7-Jun-04 20:39
toowit7-Jun-04 20:39 
AnswerRe: How to append software register mechanism? Pin
Henry miller8-Jun-04 3:38
Henry miller8-Jun-04 3:38 
Questionhow could I disable Escape the dialog Pin
lonely_life7-Jun-04 19:19
lonely_life7-Jun-04 19:19 
AnswerRe: how could I disable Escape the dialog Pin
Johan Rosengren7-Jun-04 19:27
Johan Rosengren7-Jun-04 19:27 
GeneralRe: how could I disable Escape the dialog Pin
lonely_life7-Jun-04 20:33
lonely_life7-Jun-04 20:33 
GeneralRe: how could I disable Escape the dialog Pin
Johan Rosengren7-Jun-04 20:51
Johan Rosengren7-Jun-04 20:51 
GeneralRe: how could I disable Escape the dialog Pin
lonely_life7-Jun-04 21:16
lonely_life7-Jun-04 21:16 
GeneralProblm in CoInitializeEx( .. , .. ) Pin
Zeeshan Bilal7-Jun-04 19:07
Zeeshan Bilal7-Jun-04 19:07 
GeneralRe: Problm in CoInitializeEx( .. , .. ) Pin
valikac7-Jun-04 20:07
valikac7-Jun-04 20:07 
GeneralCHtmlView - getting the html contents off a webpage to process Pin
testtests7-Jun-04 18:51
testtests7-Jun-04 18:51 
GeneralRe: CHtmlView - getting the html contents off a webpage to process Pin
Andrew Quinn AUS7-Jun-04 22:04
Andrew Quinn AUS7-Jun-04 22:04 

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.