|
can you please guide me to change the compailer option in VS 6.0.
Thanks,
Nandu
|
|
|
|
|
Hmmm. I just started up VC6. It doesn't have an option for compiling a .C source file as C++. This option must have come later, in Visual Studio .NET or 2003.
You may have to rename your .C file to .CPP in order to get VC6 to compile it as C++.
|
|
|
|
|
Thanks, the above solution solved my problem.
|
|
|
|
|
Hi all,
Esc Button use for Close the Dialog Box.i want to remove the funcnality how can i do this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
If you are using MFC, add an OnCancel() handler to your CDialog -derived class.
|
|
|
|
|
He wants to remove the OnCancel, not to call it :P
Regards.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
It sounded like he wanted to prevent the ESC key from closing the dialog. To do that in an MFC application with a CDialog -derived dialog class, you add an empty OnCancel member function.
You can't "remove" OnCancel in any case. The CDialog window procedure is going to call it, either in your class or the base class.
|
|
|
|
|
Gary R. Wheeler wrote: It sounded like he wanted to prevent the ESC key from closing the dialog
Yes, but if you add the OnCancel () in MFC it usually comes with the return CDialog::OnCancel ()... you just said to add the OnCancel but nothing about an empty OnCancel (what you do have said now )
EDIT:
Gary R. Wheeler wrote: add an OnCancel() handler
Sorry I missread the word handler , so actually the dialog has the function in header but no code in definition, isn't it?
Regards.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Nelek wrote: so actually the dialog has the function in header but no code in definition, isn't it?
No, it is not like that. In that case, the linker will issue an unresolved external symbol error.
The OnCancel() function is a virtual function, which can be over-ridden in order to customize its behavior.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
You can add the OnCancel and insteads of return CDialog::OnCancel (); just use an empty return;
Maybe is not the best option but it should work. Other possibility should be to intercept the message loop, but I don't know for sure how to do it correctly, sorry.
Regards.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
now it is not close even with close button or close option from system menu.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
If you just want to disable the Escape button, then do it in the PreTranslateMessage() . See sample below. Now your escape keydown will not be processed. So it won't affect the behavior of cancel and close buttons.
BOOL CDialogDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN && (pMsg->wParam == VK_ESCAPE ))
{
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thats what I meant. Thanks for the answer.
Regards.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
Hello all,
I have requirement of encrypting a string in VC++ and decrypting it in ASP. so how could i accomplish this task.??
Please help me out in this situation.
Thanks & Regards,
Hemang
|
|
|
|
|
You can use crypto++ for encryption in C++. For decrypting in ASP...well ask in ASP forum
-Saurabh
|
|
|
|
|
|
Hi Friends
How to get count of columns in a CListCtrl
-RisKhan-
|
|
|
|
|
Use Header Control of CListCtrl.
For Example:
CListCtrl* pmyListCtrl;
int nColumnCount = pmyListCtrl->GetHeaderCtrl()->GetItemCount();
Mukesh Kumar
Software Engineer
|
|
|
|
|
|
And see Using the List Control[^] Matt Weagle wrote:"Everything you need to know about using the standard list control in your applications".
|
|
|
|
|
Hi all,
How can focused on ListCtrl at the time of Tabstop.
Thanks
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
When i m using Tabstop property of controls,then the cursor go to the next control on the clicking of Tab Key.
Cursor go to on all Controls like EditBox,CheckBox,Radio Button,Button etc,but the cursor not come on ListCtrl.
So plz tell me when i press the TabKey how can i focus on ListCtrl.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Good day for all.
I am a beginner in VC++. I have a question about the remote shutdown of the computers in local area network.
Server and clients are connected using WinSock - Simple Chat.
Have i a way to shutdown this computer woithout creating COM-objects ?
|
|
|
|