|
I typially provide a reasonable defualt implementation unless it is declared as pure virtual.
My reaspning is I want something known to happen. If it is overridden in a derived class, they must want 'something else' to happen.
|
|
|
|
|
Maxwell Chen wrote: To provide the default behavior of the base (as you stated), it would be compile-time binding (static binding),
How do you figure?
If a base class A has a virtual function Foo() and a derived class B implements it and I have an array of A* that point to objects that have runtime types of A or B, it will decide which version of Foo() gets called at runtime.
How is that getting away from the original intention of virtual?
|
|
|
|
|
bob16972 wrote: If a base class A has a virtual function Foo() and a derived class B implements it and I have an array of A* that point to objects that have runtime types of A or B, it will decide which version of Foo() gets called at runtime.
You are right!
Maxwell Chen
|
|
|
|
|
Hey all,
I am trying to create a dialog bar that contains a single track bar control. My problem comes with determining the proper size of the dialog bar so that it will show the entire track bar without having a bunch of extra space. Is there a way to determine the area needed to display the track bar, especially if I were to make the tick marks user selectable?
The track bar control has the TBM_GETCHANNELRECT and TBM_GETTHUMBRECT messages to get the area of the channel and thumb components of the control, but it does not have a way, that I know of, of getting the area needed for the entire control. I could take the channel rect and OR it with the thumb rect to get close, but I was wondering if there was a better way.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote: Is there a way to determine the area needed to display the track bar, especially if I were to make the tick marks user selectable?
Have you looked at GetSystemMetrics() ?
"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
|
|
|
|
|
DavidCrow wrote: Have you looked at GetSystemMetrics()?
I had, as well as at SystemParametersInfo , but I could not find what I was looking for. With GetSystemMetrics can you tell me which index (SM_) value you had in mind?
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote: With GetSystemMetrics can you tell me which index (SM_) value you had in mind?
See if SM_CXHSCROLL , SM_CYHSCROLL , SM_CXVSCROLL , and SM_CYVSCROLL produce anything useful. This is just a guess on my part, PJ.
"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
|
|
|
|
|
DavidCrow wrote: See if SM_CXHSCROLL, SM_CYHSCROLL, SM_CXVSCROLL, and SM_CYVSCROLL produce anything useful.
No good, those are only useful for scroll bars, not track bars. Thanks anyway.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
My bad. I thought track bar and scroll bar were the same thing. I now see that you are referring to a "slider control." Can you get the dimensions of the dialog bar, and then add a few to those dimensions during the creation of the track bar?
"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,
I guess that I should use IDockingWindow::ShowDW method, but how do I get
pointer to IDockingWindow ? I want to show/hide Quick Launch deskband.
thanks
Vilius
|
|
|
|
|
How many dll's can an application dynamically load in windows?
Artificial Intelligence is no match for Natural Stupidity
No one can understand the truth until he drinks of coffee's frothy goodness. ~Sheik Abd-al-Kadir
I can't always be wrong ... or can I?
|
|
|
|
|
How can I determine the real path of certain special directories:
- My Documents
- Recycle bin
- ...
- etc.
VC++6 please...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Check out SHGetFolderPath[^]
Exaple folder identifiers are:
CSIDL_PERSONAL (My documents)
CSIDL_BITBUCKET (Recycle bin)
etc.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks Mark !
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
hiiii,
I want to handle WM_NCLBUTTONUP message in my doc/view application and I don't know how to use it.Please help me how to handle it?
ss
|
|
|
|
|
The same way you handle any window messages (assuming you're using MFC doc/view)
afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
ON_WM_NCLBUTTONUP()
void CMyWndClass::OnNcLButtonUp(UINT nHitTest, CPoint point)
{
baseclass::OnNcLButtonUp(nHitTest, point);
... do stuff...
}
MArk
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
thanks for ur reply,
sorry for my delay in giving this reply.
I had done the same what you given in your reply. But i didn't get the result. WM_NCLBUTTONUP message was not called when my mouse up on the caption bar of my window.
please help me.. urgent
ss
|
|
|
|
|
I haven't tested this, but it's possible the default WM_NCLBUTTONDOWN message handler
is capturing the mouse and sitting in a modal loop until the WM_NCLBUTTONUP is
received. This would be for the default window dragging.
You may have to do the same.
Responding to just the WM_NCLBUTTONUP message is unique. What are you wanting to
do when you receive that message? Maybe there's a simpler alternative.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
dear all
after i installed vc++6.0, system showed me : setup was unable to create a DCOM user account in order to register C:\visual studio\common\tools\Vs-ent98\vanalyzr\valec.exe. so what happened? thanks a lot
zhiyuan
Li Zhiyuan
8/10/2007
|
|
|
|
|
|
dear friend
thanks, i solved this issue according to your reminder. and i have another problem. this problem is after i debugged, output showed me: "fatal error RC1015: cannot open include file 'res\DSplit.rc2'". so what heppened? thanks a lot.
Li Zhiyuan
8/12/2007
|
|
|
|
|
It looks like you're either missing a file, or the compiler can't find it. Is there a DSplit.rc2 file in a res directory within your project's directory? If not, either find the file or comment out the #include line and see what happens.
|
|
|
|
|
Hi, I am designing c++/MFC plugins for a certain CNC machine tool control system. I use (and have to use for the application VS2003, and VC++/MFC).
I am Brand new, and trying to be "self taught", but there really is no step by step beginners books (at least that I found), that teach VS2003 and VC++/MFC.
Since I am stuggling badly, would anyone perhaps around the Knoxville, TN area be willing to teach, perhaps private tutoring, I will pay if I can afford you for your time.
If it is a posibility for you could you email me at, replace the "AT" with @.
poppabear"AT"hughes.net
thanks in advance,
Scott
|
|
|
|
|
I'm working with MFC (.exe) application in VC++.
i've inserted a "form" in my application.i coloured the "form" by using the properties of the "form"...But i dnt know ,how to color the dialog containing my "form"...
can anyone help in this regard
thanks in advance...
Saravana....
|
|
|
|
|
Can you more explain? I guess you have a dialog and you want to change color of dialog,right?
|
|
|
|