-
Edit Box
When I type something in my edit box, it shows up twice any idea why? For example if I type hey it shows up as hheeyy.......
Code:
case IDOPEN:
Dialog= CreateDialog (GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_DIALOG1), hwnd, AboutDlgProc);
if(Dialog != NULL)
{
ShowWindow(Dialog, SW_SHOW); //show our new Dialog Window
}
break;
That's the code for it.
-
Fixed it I found the problem is the message loop.
Code:
I had it like this........
// Step 3: The Message Loop
while(GetMessage(&Msg, NULL, 0, 0))
{
if(!IsDialogMessage(Dialog, &Msg)) //if it's not a message for our
//Dialog window then we proccess
//the messages
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
#########################################
I guess it was handling the messages wrong.
Now I fixed it........
// Step 3: The Message Loop
while(GetMessage(&Msg, NULL, 0, 0))
{
if(!IsDialogMessage(Dialog, &Msg)) //if it's not a message for our
{ //Dialog window then we proccess
//the messages
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
}
return Msg.wParam;
Guess the messages were not being dispatched or something, I don't know.