|
Hi Experts,
I am creating tree of logical drive(c,d, etc..) as soon as user click on eithr drive leeter or folder name but If the tree is being made for drive c and user click on drive d inbetween then what is fast and accurate method to end the thread of drive c and begin thread of drive d.
|
|
|
|
|
When you are creating a thread?
-@SuDhIrKuMaR@-
|
|
|
|
|
As user click on drive letter
|
|
|
|
|
If it worker thread :- check for a boolean variable every time before finding new file. if you want to close that thread simply set the boolean variable ( and write the exit code of thread from there), as the loop is checking it everytime before going to find new file.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/IV
Support CRY- Child Relief and You
|
|
|
|
|
GetExitCodeThread(hTread->m_hThread, &exitcode);
if (exitcode != STILL_ACTIVE )
It will tell you the status of the thread,Then take a decision what to do.
-@SuDhIrKuMaR@-
|
|
|
|
|
sorry if i sound rude, I believe he looking for solution/logic for instantly ending of thread.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Now let us have two classes one is a base class & there is a virtual method. Again there is a derived class & we override that method & the access is private, through the base class pointer we assign the derived class object & call the virtual method then which method will be called & why?
|
|
|
|
|
The derived one will be called.
This will be decided at run-time, as the pointer is pointing to a derived class, the derived class version should be called.
--
"Programming is an art that fights back!"
|
|
|
|
|
You are correct. Let me give the snapshot.
class BaseClass
{
public:
virtual void Display();
};
void BaseClass:isplay()
{
printf("Hello BaseClass\n");
}
class DerivedClass : public BaseClass
{
private:
void Display();
};
void DerivedClass:isplay()
{
printf("Hello DerivedClass\n");
}
int main(int argc, char* argv[])
{
printf("Hello World!\n");
BaseClass* pBaseClass = NULL;
DerivedClass* pDerivedClass = new DerivedClass();
pBaseClass = pDerivedClass;
pBaseClass->Display();
delete pDerivedClass;
return 0;
}
In this case the method is private in the derived class, so if we can call this private method from another class then what is the meaning of encapsulation in C++?
|
|
|
|
|
Yajnesh Narayan Behera wrote: In this case the method is private in the derived class, so if we can call this private method from another class then what is the meaning of encapsulation in C++?
buddy that calling the method which is declared public in base class, though it pointing to the address of private method of derived class.
static Binding and encapsulation are eligible till compile time, where compiler check daat integrity and language rule.. runtime check is not applicable in c++. thats why you could even call private member at runtime with twist!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
I have a exe file (Pinnacle Media Centre TV Tuner card Application)that displays Video from Camera ,I Want that Video to be displayed inside a Dialog Based Application as a small window area..
I tried EnumWindows and ita callback function i am not able to get the Application Handle
|
|
|
|
|
Check if they provide an ActiveX that does more or less the same as the application. If that's the case, then insert this ActiveX into your dialog application.
If they don't, then I don't think this is possible to embed one application into another (at least, not that I'm aware of).
|
|
|
|
|
check, is it provide you any activeX component for adding into the dialog box
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
No I dont have any ActiveX control for that application
S.K
|
|
|
|
|
No I dont have any ActiveX control for that application [Frown]
S.K
|
|
|
|
|
Hi all,
Please tell me how can color a button without using of bitmap.
Please tell me how can i color a button.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Search in the code project for "Owner draw button".
|
|
|
|
|
can someone show me how I can read and display checkbox value(True/False)and display it into listbox.
VEdb.Open("ICTNAS.mdb"); // Open Clients.MDB
rveSet.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM ExcludedUsers ",NULL);
while(!rveSet.IsEOF()) // Do until EOF
{
int i = 0;
bdate = rveSet.GetFieldValue("Ban Date");
csbDate = bdate.Format();
m_ViewExclusions.InsertItem(i,csbDate,0);
rveSet.GetFieldValue("Student Name",var);
SName =(LPCSTR)var.pbstrVal;
i=i++;
rveSet.MoveNext();
}
rveSet.Close();
VEdb.Close();
}
Thank s
Gpat
|
|
|
|
|
GPat24 wrote: ...display checkbox value(True/False)and display it into listbox.
See here and here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am not after a ckeckbox list, all i want to do is to read a checkbox value from database and display it accordingly (true/false) in a list box. I am able to read rest of the fields but not the check box...
any help would be nice
thanks
Gpat
|
|
|
|
|
GPat24 wrote: ...all i want to do is to read a checkbox value from database...
It is a BOOL , which is actually an int .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
I have a Win32 dialog that is created using CreateDialog and dlgProc is the call back method for that dialog. I have n number of controls on the dialog. When i click on any control the dlgProc receives WM_COMMAND only after mouse click is released. I have scenario where something has to be done on mouse press and some other thing on mouse relese. i am unable to implement this. Any help would be appreciated.
Thanks,
Hari krishna.
|
|
|
|
|
WM_COMMAND comes about because of the detection of a WM_LBUUTONDOWN followed by a WM_LBUTTONUP occuring on the same control. Handle those messages yourself instead of the WM_COMMAND.
Judy
|
|
|
|
|
Thanks Judy. I tried handling WM_LBUTTONDOWN for mouse press but this is called if user clicks on the window not on the controls on the window. If clicked on the controls (for ex: Button) dlgProc doesn't receive this message.
|
|
|
|
|
2 things
1) override OnParentNotify in the dialog class
2) remove the style WS_EX_NOPARENTNOTIFY from each of the dialog controls you want to receive messages for
Judy
|
|
|
|