|
Shouldn't you be using TVIS_SELECTED instead of TVIF_SELECTEDIMAGE ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
um. lol. oh yeah. how stupid of me . gotta read the instructions COMPLETELY!
Thanks!
I'm working the drive check right now. That's pretty nifty. guess I still have a ton to learn. Thanks alot. I really appreciate this.
Dan Willis
|
|
|
|
|
Ok,
Almost there. Thank you for your help so far. Now I'm correctly checking the drives and it is returning properly. I'm correctly setting the selection of the drives.
But now, for example, if the user selects the floppy drive but there's no floppy in it, I get the error returned and change the selection to the previous selection. problem is even though the selection has changed, the floppy drive is still continously attempted to be read. It's almost as if that selected drive still has focus. Another clue is that after I change the selection, there is still a dotted-line box around the floppy drive, which says to me that the CTreeCtrl still has kept the focus on the Floppy drive and not changed it to the drive I switched the selection to. make sense?
Now what This is my last piece for resolving this one. Any help in the matter is greatly appreciated. Thanks a ton!
Dan Willis
|
|
|
|
|
I think I got it.
Seems that the CTreeCtrl::SetItemState does just that, only sets the TreeItem's state. If you want the Tree to actually set focus to that item, you have to also call CTreeCtrl::SelectItem.
Thanks for the help!
Dan Willis
|
|
|
|
|
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.
|
|
|
|