|
This is a telemetry application where data arrives in a continuous stream. My application breaks that data out into named parameters and sends it to a display device. It generates at least two packets per millisecond and often ten or more.
As a result I will check to see if I can find any operations performed by the base class. When there are none time is saved by not making the call.
I do worry that they may be things done by that call that I do not have visibility into, hence the question.
Thank you for your time.
|
|
|
|
|
So your real issue is how to process the data in the fastest way possible. When this is the issue it is usually best to avoid MFC classes and use the straight Win32 functions.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Good point. I started a new thread to ask that question.
Thanks for your time
|
|
|
|
|
Windows XP and 7, Visual Studio 2008, MFC, C++
While working with some checkboxes I made an error and created the event handler in an incorrect class. I think I have recovered from that. But maybe not completely.
Now after creating a checkbox, the right click and Add Variable option is grayed out. I have tried deleting the following files: .ncb and .suo and .user and .aps, and deleted directory Debug. After a Clean and Rebuild the problem remains.
Does anyone have any suggestions as to how to resolve this problem?
Thanks for your time
|
|
|
|
|
There is no point in randomly deleting files unless you understand their purpose. It may be that you have left some unconnected data that is confusing the class wizard, which holds its information in the .clw file. However, make sure you keep a backup copy of this file before deleting it.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Those were not random deletions. They were named in anaother forum. I have collected a list of files that have become corrupt and caused problems.
In the meantime I think I have figured out how to add control variable manually. The jury is still deliberating, but so far it appears to work.
Thanks for your time
|
|
|
|
|
Visual Studio 2008, MFC, C++
Is there a determine if, as a program starts, it is already running one or more times. Not has run, but is currently already running?
Thanks for your time
|
|
|
|
|
There's a really good example here[^].
|
|
|
|
|
Yes, that is a good article. I just wanted to know how many copies have already been started so the code could avoid putting all the opwninf dialogs on top of each other. I will elect to not add that complexity and let the user deal with it.
Thanks for taking the time to reply.
Thanks for your time
|
|
|
|
|
If you want to be able to count instance hits, have a look at the shared memory option here.[^]
This article also shows some other techniques which I think fix some of the problems described in Joe Newcomer's article first referenced above. I have used the shared memory technique to inhibit multiple instances of a program as well as manage some common data in a program where I allow multiple instances.
[I have a lot of respect for the technical output of both of these authors.]
--
Harvey
|
|
|
|
|
Visual Studio 2008, Windows 7
I create the basic MFP application with Single or Multiple documents, then immediately compile and run it. Using the File -> Open option I can navigate to and open a file.
However, when looking through the code I do not recognize any variable that might be the handle to a file. How do I acces that file I just opened?
Thanks for your time
|
|
|
|
|
It's a while since I used MFC but I think the actual handle is held internally by the CDocument object. When you open the file the framework should call your OpenFile() method (I think that's its name) and you then load the data from the file using the CArchive object. The skeleton code should be there in your document class.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
A search for OpenFile returned nothing. I looked around for CDocument and CArchive but did not recognize anything that looked like code to open a file.
Thanks for your time
|
|
|
|
|
I don't know where you were looking, but MSDN details CDocument::OnOpenDocument [^] and CArchive::Read [^] along with all the various other member functions of each class.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Override OnOpenDocument, in the CDocument class. That function will be called with the selected file path. You would normally open and read the file there.
This answer was courtesy MSDN forums.
Thanks for your time
|
|
|
|
|
I want to use macro in .dsp file for load different file to workspace,just as below:
123 is a sub-folder of 04 project folder and there is a 04.rc and resource.h
!IF "$(CFG)" == "04 - Win32 Release"
RCF=..\\123\\04.rc
RCH=..\\123\\Resource.h
!ELSEIF "$(CFG)" == "04 - Win32 Debug"
RCF=..\\123\\04.rc
RCH=..\\123\\Resource.h
!ENDIF
# Begin Target
...
# Begin Source File
SOURCE=RCF
# End Source File
Begin Source File
SOURCE=RCH
# End Source File
# End Target
Open workspace by VC6 IDE, RC is not loaded and RCF and RCF are display as a file name in workspace but empty,why?how should I do for doing this work well。
Change macro definition as below,result is same
RCF=.\123\04.rc
RCH=.\123\Resource.h
|
|
|
|
|
The results of both parts of your !IF expression are the same. I have not used VC6 for many years, but the later versions need some other function to copy the source file to the project directory. Take a look at how the other files are handled.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I called
AccessibleObjectFromWindow(hPDFDoc, OBJID_NATIVEOM, IID_IDispatch, (void**)&pDisp );
to get an interface to access PDF files. but in xp it returns an error E_ACCESSDENIED. when in win7 it works fun. I guess that I didn't have enough authority.
I tried some setting on my computer, but all failed, I really have no more idea of this.
Any tip would be great helpful.
|
|
|
|
|
Visual Studio C++ provides facility for using ActiveX control in VC6.0 as well as in VC2010. I tried NTGraph3D activeX Control in VC6.0. It is working perfectly.
I tried the same in VC 2010. So for Visual Studio 2010, NTGraph3D ActiveX Control is not working.
So can anyone help me to solve this problem. Is there any change in properties ?
|
|
|
|
|
hello everyone
we are hacker union Game source code group
We can help you get
someone or company file.photo.Record.Game source
code.
Have any questions about computer aspect need to
please contact us
plenty of Game source code. to sell or get to
designated game code
Yahoo Messenger:hacker240union
mail:hacker240union@yahoo.com.cn
|
|
|
|
|
Can anybody help me in copying AAComBSTR to BYTE. Is there any API available which does this copy.
Your help is appreciated.
|
|
|
|
|
|
hello everyone
we are hacker union Game source code group
We can help you get
someone or company file.photo.Record.Game source
code.
Have any questions about computer aspect need to
please contact us
plenty of Game source code. to sell or get to
designated game code
Yahoo Messenger:hacker240union
mail:hacker240union@yahoo.com.cn
|
|
|
|
|
Greetings,
I just recently started some experiments with C++. I'm an experienced programmer, but not with C++, but, just for fun, I decided to implement this example C++ Delegate here on Code Project.
This example keeps the methods hooked into the delegate inside structs. In the example given these are: struct TShapes, struct TDerivedShapes and struct TThings. These are then initialized in this fashion: event += new MyEvent::T<tshapes>(&shapes, &TShapes::Square);
My question is this: is it necessary to store the methods to be hooked into these events into a struct? I assume this is done because the struct makes the address available to be used in the delegate. If the answer to this question is no, then how do you hook into the even just through standard methods within a normal C++ program? Please forgive the stupidity of my questions.
Ed.
|
|
|
|
|
Take a look at function pointers[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|