|
I don't found any article in the specified link.
Here one thing is not clear :
do you want to delete multiple tree items at one shot?
If this is the case than,
when a parent and a child is selected of the same node or parent of one node and child of the other node? it's a not valid selection for deletion,if multiple selection is selected in a tree control.
|
|
|
|
|
http://www.codeguru.com/cpp/controls/treeview/misc-advanced/article.php
This is the Link. Surprising it didn't open in your case. This artical is only helpful in selecting multiple items in CTreeView control because MFC does'nt provide functionality to select multiple items in a TreeView Control.
Yes the aim is to delete multiple Tree Items in one shot and there are possibilities in which parents and childs of same catagory are selected, and this problem is arising because of this selection only, that if one of the selected items is a child item and its parent is deleted first, then all the children will be deleted too and all the information about the deleted item will be lost.
If you are saying that its not a valid selection then what restriction should I impose while selecting an item? What should be the valid selection criteria for multiple item deletion according to users point of view??
Maverick
modified on Monday, July 28, 2008 6:36 AM
|
|
|
|
|
Ok,
The simplest thing i can suggest is that on click of delete, iterate through all selections ,if any selected node is not child one than display a message saying all parents should be selected.. or any thing to the user saying it's not a valid selection.
Regards,
KDevloper
|
|
|
|
|
Well I am afraid that it was requirement from the client that the multiple selection can be of any sort, so I have to deal with it that way I can't display any message.
Maverick
|
|
|
|
|
I'm using VC++ 6.0;
Suppose a variable is declared in a DLL and there are two functions exported from the DLL. 1st function initializes the variable and the other one accesses it. Is it possible to call first function from one application and call second function from another application to access it? I have tried declaring a static/global variable but it loses initialized value when accessed from 2nd application. #pragma doesn't seem to work as well..
Anyone having any clue about the issue please respond.
Thanks and regards.
R.
|
|
|
|
|
probably you need shared memory or you can do it using CreateFileMapping or you can use IPC
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See here.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
well, my compiler gave the following warning:
D:\Testing\testpos\caller.cpp [Warning] `allocate' attribute directive ignored
and after initializing in 1st app the value that I get in 2nd app is 0
I also tried
#pragma data_seg("SHARED")
int i; // 'i' will be initialized later with function1
#pragma data_seg()
#pragma comment(linker, "/section:SHARED,RWS")
but that also gives initialized value in the frst app but gives 0 when accessed from 2nd app.
|
|
|
|
|
Did you read the linked page of my post?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hi,
Q1.
I renamed my class name from FRWS to HELPER in order to combine all my "helper" classs into one HELPER CLASS; otherwise I will have a lot of small classes and long list of imports.
when I compile my prog, I get this error:
error C2533: 'FRWS::{ctor}' : constructors not allowed a return type
Q2.
When I try to use this object in the main program,
FRWS Sbj;
i get these errors:-
error C2065: 'FRWS' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'Sbj'
Enclose is the code:-
[HELPER.H was formally FRWS.H]
[contains 2 different classes]
#pragma once
class FRWS {
public:
FRWS(void);
virtual ~FRWS(void);
public:
CString ETEXT(CString givenTEXT);
CString DTEXT(CString givenTEXT);
};
class pgLog {
public:
pgLog(void);
virtual ~pgLog(void);
public:
void WLog( CString TF, CString LgText );
}
[THIS IS HELPER.CPP]
#include "StdAfx.h"
#include "Helper.h"
FRWS::FRWS(void) {
}
FRWS::~FRWS(void) {
}
CString FRWS::ETEXT(CString givenTEXT){
...
}
CString FRWS::DTEXT(CString givenTEXT){
...
}
void pgLOG::WLog( CString TF, CString LgText ){
...
}
|
|
|
|
|
I think your pgLog class is missing a ; after its final bracket. The compiler usually picks this up specifically but for some reason not in this case so the following function is being stuffed.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Although your style of questioning is interesting - as in, you don't ask any
I think you'll find that your class pgLog doesn't have a ; after the last brace.. This may well be the cause of both errors. Leaving the ; off the end of a class definition causes the compiler to talk in tongues at times.
|
|
|
|
|
Thanks.
Found that out too.
|
|
|
|
|
I having my own desktop application and iam launching many application through the desktop application and i required to display only the application which are launched through the desktop application when Alt+tab is pressed
can you pls help me...
|
|
|
|
|
I can think of one way, but my mere mention of it will cause many seasoned reasons readers much anguish.
It's not elegant, and it very definitely is a hack however, ever noticed that if you create an app that has a toolbox window style that you (a) can't see it on the task-bar and (b) can't activate it through the usual alt-tab mechanism?
Think with me here - you can enumerate all windows, you can also change window styles.....
modified on Tuesday, July 29, 2008 7:59 AM
|
|
|
|
|
Hi All,
I need the link to the Hierachy chart for MFC8.0.
I tried to google and searched in MSDN also. But couldnt find it.
Please help!
Priya Sundar
|
|
|
|
|
Priya_Sundar wrote: I tried to google and searched in MSDN also. But couldnt find it.
It could be a bug in the documentation. They might have missed it out!
If you need the chart for version 9, it's here[^].
The three part chart after you've installed the feature pack for VS 2008 is here[^] (the PDF version of the same is available for download here[^])
|
|
|
|
|
Do you need to Microsoft Foundation class Library version 9.0?
|
|
|
|
|
I have read many articles about 'Busy Waiting' prevention in thread synchronization.
I am wondering if busy waiting is really a big problem with processors available nowadays.
What is your opinion - is busy waiting just a theoretical problem or it really affects system performance?
Thank you.
|
|
|
|
|
Daniel Kanev wrote: I am wondering if busy waiting is really a big problem with processors available nowadays.
IMHO wasting time is an issue regardless of processor speed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Daniel Kanev wrote: I am wondering if busy waiting is really a big problem with processors available nowadays
Suppose that you have a loop in which you constantly check the value of a variable (and do something if the variable is true), no sleep or wait, only an 'endless' loop. This loop will consume the maximum resources it can use on the processor on which it is running. So, even if you have a faster processor, you will only loop faster. But all other process will still be slowed down because of that. So, yes, busy waiting is bad, even if you have the fastest processor in the world.
|
|
|
|
|
Yes, it's a big problem on a multitasking OS.
Steve
|
|
|
|
|
Looking into the MSDN, found the functions of lstrlen and _tcslen are the same,
If _tcslen is enough, why does lstrlen exist?
Please help me unlock my mind!
|
|
|
|
|
When your project settings are MBCS, tcslen and lstrlen are same. You
should not use lstrlen on a UNICODE string. _tcslen will work on a
UNICODE string as well as MBCS.
If you dont know what MBCS/UNICODE are, use _tcslen
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|