What's wrong in having a copy c'tor in base class, too. That would take care of this.
prasad_som
Posts
-
Initializing base class data -
on button stop control transfers to a option button click codeCheck if you are duplicating button ids in any way. or using wrong message mappings.
-
Sending windows message from worker threadCWnd::PostMessage
internally calls win32::PostMessage
. I'll useCWnd::PostMessage
, if I'veCWnd
object(no need to wrap window handle, specially to use this version), and::PostMessage
, if I've window handle. -
Sending windows message from worker threadYou already got answer in earlier post. If you want to pass pointer to handle, use address of m_hHandle member variable, which is handle of CMainFrame. No need to call GetSafeHwnd.
-
Excel IssueUse second parameter of
CreateDispatch
to check what's causing it to fail. See COleDispatchDriver::CreateDispatch [^] for it's usage. -
CreateWindow / CreateWindowExdifference is,later function takes one extra parameter. Actually, CreateWindow is a macro, expanding to CreateWindowEx with NULL(no extended style) as first parameter. In effect you are using only one function.
-
visual studio 2005 fails to debug c++ program, breakpoint will never be hint, program after debug always running in background, (be found in task manager->processes)Check your build configuration. If it's been set to any non debug mode. It happens sometime.
-
files stream & iteratorsMaximilien wrote:
std::ifstream ifs("filename.txt");std::string str((std::istreambuf_iterator(ifs)), std::istreambuf_iterator());
Something like this is much faster,
std::ifstream stream("c:\\test.txt");
if (stream.good())
{
std::stringbuf buf;
stream>>&buf;
std::string str(buf.str());
stream.close();
} -
Pointerdehseth wrote:
p2 = p1;
But, why one would like to do that ? Heard of need for copy c'tor and assingment operators ? Or dangling pointers ?
-
Trying to create a Popup WindowBobInNJ wrote:
CRect rect1( 100, 200, 300, 400 ); CreateEx( 0, NULL, TEXT("Graph"), WS_OVERLAPPEDWINDOW|WS_CHILD, rect1, this, 0 );
Effectively, here you are trying to create CMyView again, where it already exists. You may want to do something like this
CRect rect1( 100, 200, 300, 400 );
m_wndYouwantotCreate.CreateEx( 0, NULL, TEXT("Graph"), WS_OVERLAPPEDWINDOW|WS_CHILD,
rect1, this, 0 ); -
Visual Studio 2008 Lost Class View of XXXview and a couple of other classes.I'm note sure, but in such cases, deleting .ncb file and other temp files from project folder does the trick.
-
Back to basics; just started learnin C++EliottA wrote:
is this compiler only for C++.Net
It can be used for unmanaged(only) code as well.
-
Calling global function causing linking error.Comp_Users wrote:
I just have the global function body in the .cpp file and including this file in places where I am calling it.
You should not include cpp file in other files. Do , what I said in my first post.
-
Calling global function causing linking error.Comp_Users wrote:
I have an .cpp file which contains a set of utility functions like TrimMyString() etc which could be called a lot of times.
I assume you have declared its prototypes in a header file, and are using it wherever that function in needed , isn't it ?
-
Folder SizeNaveen wrote:
BTW happy to see you back on codeproject.
Thanks ! And congrats for being awarded as MVP.
Naveen wrote:
What happened in between?
Changed employer, Changed country and busy with work. :)
-
Folder SizeNaveen wrote:
SizeThreadProc()
Looks like callback function. Must be adding up size of individual file in folder structure.
-
Folder SizeMPTP wrote:
there should be any API like this.
Not in my information. There needs to be a class(article) for this requirement. So you should understand there is no such API.
MPTP wrote:
As windows calculates size very fast
Have you tried class in given link ? Isn't that fast ?
-
Folder SizeCheck XFolderSize[^] from
Hans Dietrich
. -
How to read the contents of a VARIANT ?LindeA wrote:
_bstr_t s1(v1);
In addition to checks suggested by
CPallini
, I suggest to you to readVARIANT's
doucmentation. If it really contains strings, it can be used asv1.bstr
. -
Memory Leakrr_ramesh71 wrote:
// will this array get released after the function over
Yes, You don't need to worry about memory, as its been allocated on stack.