|
utkumanyaksalak wrote:
How can i check the internet connection
use InternetGetConnectedState
utkumanyaksalak wrote:
how can i get recieved bytes from int. connection??
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Yes thanks i understand first one...
"how can i get recieved bytes from int. connection?? "
I mean, How can i show internet traffic monitor on my application?
|
|
|
|
|
utkumanyaksalak wrote:
I mean, How can i show internet traffic monitor on my application?
use api getiftable and search for IPHELPER in you local copy of MSDN.
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
can you write a small example?
|
|
|
|
|
|
I remember that there is a function named is
IsConnected(...);??
To try it.
I am a chinese,english is poor.
|
|
|
|
|
new api: IsNetworkAlive
Rejoice,I Desire!
|
|
|
|
|
hello i am developing an application that uses winexec() command. what i want is when a button is clicked then the contents in the edit box parameter should be passed as an argument to the winexec() command and open that particular file in notepad.
the code given below just opens the notepad application what i want is it should open the notepad with the file name that is stored in the pointer ptr_filename can anyone please help me how to go about it??
void CmscprojDlg::OnBnClickedEdit()
{
// TODO: Add your control notification handler code here
UpdateData(true);
char *ptr_filename = new char[1024];
ptr_filename = m_strFilename.GetBuffer(sizeof(ptr_filename));
WinExec("notepad.exe", SW_SHOW);
}
|
|
|
|
|
You can USe this Format
CString strToExecute;
strToExecute.Format("notepad.exe %s",<code>m_strFilename</code>);
WinExec(strToExecute, SW_SHOW);
or you can use ShellExecute
::ShellExecute(NULL,<code>"notepad.exe"</code>,<code>m_strFileName</code>,NULL,NULL,SW_SHOWNORMAL);
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Maybe a stupid question but: I'm on Win2k with Visual C++ 6.0 and it seems nearly impossible to get any mousewheel code to work.....
I had to specifically #define WM_MOUSEWHEEL 0x020 to avoid "undeclared identifier" messages. Sadly my OnMouseWheel method is not recognized anyway.
I encountered several working MFC examples. Unfortunately I don't use MFC so my question is:
Is it possible to get this working without MFC? Do I need a special include for this?
thanx in advance
|
|
|
|
|
From WinUser.h
#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
#define WM_MOUSEWHEEL 0x020A
#endif Notice the #if ? Make sure _WIN32_WINNT or _WIN32_WINDOWS is defined properly.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
thanks for respons. I'm beginner to Winprog and VC++
I tried including <winuser.h> , but no improvement. Still the same undeclared WM_MOUSEWHEEL identifier.... My WM_LBUTTONDOWN is accepted though, both with and without <winuser.h>. WM_LBUTTONDOWN must be defined elsewhere also I concluded.
Next I outcommented WIN32_LEAN_AND_MEAN in Stdafx.h hoping this would make a difference. nope.
Other includes (a.o.): windows.h en windowsx.h
|
|
|
|
|
|
Joel Lucsy: I clicked on the link but the (forum) page states that
the page can't be found.....
|
|
|
|
|
|
Thanks. It seems I made a mistake
Moreover I assumed that VC++ would "know" what platform I'm working on: this seems to be not the case.
I #defined _WIN32_WINNT as 0x0500 abd now everything is working fine..
|
|
|
|
|
copy the file user.h who at the directory:
...VC98\include\
just under the VC++ install directory.
Try it, good luck !
|
|
|
|
|
Is there anyway to reverse find index?
POSITION pos=0;
int index=5;
pos = LinkList.FindIndex(index)
pClass = (CClass*) LinkList.GetNext(pos)
pClass = (CClass*) LinkList.GetNext(pos)
Is there a function to get the index value?
Basically a revsere of
pos = LinkList.FindIndex(index)
Give the pos value and find the index value
|
|
|
|
|
You can always write one like this:
int FindObjectIndex(CObList *pList, CObject *pItem)
{
CObject *pListItem;
int iIndex = 0;
POSITION pPos = pList->GetHeadPosition();
while (pPos)
{
pListItem = pList->GetNext(pPos);
if (pListItem == pItem)
return iIndex;
iIndex++;
}
return -1;
}
onwards and upwards...
|
|
|
|
|
Doh I was afraid of that, have to go through the whole link list just to find the index value. Guess I will cheat by setting the new index value myself.
|
|
|
|
|
The FindIndex function basically does the same thing, iterating through the list n times and returning the element.
onwards and upwards...
|
|
|
|
|
Hi, I was wondering if I am given a DLL with a set of header files to use (of which i don't have the source to). Is there a way to create a new DLL (with a new set of header files) that uses the functions of the old DLL without giving access to the old header files? Is this possible? In short, I want to create a new wrapper DLL with a new set of header files without sharing information of the old headers. I've been looking all over the web and couldn't find anything. Thanks!
RCJ
|
|
|
|
|
Hi There
I don't know if I have understand your question correct, but my answer is, to what I have undertand :
I would create a new header file, called DllInterface.h which will declare all the functions/methods that you want to export. Afterwards, create a new class called CreatorDll, which will implement all the original methods. In this class, in your cpp file, only include all the header files you want to hide. In the corresponding header file include the Interface file. If you have some classes which you want to offer users of the dll, make creator functions in your creator class, which returns with instances of the corresponding classes.
Then the places where you want to use the dll, only include the headerfile for the creator.
This is the way I do, when I want to export some methods of class, which perhaps uses a lot of classes.
I hope this gives you an idea, or maybe can help you in the wanted direction.
Best regards,
Søren Madsen
Denmark
|
|
|
|
|
I think it can been make:
1.We create a dll project whitch the new header file.
2.at our dll project,we relocate the function to the old function in the old dll,use Loadlibrary("old.dll"); and GetProcAddress(...) can do it.
3.builder our dll project,so we get a new dll.
|
|
|
|
|
Greetings,
I have a CFormView child with an embedded CDialog resource in it. When focus is anywhere outside of this embedded resource I can get input messages in the CFormView::PreTranslateMessage no problem but as soon as focus goes into the embedded dialog the only place I can get the messages is in the CEmbeddedDialog::PreTranslateMessage method.
I have even tried to locate the CFormView from within the CEmbeddedDialog::PreTranslateMessage method and call SendMessage on it from the data in pMsg but it still doesn't get into the CFormView.
Any ideas? Thanks!
|
|
|
|