|
Correct. You need to explicitly copy the base class in the copied object's derived class. The base class default constructor is called before the derived class copy constructor.
In summation, a call to the derived class copy constructor does not call the base class copy constructor. Instead, the default constructor is called in the base class.
Kuphryn
|
|
|
|
|
Wheatbread wrote:
How do I explicitly call the base class copy constructor when the derived copy constructor is called??
like this... (see upper this post)
TOXCCT >>> GEII power
|
|
|
|
|
Thanks alot man!! Something so simple just seemed to confuse me!!
-C
|
|
|
|
|
Hi, I'm using MS VC++ 6.0. I have a dialog box with 255 edit boxes, so I had to add them dynamically in the code since the editor can only handle 255 controls total. Now I have to assign them ID's so I can use UpdateData and the Message map. I gave them ID's 200-455 because that didn't conflict with anything that'd been done automatically in Resource.h. That worked fine for the Message map, but when I tried to put it in DoDataExchange it violated the assertion: no data exchange control with ID 0x%04. Does this mean that I've chosen invalid numbers to use? The numbers generated in recourse.h seem to follow a pattern, but I can't figure out what it is to mimic it. What numbers would be valid to use? Thank you.
|
|
|
|
|
brettslote wrote:
I have a dialog box with 255 edit boxes,
I hope I never have to use your software ...
The other thing, are you sure you don't have conflicting IDs ? or are you sure you're using the good IDs ? the assertion seems to think that ( from CDataExchange::PrepareCtrl )
The resource IDs are sequential, no "real" patterns; I think that the upper limit is 32767 ( or something close to that )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
Step through each statement in the DoDataExchange() function until you find the one that asserts.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
how to disable messager service?
thanks.
|
|
|
|
|
If you look at OpenSCManager() , OpenService() and ControlService() it should put you in good stead!
Ant.
|
|
|
|
|
Thanks!
schService = OpenService(
schSCManager, // SCM database
"Sample_Srv", // service name
SERVICE_ALL_ACCESS);
but what is the service name of messenger service?
sdfsdfffffffffffffffffffffffasdf
|
|
|
|
|
Messenger
Ant.
|
|
|
|
|
..Oh BTW if you are looking for service names:
1) Open RegEdit
2) Look under the registry key
HKLM\System\CurrentControlSet\Services
You will find them all listed in there.
Ant.
|
|
|
|
|
thx very much
;)
sdfsdfffffffffffffffffffffffasdf
|
|
|
|
|
Hi all,
I have a program written in Delphi that broadcats a window message.
I have manage to read this message using Delphi code using the RegisterWindowMessage function, Delphi's TApplicationEvents component OnMessage function with great succes.
Now I want to read this same message using my beloved Visual C++ code.
Where do I start?
Thanks
|
|
|
|
|
louis wrote:
Now I want to read this same message using my beloved Visual C++ code.
Just provide a message handler for the message that is being broadcast. Put the handler in between BEGIN_MESSAGE_MAP() and END_MESSAGE_MAP() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks,
I have done so. That part works.
I am still not able to update my listview with the new data. The program gives an application error.
One more question. How do I read the handle of the application.
Thanks again.
Cheers
|
|
|
|
|
louis wrote:
I am still not able to update my listview with the new data.
What does the code look like that is doing the updating?
louis wrote:
The program gives an application error.
And that error would be?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I start a process using:
PROCESS_INFORMATION ProcessInfo = {0};
STARTUPINFO StartupInfo = {0};
bResult = CreateProcess(NULL, pszCommandLine, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &ProcessInfo);
I then wait for it to finish using:
nNum = WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
After I'm sure the process has finished I use:
DWORD nExitCode=0;
GetExitCodeProcess(hProcess, &nExitCode);
The call always succeeds and on most platforms gives the correct exit code. However, on Windows 98 the exit code is always 0. No matter what the executable specified in pszCommandLine actually returns.
To test this I used a very simple Win32 console application (that just exits with an error code other than 0) as my process.
Does anyone have any ideas why GetExitCodeProcess might always give the 0 exit code on windows 98?
|
|
|
|
|
check if GetExitCodeProcess returns a nonzero value. if not, then GetLastError!
Don't try it, just do it!
|
|
|
|
|
i have added the lib file to Object/Library modules: but when i compile the project i am getting this error LNK2001: unresolved external symbol _Px_SetOutputVolume i am not sure why this is happening any ideas how i should deal with this?
thanks
|
|
|
|
|
Are you using the correct .lib file that contains Px_SetOutputVolume() ?
Have you searched MSDN for LNK2001 and all the many reasons that can cause it?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
there are many possibilities for this error, but the most common ones are these:
1. the function is not included in the lib file
2. the declaration of the function does not match with the definison by the linker
Don't try it, just do it!
|
|
|
|
|
nopes still no luck in getting it working
anyways thanks for your help guys...
anyways downloaded the library and code from
if anybody can download it from http://iaxclient.sourceforge.net/iaxcomm/iaxcomm-win-20040228.zip
and give me some tips of using it in Visual C++ i will be greatfull..
its basically a open source softphone library using IAX protocol..
the library compiles ok...i just cant seem to be able to use the library in my other projects.
Thanks
|
|
|
|
|
might be also that .lib is not included check lib path.
|
|
|
|
|
when he gave the command of using the lib, then the linker gives an error message if it doesnt find the lib.
Don't try it, just do it!
|
|
|
|