Announcement

Collapse
No announcement yet.

Getmessage question

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

  • BOB MECHLER
    replied
    Thanks, Chris for the example.

    Bob Mechler

    Leave a comment:


  • Kev Peel
    replied
    I concur with the point of leaving it alone (the message loop), unless you have some funky special-needs app.

    There are a multitude of methods to obtain keystrokes: a few are subclassing, superclassing, using a custom control, or keyboard accelerators (see ACCEL in PB help).

    Leave a comment:


  • Chris Boss
    replied
    Message Watch Utility

    Bob,

    Check this out in the source code forum.

    I wrote a quick app that allows you to see what messages are being sent through the message loop versus to the dialog procedure directly.

    http://www.powerbasic.com/support/pb...173#post315173

    Leave a comment:


  • Michael Mattias
    replied
    I never trap messages in the message loop; I trap them at the destination window.

    If you want a 'system wide' or even a 'thread' thing, you can look at hooks.

    I don't avoid this for any technical reason, I do it for maitenance purposes: the message loop is the message loop is the message loop.

    In your case (" the %WM_KEY,%WM_KEYDOWN,%WM_CHAR are messages that can be trapped here for the control with input focus"), "subclassing" is the LED which turns on when I need to do this.

    YMMV.

    Leave a comment:


  • BOB MECHLER
    started a topic Getmessage question

    Getmessage question

    Code:
      While GetMessage(Msg,%NULL,0,0)
        Call TranslateMessage(Msg)
        Call DispatchMessage(Msg)
      Wend
    I understand the %WM_KEY,%WM_KEYDOWN,%WM_CHAR are messages that can be trapped here for the control with input focus, but I was wondering what other messages or what other ways of structuring this message loop people have found useful.

    Bob Mechler
Working...
X