Edit Box

This is a discussion on Edit Box within the Windows Programming forums, part of the Platform Specific Boards category; When I type something in my edit box, it shows up twice any idea why? For example if I type ...

  1. #1
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427

    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.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  2. #2
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    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.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 01:59 PM
  2. edit box
    By beene in forum Windows Programming
    Replies: 3
    Last Post: 11-11-2006, 03:40 AM
  3. edit box affecting displaying of text?
    By algi in forum Windows Programming
    Replies: 4
    Last Post: 05-04-2005, 03:28 PM
  4. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 08:34 PM
  5. display a file in dropdown edit box
    By sunburnbyRA in forum Windows Programming
    Replies: 2
    Last Post: 03-10-2004, 12:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21