Click here to Skip to main content
15,889,403 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: merging two .rc files? [modified] Pin
Kora18-Jul-06 6:42
Kora18-Jul-06 6:42 
Questionhandling the RETURN key Pin
Tara1418-Jul-06 4:08
Tara1418-Jul-06 4:08 
AnswerRe: handling the RETURN key Pin
Randor 18-Jul-06 4:38
professional Randor 18-Jul-06 4:38 
AnswerRe: handling the RETURN key Pin
David Crow18-Jul-06 4:44
David Crow18-Jul-06 4:44 
GeneralRe: handling the RETURN key [modified] Pin
Tara1418-Jul-06 4:51
Tara1418-Jul-06 4:51 
GeneralRe: handling the RETURN key Pin
David Crow18-Jul-06 5:12
David Crow18-Jul-06 5:12 
GeneralRe: handling the RETURN key Pin
Tara1418-Jul-06 5:27
Tara1418-Jul-06 5:27 
GeneralRe: handling the RETURN key Pin
stanlymt18-Jul-06 6:27
stanlymt18-Jul-06 6:27 
This is not the proper way of handling RETURN Key. If you have more than one edit box and if you want to handle RETURN in different ways for each edit box, then this method fails.
Check the below code:

BOOL CApplyValue::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message== WM_KEYDOWN && pMsg->wParam == VK_RETURN)
{
if (pMsg->hwnd == ::GetDlgItem(*this, IDC_EDIT1) //Replace with proper resource ID
{
//Do your processing for Edit box1
GetDlgItem(*this, IDC_EDIT2)->SetFocus(); //If you want to set focus to next edit box
}
else if(pMsg->hwnd == ::GetDlgItem(*this, IDC_EDIT2)
{
//Do your processing for Edit box2
}
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}

GeneralRe: handling the RETURN key Pin
Tara1418-Jul-06 8:45
Tara1418-Jul-06 8:45 
QuestionGetComputerNameEx Pin
Subramaniam s.V.18-Jul-06 3:27
Subramaniam s.V.18-Jul-06 3:27 
AnswerRe: GetComputerNameEx Pin
Parthi_Appu18-Jul-06 3:30
Parthi_Appu18-Jul-06 3:30 
GeneralRe: GetComputerNameEx Pin
Subramaniam s.V.18-Jul-06 3:34
Subramaniam s.V.18-Jul-06 3:34 
AnswerRe: GetComputerNameEx Pin
*Dreamz18-Jul-06 3:58
*Dreamz18-Jul-06 3:58 
GeneralRe: GetComputerNameEx Pin
Subramaniam s.V.18-Jul-06 4:04
Subramaniam s.V.18-Jul-06 4:04 
AnswerRe: GetComputerNameEx Pin
Hamid_RT18-Jul-06 4:38
Hamid_RT18-Jul-06 4:38 
GeneralRe: GetComputerNameEx Pin
Subramaniam s.V.18-Jul-06 4:46
Subramaniam s.V.18-Jul-06 4:46 
GeneralRe: GetComputerNameEx Pin
Hamid_RT18-Jul-06 5:08
Hamid_RT18-Jul-06 5:08 
AnswerRe: GetComputerNameEx Pin
David Crow18-Jul-06 4:39
David Crow18-Jul-06 4:39 
AnswerRe: GetComputerNameEx Pin
Eric Dahlvang18-Jul-06 6:19
Eric Dahlvang18-Jul-06 6:19 
QuestionHow to send and receive messages between two applications? Pin
ashokbngr18-Jul-06 3:06
ashokbngr18-Jul-06 3:06 
AnswerRe: How to send and receive messages between two applications? Pin
David Crow18-Jul-06 3:18
David Crow18-Jul-06 3:18 
AnswerRe: How to send and receive messages between two applications? Pin
Ali Rafiee18-Jul-06 4:56
Ali Rafiee18-Jul-06 4:56 
Questionsense the microfone? Pin
Larsson18-Jul-06 2:46
Larsson18-Jul-06 2:46 
AnswerRe: sense the microfone? Pin
David Crow18-Jul-06 2:56
David Crow18-Jul-06 2:56 
GeneralRe: sense the microfone? Pin
Larsson19-Jul-06 10:47
Larsson19-Jul-06 10:47 

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.