Results 1 to 2 of 2

Thread: Dialog Control, Textboxes

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Okinawa, Japan
    Posts
    271

    Dialog Control, Textboxes

    Kinda 2 part question.

    I was trying to handle an event for when left button is clicked on textbox in a dialog callback proc, how exacelty is this done, do I wait for the message WM_LBUTTONUP or something.
    Also So given
    BOOL CALLBACK HandleEventsHelper(HWND dhwnd,UINT message, WPARAM wParam, LPARAM lParam)

    I pretty much understand what is sent in the UINT and WPARAM. So my question is what is sent in the LPARAM when clicking on textbox control. I cant find any documentation on this. Is it just garbage?



    thanks

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    1) You'll probably have to subclass the edit control to intercept it's WM_LBUTTONUP message. The dialog procedure never receives it. A good starting point for learning about subclassing is the CallWindowProc function in MSDN.

    2) The UINT parameter is the message id. Depending on the message the WPARAM and LPARAM parameters contain additional information. What this information is is specified in the documentation of the message. e.g. for WM_COMMAND (and therefore all notification messages) the high-order word (the upper 16 bit) of wParam are the notification code (e.g. EN_CHANGE) and the low-order word is the control id. lParam is the HWND of the control.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width