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. cannot change rgrc0 with wm_nccalcsize

cannot change rgrc0 with wm_nccalcsize

Scheduled Pinned Locked Moved C / C++ / MFC
18 Posts 4 Posters 1 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.
  • L Lost User

    Please edit your question and show the code you are using, and explain what happens when you run it.

    U Offline
    U Offline
    User 11770136
    wrote on last edited by
    #3

    case win.WM_NCCALCSIZE: if wParam > 0 { params := (*win.NCCALCSIZE_PARAMS)(unsafe.Pointer(lParam)) params.Rgrc[0].Top=params.Rgrc[2].Top params.Rgrc[0].Left = params.Rgrc[0].Left + 1 params.Rgrc[0].Bottom=params.Rgrc[0].Bottom-1 params.Rgrc[0].Right=params.Rgrc[0].Right-10

    V L 2 Replies Last reply
    0
    • U User 11770136

      case win.WM_NCCALCSIZE: if wParam > 0 { params := (*win.NCCALCSIZE_PARAMS)(unsafe.Pointer(lParam)) params.Rgrc[0].Top=params.Rgrc[2].Top params.Rgrc[0].Left = params.Rgrc[0].Left + 1 params.Rgrc[0].Bottom=params.Rgrc[0].Bottom-1 params.Rgrc[0].Right=params.Rgrc[0].Right-10

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #4

      And where do you handle this message?

      Member 11803607 wrote:

      if wParam > 0 { params := (*win.NCCALCSIZE_PARAMS)(unsafe.Pointer(lParam))

      What does this

      Quote:

      :=

      mean?

      U 1 Reply Last reply
      0
      • V Victor Nijegorodov

        And where do you handle this message?

        Member 11803607 wrote:

        if wParam > 0 { params := (*win.NCCALCSIZE_PARAMS)(unsafe.Pointer(lParam))

        What does this

        Quote:

        :=

        mean?

        U Offline
        U Offline
        User 11770136
        wrote on last edited by
        #5

        wm_nccalcsize Sent when use swp_framechanged in SetWindowPos ( Draw New Style ) i want to decrease the right of client rect to use drawEge in that space was made

        V 1 Reply Last reply
        0
        • U User 11770136

          wm_nccalcsize Sent when use swp_framechanged in SetWindowPos ( Draw New Style ) i want to decrease the right of client rect to use drawEge in that space was made

          V Offline
          V Offline
          Victor Nijegorodov
          wrote on last edited by
          #6

          We already know from OP what you want to decrease... However, we don't know how you are doing it. Richard MacCutchan asked you to post the code related to your problem, but you only have posted some irrelevant lines of your code. :~:confused: So sorry! :suss::cool:

          U 1 Reply Last reply
          0
          • V Victor Nijegorodov

            We already know from OP what you want to decrease... However, we don't know how you are doing it. Richard MacCutchan asked you to post the code related to your problem, but you only have posted some irrelevant lines of your code. :~:confused: So sorry! :suss::cool:

            U Offline
            U Offline
            User 11770136
            wrote on last edited by
            #7

            You imagine a window has Edit control i have to draw rectanle or Edge inside non client area of Edit Control so i have to decrease the width of clint area of edit i think and draw rectangle or Button Shape ( with drawedge api ) between windowrect.right and clientrect.right

            V 1 Reply Last reply
            0
            • U User 11770136

              You imagine a window has Edit control i have to draw rectanle or Edge inside non client area of Edit Control so i have to decrease the width of clint area of edit i think and draw rectangle or Button Shape ( with drawedge api ) between windowrect.right and clientrect.right

              V Offline
              V Offline
              Victor Nijegorodov
              wrote on last edited by
              #8

              Sorry! i cannot imagine what you meant without seeing the code you implemented for this action! X|

              U 1 Reply Last reply
              0
              • V Victor Nijegorodov

                Sorry! i cannot imagine what you meant without seeing the code you implemented for this action! X|

                U Offline
                U Offline
                User 11770136
                wrote on last edited by
                #9

                how you Draw button inside edit control (t1he right side) ? to do this i have to make some space in non client area , not client area if button draw in client area when user enter char in edit control , that area ( right side of edit control ) disappear and when move cursor outside again appears

                V 1 Reply Last reply
                0
                • U User 11770136

                  how you Draw button inside edit control (t1he right side) ? to do this i have to make some space in non client area , not client area if button draw in client area when user enter char in edit control , that area ( right side of edit control ) disappear and when move cursor outside again appears

                  V Offline
                  V Offline
                  Victor Nijegorodov
                  wrote on last edited by
                  #10

                  Member 11803607 wrote:

                  how you Draw button inside edit control (t1he right side) ?

                  I don't. I never needed it to do myself.

                  Member 11803607 wrote:

                  to do this i have to make some space in non client area not client area if button shape draw in client area when enter char in edit control that area was drawn button disappear and when move cursor outside again appears

                  What exactly are you going to achieve? What kind of "button" are you trying to insert inside an edit control and what for? :confused:

                  U 1 Reply Last reply
                  0
                  • U User 11770136

                    we want to decrease right of non client area in edit control and draw edge in that but wparam in nccalcsize return 1 only not 0 and lparam no give us rgrc0 or rgrc1 value to change it , if somebody try this please tell me its way and show the pictures to do like this

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #11

                    Take a look at the afxeditbrowsectrl.cpp file. It contains the source to CMFCEditBrowseCtrl which (I think) does exactly what you want.

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                    1 Reply Last reply
                    0
                    • V Victor Nijegorodov

                      Member 11803607 wrote:

                      how you Draw button inside edit control (t1he right side) ?

                      I don't. I never needed it to do myself.

                      Member 11803607 wrote:

                      to do this i have to make some space in non client area not client area if button shape draw in client area when enter char in edit control that area was drawn button disappear and when move cursor outside again appears

                      What exactly are you going to achieve? What kind of "button" are you trying to insert inside an edit control and what for? :confused:

                      U Offline
                      U Offline
                      User 11770136
                      wrote on last edited by
                      #12

                      i think i asked my question in wrong forum , if somebody work with api fubction maybe can help me .

                      V 1 Reply Last reply
                      0
                      • U User 11770136

                        i think i asked my question in wrong forum , if somebody work with api fubction maybe can help me .

                        V Offline
                        V Offline
                        Victor Nijegorodov
                        wrote on last edited by
                        #13

                        Member 11803607 wrote:

                        i think i asked my question in wrong forum , if somebody work with api fubction maybe can help me .

                        Then, please, rewrite your question much more clear enough to to understand what you want, need, ... and where would be the best place to ask!

                        1 Reply Last reply
                        0
                        • U User 11770136

                          case win.WM_NCCALCSIZE: if wParam > 0 { params := (*win.NCCALCSIZE_PARAMS)(unsafe.Pointer(lParam)) params.Rgrc[0].Top=params.Rgrc[2].Top params.Rgrc[0].Left = params.Rgrc[0].Left + 1 params.Rgrc[0].Bottom=params.Rgrc[0].Bottom-1 params.Rgrc[0].Right=params.Rgrc[0].Right-10

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #14

                          I do not know what that is supposed to be, but that code will not even compile.

                          D 1 Reply Last reply
                          0
                          • L Lost User

                            I do not know what that is supposed to be, but that code will not even compile.

                            D Offline
                            D Offline
                            David Crow
                            wrote on last edited by
                            #15

                            Some variant of Qt?

                            "One man's wage rise is another man's price increase." - Harold Wilson

                            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                            1 Reply Last reply
                            0
                            • U User 11770136

                              we want to decrease right of non client area in edit control and draw edge in that but wparam in nccalcsize return 1 only not 0 and lparam no give us rgrc0 or rgrc1 value to change it , if somebody try this please tell me its way and show the pictures to do like this

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #16

                              The problem is that the WM_NCCALCSIZE message with WPARAM 0, is only sent when the Window is first created. If you are subclassing the Window then you will never see that form of the message, because you cannot subclass until after it has been created.

                              U 1 Reply Last reply
                              0
                              • L Lost User

                                The problem is that the WM_NCCALCSIZE message with WPARAM 0, is only sent when the Window is first created. If you are subclassing the Window then you will never see that form of the message, because you cannot subclass until after it has been created.

                                U Offline
                                U Offline
                                User 11770136
                                wrote on last edited by
                                #17

                                Cannot Put Gif If Can Show My Problem

                                L 1 Reply Last reply
                                0
                                • U User 11770136

                                  Cannot Put Gif If Can Show My Problem

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #18

                                  I have been investigating these messages and my opinion is that it will be very difficult to achieve what you want. In order to make it work you need to adjust the client size every time the Window moves or is resized. This means keeping track of the Window (or Control) in terms of size and position, and recalculating the values that you need. And, to be honest, Windows does not really want you to do it this way, so a rethink of your design would be a better idea.

                                  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