|
Your question isn't really a C/C++/MFC related question, you should try a more suitable message board. However, VPN could work, but as far as i know some games use broadcast packets to find their servers on the lan but broadcast packets aren't submitted through internet via VPN (i might be wrong of course). In this case, you might try somesort of tunneling, like an SSH tunnel or somesuch, maybe that could work. Come to think of it, trying the tunneling might even be a better choice at the first place.
By the way, just so you know, it might be illegal to do what you wish if the makers of the game charge players extra for internet gameplay and you are trying to avoid paying by making a LAN game go thorough the net.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I am highly used to C than C++, but now I'm trying to understand C++ as well. I have fstream object which I used to create a file for output.
What I want is that if there is any file write error, the file that was created should be removed from the disk. What is the name of the method that I should invoke with the fstream object to remove the file from the disk, as it is done in C using remove() to accomplish such a goal? Please help.
|
|
|
|
|
|
I think DeleteFile is Windows specific, so I wouldn't want that one. I will use remove() rather. But does it mean there is no method in C++ to be used for such a goal?
|
|
|
|
|
Dan_K wrote: But does it mean there is no method in C++ to be used for such a goal?
Not that I am aware of, as these functions are beyond the scope of the C++ language. If you include <cstdio> [^] you can then use it in the form std::remove() .
It's time for a new signature.
|
|
|
|
|
as you know, C++ is a super set of C, and you are always free to use C functions wherever in C++ code
|
|
|
|
|
I want to capture ip packet sent by an application, and modify the packet then resent it.
The destination host should receive only the modified packet.
I found a solution that using hooking, but I don't know whether it will work with packet that is sent asynchronously.
A filter driver will work, but I'm not very familiar with that now.
Any other solution?
Thanks.
|
|
|
|
|
|
Hi all,
i m creating property sheet in my application.
i want to set font of all property pages and property sheet so i m using this article to set font of property sheet.
http://support.microsoft.com/kb/142170[^]
here is a problem help button not display in the property sheet.
i want to use help button on property sheet.
so please help me for this.
thanks in advance.
|
|
|
|
|
I have one MFC project which listents on some COM port and fires events when something happens.
Now I want to create a dll for it so that I can reuse it in .NET projects with C#.
First Question : Is it right to make a dll of it, if not then what are other ways?
Second Question : If I go for making dll then how my dll will fire events or send information to C# application, any example ?
I am also looking into this[^]. Am I on right track?
|
|
|
|
|
The answer, as usual, depends. What you propose would be one solution to the problem. However, you may also like to consider the .NET support for Serial.IO[^], which could be a better solution for a C# program.
It's time for a new signature.
|
|
|
|
|
Well Richard and Luc!
This is the restriction, I have to go with that code because our company does not want to re-write the code in .NET because of Time Limitation, so tell me how to access classes or functions of MFC dll inside C#. There are several threads and articles so I am confused how to go ahead.
Thanks,
Rahul Kulshreshtha
|
|
|
|
|
I have not tried this with MFC classes, I have only used P/Invoke on ordinary Win32 functions. I would suggest reading some of the articles here[^].
It's time for a new signature.
|
|
|
|
|
Within a .NET application I would not rely on native code for things that can be handled equally well with managed code. As Richard said, consider the all-managed approach.
|
|
|
|
|
I would suggest to write it as a COM dll. Its easy as starting an ATL COM project and wrapping the functionalities in co-class. COM components are easy to use in C# projects just by adding a reference. then no more dll import codes needed.
|
|
|
|
|
I am sorry if this query is off-topic here; please tell me the correct place for it. I use Visual C++; before that I used Borland C++ 4.51. Programs need a help (a file with extension .HLP); for a long time I used a help-maker program which made .HLP helps in the old style which Microsoft does not support now. If I call a new commercially-written Windows application, and call its help, the help comes in a new format and will not read old-type .HLP helps. So far since the change of help system I have been making my new programs' helps as plain .TXT files or suchlike. Please:-
(1) Where is a program to make helps in the new format?
(2) Where is a program to translate an old-type .HLP into a new-type help file?
|
|
|
|
|
|
Anthony Appleyard wrote: (1) Where is a program to make helps in the new format?
(2) Where is a program to translate an old-type .HLP into a new-type help file?
1) You can use any help authoring tool capable of generating CHM -files (HTML help), see Wikipedia.
2) Performing a quick Google search... there are a couple of tools available, see convert HLP CHM.
It's weekend, yay!
/M
PS: Users don't like reading documentation, don't spend too much time on it.
|
|
|
|
|
Thanks.
If s is a char* -type variable containing the name of a *.chm-type file, please how do I call it as a help file?
With the old help I used a format like:
case _HELP_: WinHelp(wn,PROGNAME".HLP",HELP_CONTENTS,0); goto DEF;
|
|
|
|
|
In my form, I have a DateTimeControl where user can pick the date from the dropdown calendar or can type in the mm, dd, yyyy values from the keyboard. I need to perform few things once user completes editing and tabs out from the DateTimeControl. I tried the belwo options, but none of them are hit when the control is losing focus:
1. ON_CONTROL_RANGE(WM_KILLFOCUS, DLG_CTRLBASE, DLG_CTRLBASE + DLG_MAXITEMS_CTRL, OnFormKillFocus)
and
2. ON_NOTIFY_RANGE(WM_KILLFOCUS, DLG_CTRLBASE, DLG_CTRLBASE + DLG_MAXITEMS_CTRL, OnFormKillFocus)
As, DateTimeControl doesn't have any separate KILLFOCUS notification (I believe), I am trying with WM_KILLFOCUS.
Can anyone help me with suggestions/alternatives,
Thanks in advance,
|
|
|
|
|
How to implement the zoom in/out on Ctrl + mouse wheel scroll functionalities of IE browser in CHtmlView?
Any ideas would be highly appreciable..
Regards
--
"Programming is an art that fights back!"
|
|
|
|
|
CHtmlView exposes all the functions of IWebBrowser2 interfce of WebBrowser activeX control, which it uses to browse the webpages. Its ExecWeb method is meant to control the commands such as SelectAll, Find, Zoom etc of IE.
CHtmlView::ExecWB
IWebBrowser2::ExecWB Method
see OLECMDID_ZOOM member of OLECMDID Enumeration
hope it helps.
|
|
|
|
|
use OLECMDID_OPTICAL_ZOOM. define it as 63 if you get compile error.
CComVariant vZoom((int)dZoomFactor);
m_HTMLCtrl.ExecWB((OLECMDID)OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT_DODEFAULT, &vZoom, NULL);
|
|
|
|
|
Hi,
I am developing serial port communication but i have a problem
while sending and receiving at the same time from the serial port.
how to do the synchronization while sending and receving
data from the serial port.
I have a recevie thread (infinite loop thread )
whenever data is coming from that thread i will update that thread.
When sending from the same port its giving problem.?
|
|
|
|
|
there isn't sufficient information here to offer any real help. Except for this:
When software handshaking is not used (i.e. there is no handshaking at all, or handshaking is handled through hardware lines), then sending and receiving are completely separate operations that do not interfere with each other (except probably at the functional level of your peripheral, which upon receiving a command is likely to send a response).
|
|
|
|