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. How to send message to frame window ?

How to send message to frame window ?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
6 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.
  • A Offline
    A Offline
    Alek
    wrote on last edited by
    #1

    I wnat to send message to every active windows but I got a problem. If the window with child frame(like Word, Excel...etc.), it seems not to get the message which I send. Maybe it's useful to get every frames' handle and send message to every frame. Does anyone know how to get every handles of frames ?

    S 1 Reply Last reply
    0
    • A Alek

      I wnat to send message to every active windows but I got a problem. If the window with child frame(like Word, Excel...etc.), it seems not to get the message which I send. Maybe it's useful to get every frames' handle and send message to every frame. Does anyone know how to get every handles of frames ?

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2
      1. what message are you sending? 2) how are you currently sending it to all windows? 3) (prolly related to #1) how do you know they are not recieving the message?

      - Shog9 -

      Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage :bob:

      A 1 Reply Last reply
      0
      • S Shog9 0
        1. what message are you sending? 2) how are you currently sending it to all windows? 3) (prolly related to #1) how do you know they are not recieving the message?

        - Shog9 -

        Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage :bob:

        A Offline
        A Offline
        Alek
        wrote on last edited by
        #3

        All I want is to change the scroll lines number. I used SystemParameterInfo(SPI_SETWHEELSCROLLLINES,...) to change the scroll lines number but in the frame windows(like Word, Excel..etc), and then I send a WM_SETTINGCHANG message to system-wide windows. 'SendMessage(HWND_BROADCAST, WM_SETTINGCHANG, 0, 0)' But only in frame windows that this parameter don't work. What should I do?

        S 1 Reply Last reply
        0
        • A Alek

          All I want is to change the scroll lines number. I used SystemParameterInfo(SPI_SETWHEELSCROLLLINES,...) to change the scroll lines number but in the frame windows(like Word, Excel..etc), and then I send a WM_SETTINGCHANG message to system-wide windows. 'SendMessage(HWND_BROADCAST, WM_SETTINGCHANG, 0, 0)' But only in frame windows that this parameter don't work. What should I do?

          S Offline
          S Offline
          shog9
          wrote on last edited by
          #4

          First, i'm not certain that Office applications actually use this setting. I seem to remember at least Office '97 being a bit strange about handling the mouse wheel. What version of Office are you testing with? Second, you should be able to use the SPIF_SENDCHANGE flag when calling SystemParametersInfo() to automatically send WM_SETTINGCHANGE to all windows.

          - Shog9 -

          Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage :bob:

          A 1 Reply Last reply
          0
          • S shog9

            First, i'm not certain that Office applications actually use this setting. I seem to remember at least Office '97 being a bit strange about handling the mouse wheel. What version of Office are you testing with? Second, you should be able to use the SPIF_SENDCHANGE flag when calling SystemParametersInfo() to automatically send WM_SETTINGCHANGE to all windows.

            - Shog9 -

            Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage :bob:

            A Offline
            A Offline
            Alek
            wrote on last edited by
            #5

            Thanks for your help. I tested with Offce 'XP in Win98. It's really a little strange about the mouse wheel. I set 10 line per rotation but it does not work immediately only in the windows with frame windows(like Word, Excel..). In Explorer or Notepad, it works. If I close Word and launch agagin, this setting works. By the way, do you know 'SPI_SETSNAPTODEFBUTTON' parameter within SystemParametersInfo(). It seems not work in Win98. My code is : SystemParametersInfo(SPI_SETSNAPTODEFBUTTON, true, NULL, NULL)

            S 1 Reply Last reply
            0
            • A Alek

              Thanks for your help. I tested with Offce 'XP in Win98. It's really a little strange about the mouse wheel. I set 10 line per rotation but it does not work immediately only in the windows with frame windows(like Word, Excel..). In Explorer or Notepad, it works. If I close Word and launch agagin, this setting works. By the way, do you know 'SPI_SETSNAPTODEFBUTTON' parameter within SystemParametersInfo(). It seems not work in Win98. My code is : SystemParametersInfo(SPI_SETSNAPTODEFBUTTON, true, NULL, NULL)

              S Offline
              S Offline
              Shog9 0
              wrote on last edited by
              #6

              Alek wrote: My code is Once again, you may wish to try adding the SPIF_SENDCHANGE flag to the last parameter. I've never tried it though, so it could just be a bug in Win98.

              - Shog9 -

              Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage :bob:

              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