Thread: WM_CHAR problems

  1. #16
    HelpingYouHelpUsHelpUsAll
    Join Date
    Dec 2007
    Location
    In your nightmares
    Posts
    223
    Quote Originally Posted by Yarin View Post
    You should call the old wnd proc not the def wnd proc.
    I am assuming you mean to use this in the NewWndProc:
    Code:
    default:
        return CallWindowProc(OldWndProc, hwnd, msg, wParam, lParam);
    Surprisingly, this works (the edit field is type-able and the new/load/save buttons work) in Dev-C++, but not in lccWin32. Thanks Yarin.
    The problem I have now is that typing in the edit field does not trigger WM_CHAR messages, which is the reason that I had to subclass the edit field in the first place.

    /***FIXED**
    Now I just have the strange problem that, when resizing the window, the edit field covers the status bar, along with it not being docked to the top and right hand side of the window. */
    This does the trick:
    Code:
    SetWindowPos(GetDlgItem(hwnd, IDC_MAIN_STATUS), NULL, 0, rcClient.bottom - iStatusHeight, 
        rcClient.right, iStatusHeight, SWP_NOZORDER);
    Last edited by P4R4N01D; 04-24-2008 at 01:16 AM. Reason: Fixed Status Bar
    long time no C; //seige
    You miss 100% of the people you don't C;
    Code:
    if (language != LANG_C && language != LANG_CPP)
        drown(language);

  2. #17
    HelpingYouHelpUsHelpUsAll
    Join Date
    Dec 2007
    Location
    In your nightmares
    Posts
    223

    Smile Solved

    Turns out that it was generating WM_CHAR and WM_KEYDOWN messages, the problem was that I forgot to use:
    Code:
    GetLines(GetParent(hwnd)) //instead of GetLines(hwnd)
    Thanks for all your help, I never had needed to subclass before so that cleared a few things up. Also, I am going to use Dev-C++ more often and I still think there should be just one compiler that does everything.
    long time no C; //seige
    You miss 100% of the people you don't C;
    Code:
    if (language != LANG_C && language != LANG_CPP)
        drown(language);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  4. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  5. DJGPP problems
    By stormswift in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 04:35 PM