|
I'm thinking of writing a frontend to some command-line tools, so I need a way to capture stdout/stderr from the programs I shell to. Any recommendations on how to do this?
|
|
|
|
|
|
All right! Thanks for the super fast reply!
|
|
|
|
|
Hi All,
I am developing a add-on dll in C++, for which the basic framework is given.
Now, I have to convert it to MFC since I want to make use of the collection classes provided by it. Could any of you tell me the steps, how to convert a C++ project to one which supports MFC?
Any help is highly appreciated.
Thanks,
Jabir.
|
|
|
|
|
It the collections is all you need from MFC, you might want to consider using STL, a standard C++ library for which no additional framework is needed. There are some tutorials here in CP.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks Joaquin M Lopez Munoz. I want to use other things like ADO also along with collection classes like CStringArray, CObList etc. I thought of using MFC because I am very comfortable in it. I do not know STL, so I will have to learn that before using it. Could you please tell me, the steps to convert C++ project to support MFC?
Thanks,
Jabir
|
|
|
|
|
Hi,
I am looking for a Visio like control (to use with VC6). It is to draw flowsheets, etc...
At work we have some old Stingray things, but I don't like them. Do you know any control like that?
Or a starting point to build it on?
Thank you,
loic
|
|
|
|
|
I've got a header file and a library from a SDK and a want to programme with those functions from the SDK. Can somebody explaine me how I've must call those functions from the SDK and define the library and the header file?
I've put the library in the "Additional dependencies" setting...
I hope somebody can help me out.
|
|
|
|
|
The header file has to be included in every file where you want to use the functions declared in it. Lib files can be either included via the import command or by use of the project settings as you already did.
|
|
|
|
|
Does anyone know how to create files and edit them in vc++?
I know how to do it in vb, but i'm new to vc++.
Thanks for any help! Nathan
|
|
|
|
|
Have a look at CFile or CStdioFile. They offer you easy-to-use methods for creating files and filling them with content. There should be many tutorials about that on MSDN and here on CP.
|
|
|
|
|
Is someone fit in using the MIL-Library from Matrox.
This framegrabber has some TTL outputs I want to use for my application.
I tried to set the CAMCTRL0 Pin(35) on this framegrabber but it doesn't work.
Perhaps someone knows the error in my program:
I wasn't able to mesure an alternating voltage on the dmm. I had 0V all the time.
MIL_ID MilApplication;
MIL_ID MilSystem;
MIL_ID MilDigitizer;
MIL_ID help;
MappAlloc (M_DEFAULT, &MilApplication);
MsysAlloc (M_SYSTEM_METEOR_II_CL, M_DEFAULT, M_DEFAULT, &MilSystem);
MdigAlloc (MilSystem, M_DEFAULT, "c:/dcf/test.dcf", M_DEFAULT, &MilDigitizer);
MdigControl(MilDigitizer, M_USER_OUT_FORMAT , M_TTL);
printf("Bit set!\n");
while(true)
{
MdigControl(MilDigitizer, M_USER_BIT+2, M_ON);
Sleep(1500);
MdigControl(MilDigitizer, M_USER_BIT+2, M_OFF);
Sleep(1500);
}
|
|
|
|
|
hi,
I'm building a Program that is works in a server/client situation, if a client wants to see how is connected to de server a list of all connections(SOCKET's) is send to the client. As we all know the SOCKET type is just a pointer to a network adress. Now i want to know what type of number this pointer is, how many bits. With this information i know how much bytes i have to reserve in my msg from server to client.
I couln't find it in the msdn libary... I hope you understand me, my english isn't that great.
[]D [] []D []
|
|
|
|
|
If you don't want protocol information, your IPv4/socket combo will use 4 bytes for the address and 2 bytes for the socket number. However, a lot of that changes with IPv6.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
thnx, that's what i needed to know...
[]D [] []D []
|
|
|
|
|
Woops, I ment 2 bytes for the port number....
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Perhaps I misunderstand your question, but questions of the form,"How big is this thing", can be answered by using code like:
main()
{
MYTHING thing;
printf("MYTHING is %d bytes long\n", sizeof(MYTHING));
}
If MYTHING is a pointer and you want to know the size of what it points to:
main()
{
MYTHING thing;
printf("*MYTHING is %d bytes long\n", sizeof(*MYTHING));
}
|
|
|
|
|
i have created a MFC DLL,the dll name is "mydll",the class name is "CMyClass" and the function name is "Function1()",how can i use this dll in the asp page?can any one help me out?plssss.
Thanks in advance
|
|
|
|
|
You can not. For ASP or any other VB based scripting you need to use COM components. I believe is ASP.NET you could use it , provided that you need to create c++.Net wrapper.
|
|
|
|
|
I have an SDI application. I want to change the background of view....
I tried SetBkColor(RGB(255,0,255) in OnDraw(), OnPaint(), but no success... I tried OnCtColor(),,,, it also not works...
Any Help?
|
|
|
|
|
Try OnEraseBkgnd(). It's usually used to set the background of a view.
|
|
|
|
|
No It not works
It has a CDC pointer as a parametre.
I created a brush of desired Color,,, and then i Select it
pDC->SelectObject(&brush);
But no Success!..
|
|
|
|
|
Here's an example taken from MSDN:
BOOL CSampleView::OnEraseBkgnd(CDC* pDC)
{
// Set brush to desired background color.
CBrush backBrush(RGB(255, 128, 128));
// Save old brush.
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect); // Erase the area needed.
pDC->PatBlt(rect.left, rect.top, rect.Width(),
rect.Height(), PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
}
If that doesn't work - which kind of view do you use?
|
|
|
|
|
Guys i created a console application with main() . I want to debug it from the beginning so i am putting a break point at the first statement in main() .
The problem is that my application requires command line parameters (i.e argc/argv) and i always run it from dos instead of VC++ IDE.
Can anyone tell me how can i start debug my application
|
|
|
|
|
In your project settings you can choose a path to your executable which to debug. Additional information such as command line parameters can be assigned there, too.
|
|
|
|