Announcement

Collapse
No announcement yet.

CreateWindowEx Edit Disappearing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CreateWindowEx Edit Disappearing

    I am going back over old code and instead of DDT style I am creating my windows SDK style but I have run into an odd problem that I just can not seem to solve.

    If I create an "Edit" window via
    Code:
         hEdit = CreateWindowEx(WindowStyleEx, "Edit", BYCOPY szWindowName, WindowStyle, x, y, cx, cy, HwndDlgJog, %TxtVelocity, hInst, BYVAL %NULL)
    then my window appears, but then I found what I think is the callback is going to whatever callback the "Edit" class was registered with???

    So I tried to subclass to redirect the callback to my proc, but when I do the window disappears.

    Any ideas what message I am not handling that obviously the "Edit" callback is handling?????
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    What 'callback' ??

    That control will send WM_COMMAND/code notifications to the window/dialog procedure for 'HwndDlgJog.'

    If you subclass it, your subclass window procedure will get the opportunity to process notifications sent directly to the control , notifications normally handled "transparent to you" by the window procedure for the "edit" class.

    I think the bottom line here is
    - Your window style omitted WS_CHILD
    - Your subclass procedure is written improperly (not calling CallWindowProc?)
    - Your message loop is incorrect.
    - You have committed some other no-no somewhere in the "code not shown."

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Any ideas what message I am not handling
      The one that comes from your brain telling you to "post the source code"?

      Comment


      • #4
        You guys are probably right, but I do have to trim down to show code
        (more than likely I will find the problem myself just trimming down to show *LOL*)

        either way, I will see what I can do, I just thought maybe I was overlooking some obvious ideas (to those that know) that I may have been missing before I try to trim down.
        Engineer's Motto: If it aint broke take it apart and fix it

        "If at 1st you don't succeed... call it version 1.0"

        "Half of Programming is coding"....."The other 90% is DEBUGGING"

        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

        Comment

        Working...
        X