Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Debugged some strange Error and Now ??? Pin
tbrake31-Oct-05 11:09
tbrake31-Oct-05 11:09 
Questionfiles Pin
Manu_8131-Oct-05 8:12
Manu_8131-Oct-05 8:12 
AnswerRe: files Pin
Mircea Puiu31-Oct-05 8:33
Mircea Puiu31-Oct-05 8:33 
GeneralRe: files Pin
Manu_8131-Oct-05 8:50
Manu_8131-Oct-05 8:50 
GeneralRe: files Pin
Mircea Puiu31-Oct-05 8:54
Mircea Puiu31-Oct-05 8:54 
GeneralRe: files Pin
Mircea Puiu31-Oct-05 8:56
Mircea Puiu31-Oct-05 8:56 
GeneralRe: files Pin
Manu_8131-Oct-05 9:23
Manu_8131-Oct-05 9:23 
QuestionRe: files Pin
David Crow31-Oct-05 9:19
David Crow31-Oct-05 9:19 
AnswerRe: files Pin
Manu_8131-Oct-05 9:28
Manu_8131-Oct-05 9:28 
GeneralRe: files Pin
David Crow31-Oct-05 10:01
David Crow31-Oct-05 10:01 
GeneralRe: files Pin
Manu_8131-Oct-05 10:52
Manu_8131-Oct-05 10:52 
GeneralRe: files Pin
David Crow31-Oct-05 10:59
David Crow31-Oct-05 10:59 
QuestionIMAP Pin
viliam31-Oct-05 7:25
viliam31-Oct-05 7:25 
QuestionRe: IMAP Pin
David Crow31-Oct-05 7:40
David Crow31-Oct-05 7:40 
AnswerRe: IMAP Pin
Mircea Puiu31-Oct-05 8:28
Mircea Puiu31-Oct-05 8:28 
QuestionQuestion on Listbox with tooltip support Pin
mckavity31-Oct-05 6:55
mckavity31-Oct-05 6:55 
AnswerRe: Question on Listbox with tooltip support Pin
Chris Losinger31-Oct-05 8:05
professionalChris Losinger31-Oct-05 8:05 
GeneralRe: Question on Listbox with tooltip support Pin
mckavity31-Oct-05 9:11
mckavity31-Oct-05 9:11 
QuestionEditBox & Enter Pin
IndrekSnt31-Oct-05 6:02
IndrekSnt31-Oct-05 6:02 
AnswerRe: EditBox & Enter Pin
Shay Harel31-Oct-05 6:11
Shay Harel31-Oct-05 6:11 
GeneralRe: EditBox & Enter Pin
IndrekSnt31-Oct-05 7:37
IndrekSnt31-Oct-05 7:37 
GeneralRe: EditBox & Enter Pin
willy_total31-Oct-05 8:41
willy_total31-Oct-05 8:41 
QuestionRe: EditBox & Enter Pin
IndrekSnt1-Nov-05 9:35
IndrekSnt1-Nov-05 9:35 
AnswerRe: EditBox & Enter Pin
willy_total2-Nov-05 3:42
willy_total2-Nov-05 3:42 
You are making this much harder than it needs to be. This is a very easy thing to code. The following code does exactly what you need. All you have to do is copy it into your code and it will work. You don't need to mess around with the create options. The reason it works is because the IDOK button will be a default button, and will be called when the return is pressed.

case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case IDOK:
{
HWND hWndChild = GetFocus();
if( hWndChild != GetDlgItem(hDlg, IDOK) )
{
if( hWndChild == GetDlgItem(hDlg, IDC_EDIT1) )
{
char szText[128];
GetWindowText(hWndChild, szText, sizeof(szText));
SetWindowText(GetDlgItem(hDlg, IDCS_TEXT), szText);
return TRUE;
}
}

EndDialog(hDlg, LOWORD(wParam));
}
return TRUE;

QuestionWav file and Avi file in one ??? Pin
REU31-Oct-05 4:53
REU31-Oct-05 4:53 

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.