|
It didn't compile..Shows error as:
error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'"
see declaration of 'CObject::operator ='
see declaration of 'CObject'
This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
This error is coming only when i compile in VS2005.In VC6 it is not coming!
|
|
|
|
|
sheetal_06 wrote: This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
Where are you using a CPtrArray? I haven't seen that in your code so far.
Are you trying to assign one array to another with the = operator?
|
|
|
|
|
CPtrArray is a compiler generated function..
I am trying to copy the contents of one pointer into another...
|
|
|
|
|
Ok. In order for a CPtrArray to be copied, the objects in the array need to be copyable.
The assignment operator isn't virtual which is why your code didn't compile.
If copying CSpanLoad objects then the CSpanLoad class needs to have an assignment operator, even
if it is derived from a class which has an assignment operator defined.
Mark
|
|
|
|
|
hi all,
i want to create a user friendly interface for other MS products the question is that VB.NET sends string value and C++ APIs require char*
project consist of VB application -> C# class library -> C++ class library(managed)
Now, when i create a function which accepts char* it raises error cannot convert string to char*
and when i change the function to System::String it is pain to convert it to char* can any one please tell me how to make it work
Thanks!
Shahzeb
|
|
|
|
|
this is a question for the C++/CLI forum[^]. please move your post consequently
|
|
|
|
|
How to get complete path successfully as command line
I have added keys TestCommandLine.exe %L to HKEY_CLASSES_ROOT -> Folder so that on right click the folder path will be passed as command line and use cout<< arg[1] to display command line from TestCommandLine.exe. This path truncated whenever there is space in the path.
For example: If i right click and select the menu @ C:\System\New Folder
The program prints upto C:\System\New. Parts after space ignored
How to solve this?
Thanks
Anil
|
|
|
|
|
The space is a delimiter. To get around this, you need to put the argument in quotes
TestCommandLine.exe "%L"
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thank you
|
|
|
|
|
Can sm one tell me which on is better from the programmer's point of view, using SIP or H.323 or the combination of these, considerig feasibility aspect in wireless communication?
sumit
|
|
|
|
|
Choose a forum, and ask there. Don't spam the site
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Do you have a brain? Incase not, it is the thing inside your head that is supposed to assist you in determining what is pathetic and what is not. But since you are determined to have no name, I would point to the latter, IF you know know what that means.
Please stop spamming the site and give your account a real name!
|
|
|
|
|
|
Hello,
I am working with MFC and I have a derived class CWnd that contain mutiple CCombox. I do not understand wath happend wenn I hide the CWnd I have looked into OnShowWindow from the combobox and it come never there but wenn I hide the CWnd the combobox are also hided.
I use the scroll fonctionality to move all Combobox wenn the is more as the CWnd height. Wenn the scroll position as changeg I Redraw all Combobox with MoveWindow(new position) and I Invalidate the rectangle from the CWnd. All combobox are redraw but the CWnd do not refresh or clean totaly the screen and some combobox are present in the screen but not any more existing.
Combobox create like:
this is the CWnd
Create(WS_CHILD|WS_VISIBLE|WS_VSCROLL|CBS_DROPDOWNLIST,CRect(0,0,200,30), this, i*100);
What happend with child window and what I try to fix my problem.
Thank you
AutreChien
|
|
|
|
|
And your problem is ComboBox or CWnd you change location of Comboboxs wih MoveWindow and it seems that its correct,whats problem now
|
|
|
|
|
Hello,
I have found the problem but I do not understand. I have just hadded yesturday with the wizard from VS2005 a afx message from ON_WM_PAINT() to see if the OnPaint() was called.
Now I have remove this fonction and it's work!!!
I do not understand what I am doing wrong because I do not change anythink into this fonction:
void CWndStepEditor::OnPaint()
{
CPaintDC dc(this); // device context for painting
TRACE("CPaintDC dc(this); // device context for painting\n");
// TODO: Add your message handler code here
// Do not call CWnd::OnPaint() for painting messages
}
?? What happend when I add this fonction in a class !
AutreChien
|
|
|
|
|
Hi
I am starting apache.exe with CreateProcess API.Parent and Child process are getting created in task manager . When I am trying kill apache with TerminateProcess(Process handler) only one apache process is getting killed.
Could any one explain this ? Is there any solution to kill the second one too.
Thanks and Regards,
Venkata
-- modified at 5:25 Thursday 1st February, 2007
|
|
|
|
|
If you request a process to shutdown, never mind the way to do it at this point, that process is the only one that is going to be ended. If you'd like other processes as well to be shutdown, you'd have to request them to end respectively.
Once a process is created it lives its own life independant on what process created it, i.e. if the "parent" process is killed the "child" process continues to run unless the "parent" process is designed to explicitly kill its "child" processes.
You should not use ::TerminateProcess() .
You can read about the reasons here[^].
What you should do is post a WM_CLOSE message to the main thread, or window, of the process you want to kill. You can simply save the thread handle that you were given when you created the process in the PROCESS_INFORMATION argument. More info here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Used of FindWindow to retrives handle to window and then send WM_CLOSE to it
|
|
|
|
|
Hi,
Thanks for the Reply.
My application wont create any windows .. it is a service which will invoke list of exes with create process . It has to terminate all the process when we stop service.
Problem comes only with Apache ..its not killing the parent process.
Do you know any API which takes ProcessID as input and kills the process ?
|
|
|
|
|
If you have ProcessID you can use of OpenProcess for get a handle to process and use of TerminateProcess
|
|
|
|
|
Can u pls tell me what happens if we ignore the token name in the macro
ex:
#define dfg
Thanks in advance.
|
|
|
|
|
Here, what the Token name means???
Come online at:-
jubinc@skype
|
|
|
|
|
It means that you've created a definition without a value. This would be used, for example, as a check if a piece of code has been compiled before, the common example is inclusion guards like
#ifndef blah
#define blah
class blah
{
}
#endif
This will compile blah the first time, and the #ifndef will fail every other time, as blah has been #defined
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello Everybody,
I have face one problem to display list control in vc++ / mfc.
How to set different width for each sub item of list control in mfc / vc++
I want to show list control's sub items in following manner
______________________
|Heading1 |
|_____________________|
|Subject |
|_____________________|
|SubItem1 | SubItem2 |
|__________|__________|
If my problem is not possible then please give me another suggestion to display list sub item in list control.
"How to merge list control columns in MFC ?"
I think another solution of this problem by putting another list control inside sub item of upper level list control. Then one problem is face of handling event of inner list control. Because, I am want to handle user click event of Sub Item.
If it is possible then give me quick help.
Thank you
Punita Pandya
|
|
|
|