Thread: Subclassed edit not doing what it's supposed to

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Do you get any msgs in the ExpInputWndProc()?

    try....

    setting the edit to a child of the listview

    and/or...

    Ensure that all the child controls of the main window have different ID numbers by setting the HMENU param in the create to an int.

    MSDN on CreateWindow()
    "For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window."

    (Could be that the LV and edit (and TAB ect) all have the ID number NULL (and same parent) and are so conflicting.)


    I also process WM_KILLFOCUS msgs and set the edited LV item to 'selected', destroy the edit and return focus to the LV.

    On create I use SendMessage() with WM_SETTEXT (and EM_SETSEL 0,-1), then with the edits hwnd ShowWindow(), UpdateWindow() and SetFocus()



    EDIT: I have working code for exactly this in MFC and WIN32 C. The number of controls 'stacked' on top of each other is not a problem.
    Let me know if you are still having problems.
    Last edited by novacain; 01-18-2005 at 01:50 AM.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multiline Edit Box Parser
    By The Brain in forum Windows Programming
    Replies: 6
    Last Post: 11-01-2005, 07:15 PM
  2. Replies: 3
    Last Post: 07-23-2005, 08:00 AM
  3. Capture Enter key press in EDIT Box
    By richiev in forum Windows Programming
    Replies: 4
    Last Post: 07-14-2005, 12:03 AM
  4. edit controls
    By ZerOrDie in forum Windows Programming
    Replies: 11
    Last Post: 04-08-2003, 12:09 PM
  5. Difficulty superclassing EDIT window class
    By cDir in forum Windows Programming
    Replies: 7
    Last Post: 02-21-2002, 05:06 PM