|
hey all,
I am using VC++6.0. iam in need of plotting graph using MFC.
i have to plot the data values received from USB.
I have to plot data vs time as and when the USB receives the data.
What MFc class would best suit my need.
As this is my first attempt in MFC, can you please help me with some code that shows the implementation of the above.
Thanks in advance.
|
|
|
|
|
thathvamsi wrote: plotting graph
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
How do I do this as given in the article.
"Before the ActiveX control can be used in your application, it must be registered as a COM Component in the system registry. This is a self registering control. This means that to register the control in the system registry you only need to have an application load the control and call the control’s exported function DllRegisterServer. You can use the REGSVR32 utility or have your setup program do this."
Can you help me?
|
|
|
|
|
thathvamsi wrote: do this as given in the article.
To register the OCX Control go to start>Run . Type regsvr32 in the edit box and put the path of the ocx where you have stored after that (in the edit box).
Press OK . You will get a confirmation that registration succeeded.
In the Visual Studio go to tools> Active X Test container. Select this and in the list that is populated with various activex controls registered on your machine you can find and test this one in the container. I hope you will be able to do this .
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Type regsvr32 in the edit box and put the path of the ocx where you have stored after that (in the edit box).?
Am I suppose to store the ocx first? From where do I store it?
|
|
|
|
|
You need to download the ocx and save it on your machine somewhere. Then you will be able to register the ocx
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi there,
I tried doing the same.
ButWhen I click "OK" after slecting the path for the ocx, I get the error message as:
No DLL name specfied. Usage:...
I dont understand this. What dll name ?
|
|
|
|
|
At the top of the article click on download control binaries. This will pop up a dialog and ask for a path for where to save the .ocx file.
Now go to Start > Run type the path of the ocx and press ok. Now follow as my previous post
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks very much. I could add it.
Will try working on it.
But a quick question....
i need to plot large number of points say,250,000 points in one attempt.
Will this control handle it? Or will it be slow after say 50,000 point or so...?
|
|
|
|
|
thathvamsi wrote: plotting graph
I haven't worked with the control much. But I hope that you will be able to use this control upto quite an extent.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks for the prompt response.
I will try it and let you know how I go.
|
|
|
|
|
I'm working on adding the hot-switching of languages to my app, though I have ran into a few problems. I have created sattelite dlls for each of the translated resources. I create a language selection menu at run time with the help of this[^]article. I am able to update the menu and progress bar but unable to update the main dialog. The dialog is contained within the language dlls and contains many controls (with text). So, after calling LoadLibrary how do you update the main window? BTW this is a non-MFC app.
|
|
|
|
|
Well, unless there is an easier method, I stored all the controls text into the string table and created a function to reset the text for each control
|
|
|
|
|
I have a MDI application. From CDoc, how can I get a handle on the
active document. I can do this for a SDI application:
<br />
CFrameWnd *pWndMain = (CFrameWnd *)AfxGetMainWnd();<br />
ASSERT(pWndMain != NULL);<br />
<br />
CDocument *pDoc = pWndMain->GetActiveDocument();<br />
ASSERT(pDoc);<br />
<br />
POSITION pos = pDoc->GetFirstViewPosition();<br />
<br />
CView *pView = pDoc->GetNextView(pos)<br />
How can I rewrite this code for an MDI? Please any response
any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
MDIGetActive() instead of GetActiveDocument should do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Any chance you can show me more code? I cant type:
CDocument *pDoc = pWndMain->MDIGetActive();
because MDIGetActive is not a member of CFrameWnd.
How would you rewrite that portion of code that I
posted earlier for an MDI?
Sincerely,
Danielle Brina
|
|
|
|
|
|
DanYELL wrote: From CDoc, how can I get a handle on the
active document.
What's wrong with calling AfxGetMainWnd() , which is a global function, followed by GetActiveDocument() ?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello. - Does anyone out there know of a GPRS API for C++.
Thankyou
|
|
|
|
|
flippydeflippydebop wrote: Does anyone out there know of a GPRS API for C++.
See here.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Ahh, nice 1.. thanks Dave... I will have a look into that now
|
|
|
|
|
question: Can i use the eMbedded Visual C++ 4.0 Sample with Visual C++ Studio 6?
|
|
|
|
|
I do not know. Why not try it and see?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have created my own Excel reader which opens and reads the compound files using the ISorage and IStream classes. Everything works perfectly, but I would like to make it a little more user friendly. Here is the code used to open the file:
WCHAR wcFilename[1024];
MultiByteToWideChar(CP_ACP, 0, filename, strlen(filename)+1, wcFilename, 1024);
IStorage *pStorage = NULL;
IStream *pStream = NULL;
HRESULT hr;
hr = ::StgOpenStorage(wcFilename, NULL, STGM_READ|STGM_SHARE_EXCLUSIVE , NULL, 0, &pStorage);
if(FAILED(hr)) {
return 0;
}
When you try to open an excel file with MS Excel, and the file is already in use, it opens it as read only. I want to add the same functionality to my code, but so far I have been unable to. StgOpenStorage always returns with the 'File unavailable' (locked) error. Does anybody know of a method of doing this?
|
|
|
|
|
waldermort wrote: When you try to open an excel file with MS Excel, and the file is already in use, it opens it as re
Ehm, remove the STGM_SHARE_EXCLUSIVE flag. You're telling StgOpenStorage to open the file as read only, but you don't want to share it with anyone. Since the file is already open, you obviously can't be granted exclusive access to it.
--
The Show That Watches Back
|
|
|
|