|
That what I am asking about.
|
|
|
|
|
"Accepting a file" really makes no sense without some sort of context. I'm not sure how others could be expected to know how your application is handling files. Provide some more information.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I have tab control with many property pages, I want to update only selected property page at a time when it is visible.
What message have to handle from the property page class when the page is selected?
Is it possible to handle any message from the property page class, not from the tab control class, which hold the page?
thanks.
|
|
|
|
|
The only thing I am aware of is CPropertyPage::OnSetActive() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
thanks, this seems to work good
|
|
|
|
|
Hi,
I've developed an application in which I've 2 dialog boxes(not property sheets) and they are all modeless dialogs .By clicking a button in the dialog1 the user can move to dialog2 and he can also move back to dialog1 by clicking another button in dialog2.
In dialog1 after the button is clicked i'm creating dialog2 overloading the "Create" function and the code for that is something like....
DestroyWindow(); //to destroy dialog1
d2=new dialog2; //d2 is apointer of class belongong to dialog1
d2->Create(IDD_DIALOG2,NULL); //dialog2 is created
the problem here is, I'm not able to delete the pointer d2,because if i delete it within the destructor of class dialog1 then the dialog2 wont be visible .If i dont delete it it leads to a "MEMORY LEAK" .Same is the case with dialog2.........
So I'd like to know which will be the right place to delete the pointer so that the dialogs are created properly and there wont be any memory leak.Anxiously waiting for a reply....thanks in advance.
Rajeev
|
|
|
|
|
You need a readily accessible instance of a third class that contains the pointers to both dialogs. Each dialog can call functions in this class to free the memory when the dialog is being destroyed.
|
|
|
|
|
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
|
|
|
|