|
tom groezer wrote: Why is the destructor virtual here?
To ensure that the destructor from the most derived class will always be called.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Wouldn't it be better to do a search first?
Now, asking questions and such is perfectly fine, but I see 5 of your questions on the first page, and this one in particular, is a rather common topic.
|
|
|
|
|
Basically my question was whether virtual destructors could be used even if you do not have virtual functions in base classes. In the example that I have put I have not put any of the virtual functions.
|
|
|
|
|
The rule of thumb is that classes designed to be base classes that are used polymorphically should have virtual destructors. Classes such as yours without any virtual functions do not require a virtual destructor. Using a virtual destructor in this case wastes some bytes.
|
|
|
|
|
tom groezer wrote: Basically my question was whether virtual destructors could be used even if you do not have virtual functions in base classes.
That's all well and good, but you asked the same question here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How to get the text from the edit box of another application
|
|
|
|
|
Send it a WM_GETTEXT message.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi thx,
Can u expalin a bit more how to use this
|
|
|
|
|
You need to a handle to that window.
|
|
|
|
|
Knowing how to handle messages (both sending and receiving) is paramount in understanding the very basics of Windows development.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Has anyone ever seen the PROCESS_HEAP_ENTRY_MOVEABLE bit set in any of the heap entries encountered while walking a heap?
I have allocated some memory using GlobalAlloc(GMEM_MOVEABLE, nBlockSize);
where nBlockSize = 65 * 1024.
When I call HeapWalk and iteratively obtain the PROCESS_HEAP_ENTRY data, I never see the PROCESS_HEAP_ENTRY_MOVEABLE bit set in any of the heap entries.
I used GetProcessHeaps and separately walked each of the 3 heaps my test program has in it.
The entire reason this is an issue is that a process is only allowed 65535 GMEM_MOVEABLE allocations at one time (according to a couple Microsoft documents), and our product is reaching this limit. I want to periodically check, for QA purposes, how many handles have already been used.
|
|
|
|
|
how can I create or develop a theme like the popular themes "crystal xp" or like something else by using Visual C++ / MFC ?
WAITING eagerly for anykind of answers.Thanks in advance.
|
|
|
|
|
Does this help?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Would you please stop searching the internet, there is nothing of value there
|
|
|
|
|
If you want to do it programmatically, if you have heard of the application WindowBlinds (which skins windows), I believe that it works by injecting a DLL/multiple DLLs into every running application (including explorer.exe to skin the taskbar and start menu), which then takes over the window's window procedure, and custom draws all of the controls.. I'm not sure how much time you want to spend over your appication or how complicated you want it to be.. but I think this is probably the right way to go if you wish to do it programatically..
Hope this helps!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Does this[^] article helpful?
|
|
|
|
|
Can somebody let me know some good links to windbg tutorials.
|
|
|
|
|
Have you seen this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I know that link and is used for downloading the debugging framework.
|
|
|
|
|
So have you seen this, or this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David,
Would you mind if you use link[^] instead of link tag while posting ?
Regards,
Paresh.
|
|
|
|
|
One place where virtual destrcutors is used is in virtual functions. Is there any other place where the same is used.
|
|
|
|
|
A virtual destructor is not something that you "use" per se. They allow base/derived objects to be destroyed correctly. What exactly are you wanting to know, or trying to accomplish?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is the use of virtual destructors only limited to places where we use virtual functions?
|
|
|
|
|
No.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|