Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SendMessage does not work

SendMessage does not work

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shailesh Ha
    wrote on last edited by
    #1

    Hi , I have a embededVC code something like this: DWORD wc = WaitForMultipleObjects( sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array hObjectList, // object-handle array FALSE, // wait option (DWORD) INFINITE // time-out interval ); switch ( wc) { case WAIT_OBJECT_0: break; case WAIT_OBJECT_0 + 1: //Center button if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0) { /*hCenterState button pushed*/ ::SendMessage(hWnd,WM_TRIGGER_PULL,0,0); } break; } the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function) Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message. i cant get y it cant post the msg the second time. Any body has solution to this is most welcome with a reply. thanks in Advance:)

    J T 2 Replies Last reply
    0
    • S Shailesh Ha

      Hi , I have a embededVC code something like this: DWORD wc = WaitForMultipleObjects( sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array hObjectList, // object-handle array FALSE, // wait option (DWORD) INFINITE // time-out interval ); switch ( wc) { case WAIT_OBJECT_0: break; case WAIT_OBJECT_0 + 1: //Center button if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0) { /*hCenterState button pushed*/ ::SendMessage(hWnd,WM_TRIGGER_PULL,0,0); } break; } the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function) Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message. i cant get y it cant post the msg the second time. Any body has solution to this is most welcome with a reply. thanks in Advance:)

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #2

      Please stop reposting. Post a question once only, else people will ignore them.


      Jonathan Wilkes Darka [Xanya.net]

      1 Reply Last reply
      0
      • S Shailesh Ha

        Hi , I have a embededVC code something like this: DWORD wc = WaitForMultipleObjects( sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array hObjectList, // object-handle array FALSE, // wait option (DWORD) INFINITE // time-out interval ); switch ( wc) { case WAIT_OBJECT_0: break; case WAIT_OBJECT_0 + 1: //Center button if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0) { /*hCenterState button pushed*/ ::SendMessage(hWnd,WM_TRIGGER_PULL,0,0); } break; } the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function) Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message. i cant get y it cant post the msg the second time. Any body has solution to this is most welcome with a reply. thanks in Advance:)

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        read the Forum Posting Guidelines[^] PLEASE ! :(


        Don't know where to start ?
        Refer the Forums Guidelines and ask a friend

        [VisualCalc 3.0][Flags Beginner's Guide]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups