Click here to Skip to main content
15,915,094 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to create enter botton in mfc? Pin
jhwurmbach10-Sep-07 21:45
jhwurmbach10-Sep-07 21:45 
AnswerRe: How to create enter botton in mfc? Pin
Naveen10-Sep-07 21:47
Naveen10-Sep-07 21:47 
AnswerRe: How to create enter botton in mfc? Pin
Hamid_RT11-Sep-07 1:55
Hamid_RT11-Sep-07 1:55 
QuestionCEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k10-Sep-07 21:19
shir_k10-Sep-07 21:19 
AnswerRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
Naveen10-Sep-07 21:44
Naveen10-Sep-07 21:44 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k10-Sep-07 22:54
shir_k10-Sep-07 22:54 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
Naveen10-Sep-07 23:18
Naveen10-Sep-07 23:18 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k10-Sep-07 23:51
shir_k10-Sep-07 23:51 
Thanks naveen. I got it.
But one question why am not able to use above code in other functions.I want to include copy & paste function for CListCtrl,Below is a code which i got from google
In the below code am facing two problems
1)As i told CEdit* edit = m_Pressure.GetEditControl(); is always NULL
2)when i include CListCtrl& m_list4 = GetListCtrl( ); am getting below errors
D:\JUNE\VC\test1\list.cpp(147) : error C2065: 'GetListCtrl' : undeclared identifier
D:\JUNE\VC\test1\list.cpp(147) : error C2440: 'initializing' : cannot convert from 'int' to 'class CListCtrl &'

BOOL list::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if ( pMsg->message == WM_KEYDOWN )
{

CListCtrl& m_list4 = GetListCtrl( );
CEdit* edit = m_Pressure.GetEditControl();

if (edit)
{
if( GetKeyState( VK_CONTROL ))
{
if( pMsg->wParam == VK_C )
{
edit->Copy();
return TRUE;
}
if( pMsg->wParam == VK_V )
{
edit->Paste();
return TRUE;
}
if( pMsg->wParam == VK_X )
{
edit->Cut();
return TRUE;
}
if( pMsg->wParam == VK_Z )
{
edit->Undo();
return TRUE;
}
}
if( pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE ||
pMsg->wParam == VK_CONTROL || pMsg->wParam == VK_INSERT ||
pMsg->wParam == VK_SHIFT )
{
edit->SendMessage(WM_KEYDOWN, pMsg->wParam, pMsg->lParam);
return TRUE;
}
}
}

return CDialog::PreTranslateMessage(pMsg);
}
Please help me out.

Thanks
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
Naveen11-Sep-07 0:03
Naveen11-Sep-07 0:03 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k11-Sep-07 0:31
shir_k11-Sep-07 0:31 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
Naveen11-Sep-07 1:00
Naveen11-Sep-07 1:00 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k11-Sep-07 3:12
shir_k11-Sep-07 3:12 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
Naveen11-Sep-07 15:06
Naveen11-Sep-07 15:06 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k11-Sep-07 18:08
shir_k11-Sep-07 18:08 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
Naveen11-Sep-07 18:14
Naveen11-Sep-07 18:14 
GeneralRe: CEdit* pEdit = m_Pressure.GetEditControl(); is returning Null always Pin
shir_k11-Sep-07 19:14
shir_k11-Sep-07 19:14 
Questionerror message from OLEView Pin
George_George10-Sep-07 21:04
George_George10-Sep-07 21:04 
Questiontlbexp command Pin
George_George10-Sep-07 20:32
George_George10-Sep-07 20:32 
QuestionSCM: Does it handle crashing/abruptly killed services ? Pin
Yashusid10-Sep-07 20:00
Yashusid10-Sep-07 20:00 
QuestionJava Style Socket Programming in C++ Pin
maglev_tgv10-Sep-07 19:59
maglev_tgv10-Sep-07 19:59 
AnswerRe: Java Style Socket Programming in C++ Pin
baerten10-Sep-07 23:23
baerten10-Sep-07 23:23 
QuestionFinding files Pin
Waldermort10-Sep-07 19:48
Waldermort10-Sep-07 19:48 
AnswerRe: Finding files Pin
Nishad S10-Sep-07 20:01
Nishad S10-Sep-07 20:01 
GeneralRe: Finding files Pin
Waldermort10-Sep-07 23:50
Waldermort10-Sep-07 23:50 
GeneralRe: Finding files Pin
Nishad S11-Sep-07 1:39
Nishad S11-Sep-07 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.