Drawing edit control

This is a discussion on Drawing edit control within the Windows Programming forums, part of the Platform Specific Boards category; I've created an edit control using CreateWindowEx. I want to capture keypresses, and send them to the parent. When i ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    329

    Drawing edit control

    I've created an edit control using CreateWindowEx. I want to capture keypresses, and send them to the parent.
    When i check the input to the WM_COMMAND case in WndProc in the parent window, i don't receive anything when i press Esc, enter, etc...
    How can i accomplish this, am i on the wrong direction here?

    Code:
    if((retVal=CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", achTxt, WS_CHILD|WS_TABSTOP, x, y, w, h, hwParent, NULL, hInstance, NULL))!=NULL){
    		ShowWindow(retVal, SW_SHOW); 		return(retVal);
    	}else
    		return(0);

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    I tried this right after creation, but this makes the box appeaer grayed.
    Can i filter messages from the edit control, and send the messages i don't need back to the edit control's wndproc by using callWndProc?

    Code:
    if((lWndProc=GetWindowLong(mS->txtPNr, GWL_WNDPROC))){
      SetWindowLong(mS->txtPNr, GWL_WNDPROC, GetWindowLong(mS->hWnd, GWL_WNDPROC));
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. edit control text buffer
    By scurvydog in forum Windows Programming
    Replies: 4
    Last Post: 12-11-2008, 09:13 AM
  2. Edit control template
    By BobS0327 in forum Windows Programming
    Replies: 3
    Last Post: 04-08-2005, 12:10 PM
  3. How can I send a text string to an edit control
    By marc74 in forum Windows Programming
    Replies: 5
    Last Post: 01-06-2005, 09:14 PM
  4. endless edit control
    By ZerOrDie in forum Windows Programming
    Replies: 3
    Last Post: 03-21-2003, 01:51 AM
  5. Keeping focus on an edit control ...
    By Unregistered in forum Windows Programming
    Replies: 3
    Last Post: 02-19-2002, 01:12 AM

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