|
Hello
How can i inseret different font color lines to a TRichEdit?
some code will be great!
thanks
|
|
|
|
|
I think that people here are using VC++, not C++ Builder.
Or did you mean CRichEdit ?
Anyway, I can't help, sorry!
Paolo
|
|
|
|
|
Hello all...
I'm lost... maybe because I'm searching to deep, but anyway. My collega came to me for help, but unfortunately..
Let's take a look to this sample:
class CMySystems{
};
class CMyDetails{
};
void xxx::SomeMethod( void )
{
...
m_wndMyCtrlBar.AddView("Systems", RUNTIME_CLASS(CMySystems));
m_wndMyCtrlBar.AddView("Details", RUNTIME_CLASS(CMyDetails));
...
}
Now the problem:
In the class CMySystems I want to be able to use methods from the class CMyDetails.
How can I at runtime pass the 'this' pointer of the CMyDetails class to the CMySystems?
Thanks in advance,
EiSl
|
|
|
|
|
It seems that TabControlBar creates CMySystems and CMyDetails objects for you - one of the CRuntimeClass responsibilities is creating CObject-derived objects. If your question is how to get actual object after it is created by CRuntimeClass, the answer is: you depend on TabControlBar. This class should give you access to its views; I'd expect something like TabControlBar::GetFirstView/GetNextView. Since it's 3rd party class, I can't help you futher.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi!
Does anyone know, how can I create new NT user?
Thanks a lot.
|
|
|
|
|
Look up the NetUserAdd() function in MSDN.
Jon Sagara
"Left-handed nunchakus!"
|
|
|
|
|
Hi,
I would like to create a function with 8 Inputs and the result is in 4 Ouputs.
How can I declare it?
Best Regards
youssef
|
|
|
|
|
Hi
Are you really shure that you want to have that many in and outputs in one function? Maybe the function is doing too much and you should consider splitting it up in several functions.
Else, while a function only can return one value you have to get the result through the parameters in the function using pointers or references. Something like: myFunction(in1,in2,in3,in4,in5,in6,in7,in8,*out1,*out2,*out3,*out4).
/Per
|
|
|
|
|
the other asy is to group your values into structures or clases (input and output)
then it's easy...
COutputInfo DoSomeCalcs( CInputInfo in )
{
:
}
=)
|
|
|
|
|
Hi!
Does anyone know, how to determine (until preprocessor defines) the app use MFC or not, if included support MFC in static library ?
|
|
|
|
|
When using the DLL version of MFC, the symbol _AFXDLL is defined. When using the statically-linked version, it's not defined.
As for whether MFC is being used or not... it looks like you can check for __AFX_H__, which is defined when afx.h is #include'd.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
Hi,
I know how to import say a dialog box from another project,
project->add to project->files->the_resource_file.rc
But don't know how to import that dialog's class from the other project.
I want to be able to import a dialog box and it's class, so I wont have to recreate member variables and all the rest of them things. How can I go about that?
Thanks
|
|
|
|
|
Import the h and cpp files.
|
|
|
|
|
I did, that didn't work, might there be something wrong with my compiler?
Because even though I could see the dialog class in the class view, when I right clicked on the dialog box (in the resource editor) and chose class view, that gave me the options:
1)create a new file and
2)Choose an existing one
when I chose to associate it with and existing one, the class (of that same dialog box-imported)that was supposed to be there WASN'T, and I repeat, I could see it in the class view, and I could see the .cpp and .h files in the file view.
Now, what is going on? I really need help, I wouldn't like to waste a whole day remaking the old things.
Thanks a lot
P.S. I hope I make sense
|
|
|
|
|
Copy both the .CPP and .H files. And then use Project->Add to project-> files to add these files in to ur project.
I think, u have to import the resource.h file also.
|
|
|
|
|
Rejeesh,
I'll do that, but you can't copy the whole resource.h there can be only one at a project. But Christian gave me an exact advice of how to do it.
Thank you guys I hope that'd work.
|
|
|
|
|
Cut and paste will work. But there should not be same values in ur existing resource.h file.
One more thing. Better u open the new .rc file in any text editor and copy the required data from the old. Do the same with resource.h also (without ID conflict).
Happy coding.
Rejeesh
|
|
|
|
|
If you're only importing the rc file, you probably need to recreate the resource definitions from the old resource.h file, I would have thought. I always do this by physically copying the dialog definition from the old .rc file and pasting into the new, and then creating the new definitions directly in the resource.h file.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Hi,
I can't manage to do the importing so far.
When I import a class into the project, why doesn't it let me associate a dialog box with it. It's not in the list of existing ones (in the class wizard), even though it's in the class view. I know someone will get pissed because I'm repeating myself, but I just can't seem to figure it out.
I tried to edit resource.h, but ... well, couldn't do it
Thanks
|
|
|
|
|
Remove the old .clw file from u project directory. Then activate the class wizard. Just press ok in the dialog shown. UR imported classes will be available in the class wizard.
|
|
|
|
|
I'm starting a console window application from a dialog based application, using CreateProcess, because I need to hide the DOS window. Do you guys have any idea how can I capture the output of the DOS window to display it in my dialog?
I tried to pipe the DOS application to a file, and then read from the file, but there's one problem: the DOS application writes to the file when it finishes. I need to get info from it while it is still working.
To give you a better understanding of what I'm trying to do, here's an example: I start an external compiler, and I want to display in my dialog the data that the compiler shows in its DOS window.
Thanks!
|
|
|
|
|
I have a simple class for doing this which I will send to you. Just email me at gullettm@yahoo.com and I will respond with the class and a demo project.
The class is not 100% perfect but works very well for my needs which sound exactly like yours.
Thanks,
Matt Gullett
|
|
|
|
|
This sounds like a great subject for a CP article...
--------------
"Aagh!! I'm a victim of a Random Act of Management!"
|
|
|
|
|
Hello, the toolbars used by Visual C++ and most other Microsoft products are Command Bars ( not the Rebars that MFC provides ) so I was wondering if there was a free control for that. And if not, why don't all of use create a new command bar control? Anyone interested?
QuickSilver
|
|
|
|
|
How do I that without that the button will hide the static ?
|
|
|
|