|
Hi,
in my work i have to take data from VC++ GUI and send them to c51 programs and receive data from c51 and display them in GUI.
I need some idea about how to cooinet VC with c51.
Thanking you
sheshidar patnam
|
|
|
|
|
and is supposed to be this famous "C51" ??
Pastis ? (Pastis 51 )
don't mind if you don't understand...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20]
-- modified at 9:53 Monday 5th December, 2005
|
|
|
|
|
|
It all depends where the VC++ program is running and where the C51 program is running.
There must be some physical interface between the processors (for example, the 8051 is on a PCI-bus card in the PC, and the interface is memory mapped, or the 8051 is in an external box which connects to the PC via serial port.) Look at the definition of that interface - that should tell you how to send data to the 8051 and receive data from the 8051.
I suggest you split the problem of sending and receiving data from the problem of entering and displaying data.
|
|
|
|
|
Hi,
in my work i have to take data from VC++ GUI and send them to c51 programs and receive data from c51 and display them in GUI.
I need some idea about how to cooinet VC with c51.
Thanki
|
|
|
|
|
1- You could read about PC's serial ports. There are a number of samples available here on CP about Serial Ports.
2- And as for the hardware part, you will need to study the C8051 microcontroller, and how to connect it to a PC, which is the hard part.
this is this.
|
|
|
|
|
Hi Khan, Thx for your message,
my question is we are having program for microcontroller, and we developed a GUI to control the microcontroler program, and this GUI has nothing to do with microcontroller, and only thing it should do is communicate with c51 programs in keil. User has to select some data in GUI and this data should send to micrrocontroller programs in same PC dynamically.
And i have to make two way communication between VC and keil.
Thanking you
|
|
|
|
|
The thing you are trying to do could be hard to implement, since the C51 program running in the Keil compiler is in Keil's own address space etc, and not running independently, because it is not an executable program; It only runs inside the Microcontroller.
My personal opinion:
If you need to create communication between two different programs, then write them both in VC++.
If you really need to communicate with a C51 program, then you would have to take a look at:
Inter-process communication. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipc/base/interprocess_communications.asp[^]
API Hooking. (Maybe too.) http://www.codeproject.com/system/hooksys.asp[^]
Also you could do some research on emulating the Keil compiler ; (i.e, writing a program which in turn runs a Keil's C51 program).
this is this.
|
|
|
|
|
Hi folks,
I've got a need to re-route printing based on a given condition. Basically, when the user selects file | print in my MDI doc/view, I need to open a different doc (of the same type) and print that instead. So far, I've been opening the other document in view::DoPreparePrinting (after the call to the base class, so the user can select their desired printer), calling newView->OnBeginPrinting, newView->OnPrint & newView->OnEndPrinting manually and then closing the document. This prints the original view though.
Anyone had to do this before? Could you point me in the right direction? It would be great if I could get print preview to preview the other document too.
-Dy
|
|
|
|
|
Hi,
Override OnPrint( CDC* pDC, CPrintInfo* pInfo) virtual function and draw whatever u want in that DC. The default implementation calls the OnDraw member function and passes it the printer device context. Thats why you r getting the original view.
Bye
Cool Ju
Dream Ur Destiny
|
|
|
|
|
After a proper nights sleep I've taken another look at the problem.... What I should have been doing is opening, printing / print previewing and closing the document in question in the OnFilePrint and OnFilePrintPreview handlers - not in DoPreparePrinting!
Do'h, so simple when you think about it properly...
-Dy
|
|
|
|
|
|
what does the post build event do ? register any service or ... ?
|
|
|
|
|
Thank you for your reply! You're right, it looks like it just copies the execuatable to another folder. Duh! I must be getting tired. Thanks again.
|
|
|
|
|
Hi,
I think its not a serious problem. It might register some service which you can do in command prompt.
Bye
Cool Ju
Dream Ur Destiny
|
|
|
|
|
You're right! Thanks for your reply.
|
|
|
|
|
Why did you delete your message ? This could be helpfull to somebody else !
|
|
|
|
|
Cedric Moonen wrote: Why did you delete your message ? This could be helpfull to somebody else !
Something Wrong here! Is that an error? As Message Header shows you have deleted the message and inside text show that you are arguing with some for Message
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
No, I was just replying to the first post which has been deleted (that is why the header is: Re: [Message Deleted] ).
I mean, why delete the posts when you get an answer ? That's a little bit selfish. Now other people are not able to follow the discussion because they just have an answer to a deleted question.
|
|
|
|
|
Cedric Moonen wrote: No, I was just replying to the first post which has been deleted (that is why the header is: Re: [Message Deleted]).
Ohh, My Mistake...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I derived a class from CFileDialog and added a ComboBox manually, in absence of the normal VS dialog editor (as the CFileDialog isn't public). I also add message handling for the ComboBox manually, but I can't make it work.
here's some code.
BEGIN_MESSAGE_MAP(CImageFileDialog, CFileDialog)<br />
ON_CBN_SELCHANGE(IDC_BROWSEBYCOMBO, OnBrowseBySelChanged)<br />
END_MESSAGE_MAP()
The problem is that OnBrowseBySelChanged is never reached.
Is there any blocking of message handling of undocumented MFC classes, and in that case how do I get around it?
Thanx in advance!
Josef Granqvist
Student and Trainee
-- modified at 7:06 Monday 5th December, 2005
|
|
|
|
|
See the OFNKing sample in MSDN
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
Thanx, that was very useful.
A studier of that sample have to change edt1 to cmb13, though. At least I had to, to make it runnable.
Cheers
Josef Granqvist
Swedish student and Indian trainee
|
|
|
|
|
Is there any single function to determine wether a folder is empty in VC++!
Thanks in advance
emmatty
|
|
|
|
|
emmatty wrote: Is there any single function to determine wether a folder is empty in VC++!
AFAIK, there is no such function... I believe you have to make your own.. you can use CFileFind Class to achieve same...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|