|
hehe, thought i should use a pointer there just didn't know how
Kuniva
Want, take, have.
(oh btw, best way of learning some language is by looking at examples, start large!) :p
|
|
|
|
|
Does anyone have a sample program that will create a named pipe using CreateEvent()? I source to a program that uses OpenEvent() and I'm reverse engineering it. I do not have the piece that creates the pipe so I'm not sure how to do it.
Thanks!
|
|
|
|
|
CreateEvent() creates.... an event and not a pipe
to create a named pipe use CreateNamedPipe()
lol
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
I agree but it's fairly clear in this code that it's a pipe that they're using. If you want to see the source, go to http://www.eluent.com/source_code.htm and download elgrep.zip. I'm trying to use it for a find-in-files mechanism.
|
|
|
|
|
Why yu think it is a pipe? I looked at the code... It is an event, this is what I see
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
suppose i put my mouse cursor on some list box item and that item's text cant be seen without scrolling horizontally.i want the text to get displayed when i bring my mouse over item
in class/resource view pane in VStudio editor
u can see this behavior.actually its tree view
i want to display the text for ListBox
|
|
|
|
|
Look in any back isue of MSDN, Paul Dilascia, wrote a article about that...
Best Regrards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Or, if you use a ListCtrl instead, the extended option LVS_EX_LABELTIP (defined as 0x00004000) will force this.
i ain't happy, i'm feeling glad; i got sunshine in a bag; i'm useless, but not for long; the future is coming on...gorillaz, clint eastwood
|
|
|
|
|
|
Is there any way to play MPEG file in vfw (Video for Windows)?
Jerzy
|
|
|
|
|
Yeah VFW, just selects the appropiate CODEC for you.
|
|
|
|
|
Hi.
I was wondering if there is a way to directly write to a CD-R or CR-RW from a VC program basically treating it like a hard disk or disk drive etc?
Stan the man
|
|
|
|
|
There exist expensive SDK's for CDR writing, which would make me presume it's not easily done without them.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Sure you can do it if Direct CD is active.
|
|
|
|
|
I am not too familiar with Direct CD. Is there any where I can get more information?
|
|
|
|
|
DirectCD came with the easy CD Creator.... The problem is that you need to prepare the cd, and then you need to decide if you want to leave the cd open or not...
Best Reagard...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hi.
I am keeping a array of pointers to CView and CFormView derived classes. I want to access different functions and variables in each class. Because they are specific to each derived class, I need to type cast. I was wondering if there is another way to access the pointer to the class that will automatically access the top (or lowest?) level derived class. By this I mean if CXView is derived from CView and CYView is from CFormView, I can just xx.GetView[1] and it will return the pointer as a CXView or CYView and not Cview because there may be other views derived from CFormView in the array.
I hope I am explaining this right.
Stan the man
|
|
|
|
|
I don't know what you're trying to say, but if you use a C++ cast ( dynamic_cast<cxview*>(MyView) ), it will return NULL if it is not an object of that type.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
What I mean is I have an array
CView* view[20];
view[0] = ... derived from Cview
view[1] = ... derived from CformView
each view can be a view derived from Cview or Cformview etc. In each of these views, they have functions that I want to access.
So now if I want to access
((CXXView) view[0])->...
or ((CYYView) view[1])->...
I have to type cast it to get to access things.
Is there a way to do things so that it will return the ptr to the relevant derived class so that I do not have to explicitly type cast things?
Stan the man
|
|
|
|
|
No. If you *know* that 1 is a YY view and 0 is an XX view, then you can use a blunt cast, but you're safer to use dynamic_cast to be sure. I *always* use it and *always* check the return, even though I presume in most situations it never will. If you have more than one type, why not have more than one array ? The alternative is to create a class that holds the pointer, and calls the methods you want, and internally knows what type it is, then collect those in an array ( a std::vector I hope ).
That's a solution to what you *want* to do, when I think what you *need* to do is chance the design.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Well, I will think about it. The only reason I want to do things this way is because I have a Mainfrm that holds all these views. It is an SDI app with multiple views and one frm and one doc. This way I can bring up the views just by calling the appropraite array with the right index. After that I can call its function I need.
Can you give me an example of a better way to handle this type of situation? Thanks.
|
|
|
|
|
It depends - how does your view change, I mean, under what circumstances. How is it that an array index is the logical way to look it up ?
Having had a chance to sleep on it, I think dynamic_cast might be the best way to handle this, because it means you can safely pull the views out and turn them into whatever type of derived view they are. There is no nice way of setting it up so that you don't need to do this.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I'm not quite sure what your problem is, but it sounds kindda like a problem I ran into some time ago. I had a number of views, some derived from CFormView, som directly from CView, that were shown in a multi-view SDI app. I wanted to put some general-purpose functions into all the view, but since all my views were not derived form the same base class I couldn't use the old fashion OOP solution. I used a trick described somewhere (I'll get back to that later) that used templates to "add" functionality to existing classes. Basically, instead of defining the common functions in a base class they were added to the top-level classes by the template. If this is what you want, read on. If not, sorry for wasting your time
I haven't got the information at hand right now, but I can find it if you want. I think it was a series of papers on CodeGuru on a totally different subject (that was back when CodeGuru still contained something interesting - but then all the Gods (Chris, Tom Archer etc) moved to CP, and so did I). It is not an easy solutions, you need to modify the messagemap macros and use an implementation base class to avoid code bloat, but it works nicely once it's set up. I even put the stuff in a DLL which only complicates it further...
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
I am a VC beginner.These days i met a trouble:i can't successfully open a AVI clip(the Open function returns always '0').My steps as the following:import a avi file using resource editor->select a animate ctrl and paste it onto the dialog template,and set it to auto play->add a member variable(type control),corresponded to the ctrl in the dialog->open(UID) it in InitDialog().
is there something important i missed or wrong?
God blessing me...
|
|
|
|
|