|
Can you run MSDN individually. At the installation you have a option to combine both MSDN and Visual C++ together. If you neglect that option you have to work with them separately.
Eranga
I appreciate your help all the time...
|
|
|
|
|
You might be using newer version of MSDN, which cant be taken directly from VC6.
- NS -
|
|
|
|
|
What version of MSDN are you working with?
"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
|
|
|
|
|
The newest version of MSDN Library that still integrates with Visual Studio 6.0 is October 2001. It may still be possible to download this if you're an MSDN subscriber (although not right now as the subscriber download site doesn't seem to be working).
A very out-of-date version of MSDN Library accompanied Visual Studio 6.0 itself (labelled 'MSDN Library for Visual Studio 6.0'). However, this predates Windows 2000 and I would not recommend using it. (It was up-to-date in mid-1998 when Visual Studio 6.0 was released!)
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
I want to create a Type-Safe Array with CArray of the following structure
struct structProjectFiles {
CStringArray strDescription;
CStringArray strFiles;
DWORD dDataCode;
};
====================================================================
When I am trying to fill the array with the following code i get a C2582 error. Is there any way to overide the problem ?
//somewhere in the code
structProjectFiles pj;
pj.strDescription.Add("Hello");
pj.strFiles.Add("Files");
pj.dDataCode = 0;
m_cProjectFiles.Add(pj); -->Error afxtempl.h(443) : error C2582: 'structProjectFiles' : 'operator =' function is unavailable
Regards,
sdancer75
|
|
|
|
|
sdancer75 wrote: m_cProjectFiles.Add(pj); -->Error afxtempl.h(443) : error C2582: 'structProjectFiles' : 'operator =' function is unavailable
Look here-> http://support.microsoft.com/kb/231995[^]
Nibu thomas
MVP For VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|
|
sdancer75 wrote: m_cProjectFiles.Add(pj); -->Error afxtempl.h(443) : error C2582: 'structProjectFiles' : 'operator =' function is unavailable
You are missing a copy constructor and/or an assignment operator.
"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
|
|
|
|
|
Thank you for your reply.
Is that possible to create a constructor or assignment operator to a structure ? I agree with you when a Class is used but what about structures ? Is that possible ?
Regards,
sdancer75
|
|
|
|
|
sdancer75 wrote: Is that possible to create a constructor or assignment operator to a structure ?
Yes.
"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 all
How to display some text in a control which will automatically
adjust it's size according to length of data.
#sanroop#
|
|
|
|
|
IMHO you have to measure the text width via GetTextExtentPoint32 or similar and then resize the control according to it.
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.
|
|
|
|
|
When the text is set to your control, you can call GetTextExtent to get the size in logical units.
MoveWindow() your control appropriately.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Hi!
I have a dialog which I painted using 'OnEraseBkgnd' function. I placed a CTransparentStatic ctrl (static ctrl with TRANSPARENT BkMode). I wanted to have the same color as dialog background.
I also used:
<br />
HBRUSH CDialList::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
if( nCtlColor == CTLCOLOR_STATIC )<br />
{<br />
pDC->SetBkColor(BkClr);<br />
pDC->SetTextColor(TxtClr); <br />
}<br />
return hbr;<br />
}
Where BkClr is what I wanted for static ctrl to be painted, and TxtClr is RGB(0,0,0).
When dialog first appear the static control is not painted (it's gray) but on first text placment it gets back colored but only for text lenght, not hole rectangle!!!
I did everything and still cant get static ctrl to get all backround painted and on it's first appear?
Help please!
|
|
|
|
|
P.S.
I tough when setting controls (pDC's) BkMode to TRANSPARENT, control it self's has the color of it's dialog???
|
|
|
|
|
No...
this is for the labels you write down, if you want the to appear just the letters or the letters bounded with an square.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
I have to compare two double values upto three decimal places.
Is following logic meaningful?
double Value1, value2;
Value1 = 0.54677788888;
Value2 = 0.54700000000;
CString str1,str2;
str1.Format("%.3f",Value1);
str2.Format("%.3f",Value2);
if (str1.Compare(str2) == 0)
output-> After rounding three decimal places values are equal.
else
output-> After rounding three decimal places values are not equal.
|
|
|
|
|
Did it work for you or not?
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
|
congrats then whats the problem?
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
I need to compare with double value itself.
how do we do it?
|
|
|
|
|
oh
got it
i shall work it out and reply.
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
Sakthi_Vel wrote: how do we do it?
You can't. Floating-point values cannot be represented exactly on a binary machine. Instead, you'll have to compare the difference to some very small number. For example,
if (fabs(Value1 - Value2) < 0.000001)
"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
|
|
|
|
|
This is faster than my solution on any case, but... would it work using the function I wrote below rounding the decimals up to a Nth position?
Or will it give problems because of the internal structure of "double"?
I have just used my function to limit the numbers that had to be updated to the screen, due to place problems, not to do comparisons.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
But you are still comparing a double to 0.5 for equality.
"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
|
|
|
|
|
Sakthi_Vel wrote: CString str1,str2;
str1.Format("%.3f",Value1);
str2.Format("%.3f",Value2);
Use %.3lf for double , f is for float .
Nibu thomas
MVP For VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|