|
i use no threads in this program, but i use keyboard hooks, is it possible that key_events can couse this problems. cause one user told me that if he has this problem and is pressing "ESC" afterwards the problem is solved ?
|
|
|
|
|
Hello,
do you know a method how to slow down the network connection of a computer (LAN and internet)? I know that such tools exist but I haven't found any source code on how it's done...
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
I've developed a SDI application using the SwitchToView method
described in:
http://www.codeproject.com/docview/switchingviews.asp?target=switchtoview
I've also follewed articles infos to create View classes to
supply to SwitchToView method.
My problem is the following:
windows messages are only sent to Default View class.
When I switch to another View, this class doesn't receive
any windows messages.
How can I solve this problem ?
Thanks a lot!
|
|
|
|
|
Hi,
I've created two diaglogs with one dialog(child) in transparent modeless mode. (kinda like a picture overlayed onto the background) However, when i try to set the modeless dialog with SetLayeredWindowAttributes it creates another process(like another application running) is there anyway to get ride of this?
|
|
|
|
|
hi,
I want to make a prg to check whenever an application end to writes data to a
file (.txt), so i can open it afterwards.
I tried the (_access) but it didn't worked...
any suggestion?
Many thanks in advance
Aenaos
|
|
|
|
|
You want to know when another application has ended, right? If you created an instance of this other application using CreateProcess(), then you'll want to use WaitForSingleObject().
|
|
|
|
|
It is an external application. It runs on background continusly...
When it receives data from a third application it writes them to a file,
the only thing I can check is whenever this application will stop writting the data to a specific text file. Nothing else.
Have you any suggestion?
Aenaos
|
|
|
|
|
What application? Are you referring to a program that checks the status of a file?
What "application end?"
Kuphryn
|
|
|
|
|
Sounds like the writer program needs to set an Event and the monitoring program can WaitForSingleObject on that Event.
|
|
|
|
|
Hi, I'm writing a function which will create a copy of a tree. The traversal code for source tree is fine, but there is some problem assigning parent node in the destination tree. Please Help!!
extern const CTreeCtrl* m_pSourceTree;
CTreeCtrl m_DestTree;
HTREEITEM m_hDest;
TreeTraverse(m_pSourceTree->GetRootItem());
TREEITEM CKleenCachePage::TreeTraverse(HTREEITEM hStart)
{
HTREEITEM theItem;
if ( hStart == NULL )
return NULL;
if( m_pSourceTree->GetParentItem(hStart) == NULL)
m_hDest= NodeCopy(hStart,NULL);
if ((theItem = m_DestTree.GetChildItem(hStart)) != NULL)
{
m_hDest = NodeCopy(theItem,m_hDest);
theItem = TreeTraverse(theItem);
if (theItem != NULL)
return theItem;
}
if ((theItem = m_DestTree.GetNextSiblingItem(hStart)) != NULL)
{
m_hDest = NodeCopy(theItem,m_hDest);
theItem = TreeTraverse(theItem);
if (theItem != NULL)
return theItem;
}
return theItem;
}
<BR>
HTREEITEM CKleenCachePage::NodeCopy(HTREEITEM hSource, HTREEITEM hDest)
{
int nImage = 0, nSelectedImage = 0;
CString csText = m_pSourceTree->GetItemText(hSource);
m_pSourceTree->GetItemImage(hSource,nImage, nSelectedImage);
return m_DestTree.InsertItem(csText,nImage,nSelectedImage,hDest,TVI_LAST);
}
|
|
|
|
|
I want to build executable with shared MFC dlls to reduce the final size.
But VS7 link my exe file with shared mfc70.dll which is not available on default win98.
So I think I need to link my exe against mfc42.dll which is available on most systems.
What I should gonna do?
|
|
|
|
|
The usual thing to do is distribute the DLL along with your program. It's simple to do if you're packing everything into an intallation executable.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you. But in my situation the final size is critical. The aplication is just a some free add-on to some other application. So all should be kept in one executable and size should be no more then 100kB.
|
|
|
|
|
Both mfc42.dll and mfc70.dll are redistributable files there is no garantee that either one already exist on the users machine. Therefore, even if you link with mfc42.dll you still need to include it in the install. If you do not want to include the MFC DLL in your installs then you should not be using MFC.
Trust in the code Luke. Yea right!
|
|
|
|
|
I want to get the Sql Server Name in a local network, how can i to do?
Thanks!
|
|
|
|
|
Variant SQLServer;
Variant ServerList;
int i,nServers;
String sRetValue;
try
{
SQLServer = CreateOleObject("SQLDMO.Application");
}
catch(...)
{
ShowMessage("no SQL Server or SQL Server client!");
return;
}
ServerList= SQLServer.OleFunction("ListAvailableSQLServers");
nServers=ServerList.OlePropertyGet("Count");
ComboBox1->Items->Clear();
for(i=1;i<=nServers;i++)
ComboBox1->Items->Add(ServerList.OleFunction("Item",i));
SQLServer=Unassigned;
ServerList=Unassigned;
///////////////////////////////////
other:
int i;
LPSERVER_INFO_101 pBuf = NULL;
LPSERVER_INFO_101 pTmpBuf;
DWORD dwLevel = 101;
DWORD dwPrefMaxLen = MAX_PREFERRED_LENGTH;
DWORD dwEntriesRead = 0;
DWORD dwTotalEntries = 0;
DWORD dwTotalCount = 0;
DWORD dwServerType = SV_TYPE_SQLSERVER; // SQL server
DWORD dwResumeHandle = 0;
NET_API_STATUS nStatus;
wchar_t *pszServerName = NULL;
try
{
nStatus = NetServerEnum(pszServerName,
dwLevel,
(LPBYTE *) &pBuf,
dwPrefMaxLen,
&dwEntriesRead,
&dwTotalEntries,
dwServerType,
NULL,
&dwResumeHandle);
if ((nStatus == NERR_Success) || (nStatus == ERROR_MORE_DATA))
{
if ((pTmpBuf = pBuf) != NULL)
{
for (i = 0; i < dwEntriesRead; i++)
{
assert(pTmpBuf != NULL);
if (pTmpBuf == NULL)
{
return;
}
SList->Add((AnsiString)pTmpBuf->sv101_name);
pTmpBuf++;
dwTotalCount++;
}
}
}
if (pBuf != NULL)
NetApiBufferFree(pBuf);
}
catch(...)
{}
|
|
|
|
|
Thank you for your reply, but i have another question: how can i get the Sql Server Name that run on the server?
|
|
|
|
|
Do you mean the name of the Windows NT server that SQL Server is running on? How about GetComputerName[Ex]?
|
|
|
|
|
I mean I want to let my computer search SQL Server's computer name and SQL Server name and list them, but i don't hnow how to do it.
|
|
|
|
|
Try the sp_server_info stored procedure.
|
|
|
|
|
|
HI,my way is get sql server name!my answer is provider two way! the first way must install sql server client,the other way don't!
;P
|
|
|
|
|
What's the standard mapping mode for the device context of
a MFC SDI application? MM_TEXT ?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I've just got the special upgrade from version 2002 to version 2003.
1.) Is that possible to install the 2003 over 2002's directory, so that
I will not have two Visual Studio.Net? When I installed it, it asked me
where do I want to install, I installed it in a new directory. So I ended
up with VS.Net 2002 and 2003 coexist. If I install the 2003 in the same
directory where 2002 is, does that mean it will overwrite the 2002, so
it will end up just 2003? (I don't need 2002 anymore) Which one do you
recommand? How did you do it?
2.) Once I installed the upgrade, I found that the new feature in VC++
allows you to hide and show code(the + and - sign) very annoying. Is
there a way to disable it?
|
|
|
|
|
I recommend installing Visual Studio .NET 2003 in its default directory. That will allow you to have multiple versions of developer studio. Now, if you wanted to use the 2003 version only, then I highly recommend that you uninstall the older version before installing 2003.
Kuphryn
|
|
|
|