|
Hi all,
I have a CListCtrl object in my programme. I want to unload or destroy it programmatically. How it is possible.
Please Help me,
Thanks in advance
George
|
|
|
|
|
georgekjolly wrote: have a CListCtrl object in my programme. I want to unload or destroy it programmatically. How it is possible.
have you created that programmatically?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
CListCtrl* pCtrl;
pCtrl->DestroyWindow();
delete pCtrl;
--
Touch eyeballs to screen for cheap laser surgery
|
|
|
|
|
Jörgen Sigvardsson wrote: CListCtrl* pCtrl;
pCtrl->DestroyWindow();
delete pCtrl;
problem if it created statically!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
Then you'll just need to call DestroyWindow(). The CListCtrl object is so small, that it doesn't matter much. We're talking 4-8 bytes.
|
|
|
|
|
Jörgen Sigvardsson wrote:
Then you'll just need to call DestroyWindow(). The CListCtrl object is so small, that it doesn't matter much. We're talking 4-8 bytes.
let have a try..
int i=10;
int *ptr=&i;
delete ptr; // program will crash here
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
What does that have to do with anything? What I'm saying is that if you have a statically allocated object such as CListCtrl m_list , then that object will occupy around 4 to 8 bytes of memory (window handle + vtable). If you kill the window, which the object is a handle for, then 4 to 8 bytes is what'll be left.
DestroyWindow != delete
--
Nominated For Three Glemmys
|
|
|
|
|
Jörgen Sigvardsson wrote: DestroyWindow != delete
he he i got confused with delete operator=delete ...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
|
If you had meant to clear the content, m_List->ResetContent()
If you had meant to close it, m_List->CloseWindow()
If you had meant to destroy it, m_List->DestroyWindow()
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
it is pisibile to hide the CListCtrl ?
Bravoone
|
|
|
|
|
Yup, m_list->ShowWindow(false);
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
I have the following problem. My C++ application creates WebBrowser Control object (CLSID_GFWebBrowser) and displays and URL there. The URL is to an authorization form (“enter user name and password”). When username/password are invalid, the response will be HTML page with message like “invalid username or password”. When the authorization passed, the response will be not-HTML document (PDF, DOC, XLS, PPT).
My application has to recognize the not-HTML response and close the browser window immediately. The problem is: how to recognize it? I tried to handle event DWebBrowserEvents2::DownloadComplete, but in this moment we cannot understand what the document type is. It will be possible later, when event DWebBrowserEvents2::DocumentComplete happens. But when the document is MS Office’s (DOC, for instance), the dialog with “Open, Save or Cancel?” will appear first – I do not need this. I tries to suppress the dialog appearance, but could not.
|
|
|
|
|
i require basic knowledge on Collaboration Data Objects (1.x)and Outlook Object Model.
|
|
|
|
|
Buy a textbook on it then - also try this link:
Google
A cynic is a man who, when he smells flowers, looks around for a coffin. -H.L. Mencken
|
|
|
|
|
JWood wrote: Buy a textbook on it then - also try this link:
Google
he he he!.. programmer paradise
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
And Codeproject?
|
|
|
|
|
I love how some humble some people sound when they ask for help.
I wonder how long it'll take before people start by saying "I demand ..."
--
Not a substitute for human interaction
|
|
|
|
|
What is finality of a mail(judge by a program)?
|
|
|
|
|
abruzzi wrote: What is finality of a mail(judge by a program)?
mail in what sense?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
|
You mean to check if the mail has been sucessfully sent or not?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
I write a program to receive the mail automatically,but I don't know when the mail is over and how to begin to receive the next mail
|
|
|
|
|
Hi all,
Is there anyone who developed the Audio Tuning Wizard that detects the sound system of pc. I want its source code in VC++ 6.0 on Windows OS.
Cheers!
|
|
|
|
|
Could you recommend any good C or C++ compilers on Microsoft Windows. Good as considered from factors such as cost, stability, and library available to it. Specifically, if the library contain integrators such as Runge-Kutta etc. As you can guess it, my purpose is simulation of a system that is decribed by differential equations. Thanks in advance.
|
|
|
|