|
Thanks,
Than mean strlen get the length of CString.
Eranga
I appreciate your help all the time...
|
|
|
|
|
anyway, just a guess: i see you're coding in C++, so why not using std::string or even CString (if using MFC) ... ?
|
|
|
|
|
Actually that readString defines as CString in my code.
Eranga
I appreciate your help all the time...
|
|
|
|
|
openFile.Write(tempBuffer, amount of data you wrote to tempBuffer); Don't pass the whole buffer length when you didn't fill that much.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
Actually that what I've worried about. Couldn't find any way to define the buffer length as the length of string. Actually I tried something like this.
readString.GetLength()
Eranga
I appreciate your help all the time...
|
|
|
|
|
how can i install msdn library in vc++ 6.0 ??? I'm getting a message as "Please reinstall msdn" when i click on help.....
|
|
|
|
|
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.
|
|
|
|