|
Hi
I'm talking about this neat feature that treates your code like a tree and lets u see just the branches u want while the others are hidden behind a [+]
Is there anything like that in any VC6 addin?
TIA,

|
|
|
|
|
|
I mean the objects that belong to different classes.could anybody tell me what the simplist method is, and what the best method is?
Thanks in advance
|
|
|
|
|
One object should hold the data and the others point to it.
|
|
|
|
|
Thanks. but in case one object does not own a pointer to another object, how to share data between them?
|
|
|
|
|
You could share data with a global variable or if the classes have a common base class through a static member of the base (this is really a variation on the global). None of these is, in general, particularly good form. If you need to share data between classes then one should hold a pointer or reference to the other. If this isn't possible your design probably needs revising.
Steve
|
|
|
|
|
I would create an intermediary class that can 'connect' the two and has the appropriate Get/Set functions on its own member variables. This essentially allows your two objects to share the data with each other. You can add ability to inform each of the clients assuming they have some mechanism permitting notification, such as they are a thread or a window object.
This object would allow the two to also share data independent of their individual implementations.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Yeah, this sounds fine. Obviously an entity needs to exist which has pointers/references to the two classes which need to share data.
Steve
|
|
|
|
|
The two classes have some reference to the intermediary object, not the other way around.
However, if either class has a LOT of data, you would not want to keep copying that around. But then if they need to share a lot of data that frequently, neiher of the clients should possess the data in the first place - the data SHOULD reside in the intermediary object - a data repository object.
Each client then uses its own mechanism, or a parent object hooks everything up.
Typically, when a question like this is posed, I immediately think there is no or little separation of data from processing, and every system I have ever encountered that is made that way, suffers from upgrade and migration problems not too distant in its future.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
how abt applying the friend class concept?
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
I have a form where a user can/could type in a filename, the form also have a "..." button where she can press to load a CFileDialog to also type the filename and decide where the file will reside.
The question is,
Do I make the text field non-readonly so the user can type a filename ( with and without a full path ) and have a chance that the path is not well formed, forcing me to di extra validation; or make the text field read-only and only use the CFileDialog to "force" the user to have to press a button ( and sometimes wait a few seconds ) to only type in a filename ?
and if there's a prefered Microsoft User Interface Guideline for this issue, where can I have a look ?
Thanks.
M.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
If its read-only, it makes it hard to cut-n-paste, as pasting into a CFileDialog doesn't do what you want it to. So I'd do a validation.
|
|
|
|
|
|
Hello,
If I look at all the applications that I use, I can type in a filename in every box that matches your description. So if there isn't a Microsoft guideline written down, there sure is an implicit guideline. So I would use the validation approach.
The validation isn't that hard to do: ::PathFileExists() [^] is all the validation you need.
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I can't stand path-type edit boxes that do not allow me to type/paste into them. Simply use PathIsDirectory() or PathSearchAndQualify() for validation.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
|
Use this[^]. It's brilliant and does exactly what you need.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
hi
does any one know how to so using Visual c++.
thanks in advance
|
|
|
|
|
you post the same question 3 hours and 38 minutes ago; maybe the sound/wave experts that could help you did not come here yet.
but where is your problem ? recording ? analysing ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi.
How can I implement a MRU as popup sub menu in a MDI application ?
Manosza.
-- modified at 16:16 Monday 23rd January, 2006
|
|
|
|
|
I have a C++ DLL that some other programs use. I set SetUnhandledExceptionFilter in the DLL to catch any application crashes. The application crashes, the DLL's ProcessDetach isnt called, but this filter function isnt called either. Any tips for debugging this problem?
thanks!
|
|
|
|
|
Maybe someone called ExitProcess? put a breakpoint in ExitProcess and track back the call stack..
|
|
|
|
|
__yb wrote: Maybe someone called ExitProcess?
If that is the case my DLL's ProcessDetach should be called right? Other possibility is TerminateProcess is called.
__yb wrote: put a breakpoint in ExitProcess and track back the call stack..
I will try this. Although I only have release version of the application - I am not sure if I am going to get the call stack to see.
thanks!
|
|
|
|
|
Maybe another module called SetUnhandledExceptionFilter and replaced your handler but isn't calling yours. It is unusual for a DLL to call this API - Normally you'd do this kind of thing in the .EXE. You could place a breakpoint inside SetUnhandledExceptionFilter and check for this.
Steve
|
|
|
|