|
|
Hi All
I am making an application in which I have to insert the values into the tree recursively.
I have been stucked that how should I do this?
I am using CTreeCtrl class of MFC for tree control.
So Please help me ...
Thanks.
|
|
|
|
|
Recursion simply means that a function calls itself. What are you populating the tree control with?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Infact I want to insert a node into the tree
- Then all the subnodes of that node will be called recursively and being inserted into the tree.
What I am doing is as follows
<br />
<br />
Now I want to insert all the local folders of Outlook Express into the tree as it looked into the Outlook Express .
But The tree from this code is not resembling to that one.
So please tell how should I modify programm to look like Outlook Express.
From the code it is clear that it enumerates all the folders & subfolders of outlook exress , So I want to display it in the tree form.
Note that
"m_pStoreNamespace is the object of Interface IStoreNameSpace"
Please reply.
|
|
|
|
|
I see you are using code from this article. So what exactly is or is not happening? Does the tree control get populated at all? Are items missing? Is the hierarchy wrong?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Ya I am using sample from the link You have mentioned.
As I told I want to insert the folders & subfolders of the outlook express in the order as it is in outlook express to make user interface better, as in the article values are inserted into listbox.
So please suggest me.
Thanks
|
|
|
|
|
rajeevktripathi wrote:
As I told I want to insert the folders & subfolders of the outlook express in the order as it is in outlook express...
If the items are being inserted correctly but are just in the wrong order, it sounds like you need to add the items to some data structure first, sort them, and then add them to the tree control. If that does not sound right, you'll need to better explain what your program is doing that is not right (that's why I asked those other three questions).
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
HI!!
for developing a download manager utility... i will have to use reliable udp to ensure that packets are not lost and are deliv'rd in proper order.... how do i implement it?
V.G
|
|
|
|
|
Hi,
You cant ensure that messages sent over UDP will arrive in the order they were sent in, however, you can add an int (order) to the message structure indicating the order of the sent message, then you can re-arrange these messages according to that number.
To ensure that all messages arrive, implement a hand shaking mechanism. Something like:
1. Send a Message to the other end.
2. Mark it as "did not reach" i your program.
3. If the message reaches its destination, the destination sends an acknowledgment
4. After a predefined timout, if no acknowledment arrives, resend the message with the same order.
Good luck
|
|
|
|
|
Previously, I have an ActiveX control which I use it in my MFC GUI program.
The wrapper class (inheritanced from CWnd) for the activex control is generated automatically through class wizard. Everything just work fine.
Now, I need my application to work in non-gui mode. Hence, no dialog or windows will be created to host the active x control.
I just copy the ActiveX wrapper class file, which is generated previously, into my console project. i realize that a runtime error will occur whenever i try to use the active x control. this is because there is no dialog/ or windows to host that activex control.
I read an article at http://www.codeproject.com/com/consoleactivex.asp
The author shows the way by using COM. However, i am not familiar with COM. I prefer to use back the wizard generated wrapper source code, which is much more easier.
may i noe how can i solve this problem? do i need to created a hidden window for it? or is there better way?
thanks!
cheok
|
|
|
|
|
Use the class wizard to generate a wrapper class, not derived from CWnd, but from COleDispatchDriver.
In ClassWizard click Add Class then select From a type libary and select the .tlb file of your control.
After you have the wrapper class call CoCreateInstance to create the object, something like:
IDispatch* pDisp;
CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, dispid, &pDisp);
where clsid is the class id for the object, dispid is the ID of object's IDispatch interface
After a successful call of CoCreateInstance use the AttachDispatch method from the wrapper class and then you can call ActiveX methods, like this:
CWrapperClass myDisp;
myDisp.AttachDispatch(pDisp);
myDisp.SomeActiveXMethod();
Remember to call CoInitialize before CoCreateInstance and when you're done using the object call pDisp->Release() in order to decrement the object's reference count and destroy it.
|
|
|
|
|
Thanks. Using COleDispatchDriver as parent class really work!
I didn't use AttachDispatch since I cann't make it works. Most probably I miss out something. However, by using CreateDispatch just rock I assume there is no clean up needed after CreateDispatch from the MSDN example.
Thanks for help!
cheok
|
|
|
|
|
This component is produced by Giga.INC. Please give me some information and suggestion of this. Thanks!
|
|
|
|
|
Respected all
I have picturebox on my DialogBox(Dialog based MFC app) ,, when I run my prog, the bitmap displayed on picture box but when the size of bitmap s max then problem r coming b/c the Dialog boc which have a picture box has its feault sizze so how i can change the size of dialog box to its max, size.
so that no problem to me while to display large bitmaps.
Thanking u people
david
|
|
|
|
|
Recommend reading the articles at CP on resizable dialogboxes.
I also recommend that you write your questions in english; I lost you at "s max", "r", "Dialog boc" and "feault sizze", so I have no idea if my interpretations where even close to correct.
INTP
Every thing is relative...
|
|
|
|
|
Try ShowWindow(SW_MAXIMIZE). Look up ShowWindow on MSDN for all kinds of other uses.
Danny
|
|
|
|
|
Is there a property of a CDialog to set the object INSIDE the MainFrame, like the ChildFrame in an MDI application? That is: I don't want that the Dialog could exit from the border of the main frame, but I want that that border hides a portion of the dialog (if it is trying to come outside).
Thanks
|
|
|
|
|
if you look at the CDialog constructor, you'll see that it gets a CWnd* parameter named Parent ...
so, when your MDI creates the dialog box, it passes this to the constructor and that should work...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi,
I tryed it, but didn't change nothing...I think that this is only a way to set the relations between the windows (like the closing order).
I'm quite sure that my problem could solve changing some flag(s) into the dialog style/properties,... but what?
|
|
|
|
|
You were so close.In properties tab set Style to child rather than overlapped or pop up
|
|
|
|
|
Hi, thanks for your help.
I think that we are near to the solution.
But...ehm...
I change the style-flag... and the program tilts.
Try to change that flag with the about-box on an MDI program.
What I'm wronging?
|
|
|
|
|
Matteo_78 wrote:
...and the program tilts.
I know that pinball machines can do this, but I was not aware of a program that could tilt.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
check stryle clip siblings,and while creating dialog box make main frame window as parent.
|
|
|
|
|
Now, I writed a ActiveX, I use HttpSendRequestEx function to send request to server. when I run the ActiveX two times, this function is down.
(I have not had a server, I'm Creating server).
pls help me.
Many thanks.
|
|
|
|
|
Why won't my CHtmlView object display HTML files correctly when they have tables with merged cells (colspan property)? Internet explorer shows these files OK.
What can I do?
|
|
|
|