|
Aescleal wrote: you can actually end up with slower code if someone writes (naively):
A a = some_function( b );
as you still end up triggering the copy constructor.
Aescleal wrote: - It's assignment not copy construction (so A a = some_function() can invoke NRVO while a = some_function() won't).
Should I go sip another coffee or is there a contradiction?
Otherwise: great post! Didn't know about NRVO. You just gave me another weapon to fight multiple returns!
|
|
|
|
|
I think you can have that coffee. For NRVO to kick in, the returned value has to be created within that function.
|
|
|
|
|
Thanks, I'm better now.
My issue was with the paragraph preceding my first quote - I didn't get what was meant by 'double ended reference type of function'.
|
|
|
|
|
Good catch on the vector resizing BTW, I meant to do that and then was lured away from the computer by dinner.
Cheers,
Ash
|
|
|
|
|
Font of MyList (sub class of CListCtrl ) is changed by MyList.SetFont(...) function,
I need to do something when font is changed inside MyList, but WM_FONTCHANGE is not received by the list-ctrl.
Do you know which message responses to SetFont(...)?
|
|
|
|
|
WM_SETFONT[^]?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
Good answer, the SetFont[^] function sends a WM_SETFONT message.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
Just override the standard SetFont() function inside your CListCtrl class.
|
|
|
|
|
Hi all,
I am trying to add Edit Box on my dialog application.
I am creating a variable name as
CString m_strEdit;
through
ClassWizard->Member variables
but when i run the application some junk value is coming on editbox and when i close the application(i.e end all the dialogs)
I am getting error.
Can someone tell me,whats going on wrong
The debug error is shown below
Debug Assertion Failed!
File:dbgheap.c
Expresion:_CtrlIsValidHeapPointer(pUserData)
Thanks
Raj
|
|
|
|
|
Have you initialised m_strEdit with any valid content before you show the dialog? As to the Debug Assertion, you should try setting some breakpoints in your application and check the call stack to see where in your application the failure is likely to be.
I must get a clever new signature for 2011.
|
|
|
|
|
Hi,
I have a 2D matrix (basically an array of data) with values between 0-255 and 'm trying to do some skewing, rotation and resizing of it using gdiplus. I can use that data to display an image using gdiplus by creating a 8bit bitmap with the array as pixel data and attaching it to a gdiplus bitmap object and using that with a gdiplus graphics object. I am not sure how I can perform skew in both directions, then rotate and then resize it as per my application requirements. At the end I would like to save the bitmap that has all those transformations applied as a tiff file (or for now as bitmap).
any help is appreciated
thanks
PKNT
|
|
|
|
|
|
Hi guys!
Sorry, this is cross post, I wasn't sure where to put it and what looked like the appropriate forum hadn't had any activity in a few weeks. I've been programming professionally for 5 years, and all the companies that I've worked for in the past have had all the development tools in place before I arrived. I'm currently starting a new job, and the company wants me to develop some in house software for their use. My question is, how do I go about choosing the correct environment(VS2008, VS2008 Pro, VS2010?). Do we need MSDN licenses? What about SDK's? I know these seem like pretty basic questions, but all of the other companies I've worked for the IT department handled these issues, and I had no control over them. This is a small company, and their first attempt at software development, I don't want them to have to buy unnecessary tools, and I don't want to be halfway through a project before I realize I've missed a huge component.
[Insert Witty Sig Here]
|
|
|
|
|
This is the C++ forum, and is for posting C++ questions only! I've answered your query in the "Running a Business" forum.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Thank you, again, sorry for the cross post.
[Insert Witty Sig Here]
|
|
|
|
|
Hi all,
I am trying to paste some text from another file ,but only half of the text is comming.
I am not able to display whole text message.
How can i increase the buffer size.
Thanks
Raj
|
|
|
|
|
|
Hi,
Thanks a lott.Its working
Thanks
Raj
|
|
|
|
|
You're welcome!
|
|
|
|
|
Mark his answer as "Good Answer". I only see my vote on his post right now.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Rajesh, I see that this is a trend.
Once their problems are solved, the OPs often forget to vote.
Thank you very much for the vote and the support!
Best Regards,
Nuri
|
|
|
|
|
I think may be he don't know how to vote or may be he don't understand the value of vote.
Genuinely I was also unaware with that feature when I joined CP.
Take my 5 +
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
Yes Shilpi, you are right.
I also didn't know about the voting system at the beginning but after about a week wandering through the forums I realized how things work.
Thank you very much!
Best Regards,
Nuri
|
|
|
|
|
Hi, I want to find my pc's current os version.
I am using ::GetVersionEx(OSVERSIONINFO &osver) API to know.
But the problem is Windows 7 and Windows Server 2008 R2 have same version number i.e., 6.1
How can i find what is the exact version (Windows 7 or Server 2008 R2)?
Thanks in advance,
Regards
msr
|
|
|
|
|
Use OSVERSIONINFOEX, and check in MSDN
Link ->[^]
Windows 7 6.1 6 1 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2008 R2 6.1 6 1 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
Version of both Windows 7 and Windows Server 2008 R2 is same but wProductType is different.
I Think it will help you
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|