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. Can a function call a afx_msg function??? [modified]

Can a function call a afx_msg function??? [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 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.
  • M Offline
    M Offline
    mimimimilaw
    wrote on last edited by
    #1

    afx_msg void OnSize(UINT nID, int intWidth, int intHeight); This function to change the position of all items on a dialog. Can i call this function by another function to redraw the dialog? If not, does it have another method to re-posit all items? Thx Another Questions: How to set Picture control from invisible to visible? how to get the width and the heigth of a dialog? -- modified at 0:13 Monday 14th August, 2006

    H P 2 Replies Last reply
    0
    • M mimimimilaw

      afx_msg void OnSize(UINT nID, int intWidth, int intHeight); This function to change the position of all items on a dialog. Can i call this function by another function to redraw the dialog? If not, does it have another method to re-posit all items? Thx Another Questions: How to set Picture control from invisible to visible? how to get the width and the heigth of a dialog? -- modified at 0:13 Monday 14th August, 2006

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      (1)you want to use WM_SIZE for redraw a window (2)See ShowWindow(SW_*) (3)See GetWindowRect(...) and ScreenToClient

      _**


      **_

      WhiteSky


      M 1 Reply Last reply
      0
      • M mimimimilaw

        afx_msg void OnSize(UINT nID, int intWidth, int intHeight); This function to change the position of all items on a dialog. Can i call this function by another function to redraw the dialog? If not, does it have another method to re-posit all items? Thx Another Questions: How to set Picture control from invisible to visible? how to get the width and the heigth of a dialog? -- modified at 0:13 Monday 14th August, 2006

        P Offline
        P Offline
        prasad_som
        wrote on last edited by
        #3

        If you have handle to that window, use SendMessage()for sending message to that window. Which eventually calls OnSize on that window. i.e.

        SendMessage(hWnd,WM_SIZE,wParam,lParam);

        Prasad Notifier using ATL

        1 Reply Last reply
        0
        • H Hamid Taebi

          (1)you want to use WM_SIZE for redraw a window (2)See ShowWindow(SW_*) (3)See GetWindowRect(...) and ScreenToClient

          _**


          **_

          WhiteSky


          M Offline
          M Offline
          mimimimilaw
          wrote on last edited by
          #4

          But how to call onSize function? And also how to set the picture control to visible?? thx a lot

          H 1 Reply Last reply
          0
          • M mimimimilaw

            But how to call onSize function? And also how to set the picture control to visible?? thx a lot

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            use SendMessage(...)this method send messages to window and see WM_SIZE nWidth=LOWORD and height=HIWORD

            _**


            **_

            WhiteSky


            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