Announcement

Collapse
No announcement yet.

Border Details

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

  • Border Details

    I just noticed #3 ...

    1. %WS_Popup gives no border

    2. %WS_Popup or %WS_Border gives a small border

    3. %WS_Popup or %WS_ThickFrame not only gives a small border, but Win10 provides that "fuzzy" border as well. This also has a tiny caption across the top.

    I wonder if I can get the fuzzy border without the tiny caption?

  • #2
    I get the same thing with #2 and # 3, no fuzzy border that I can detect. PBWin 10 on Win 10.
    Rod
    I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

    Comment


    • #3
      Howdy, Rodney!

      The fuzzy border is given to most any window. For example, open the PB IDE and put it over a light colored background. Do you see the fuzzy border ... black fading to nothing ?

      Comment


      • #4
        No, I don't see that at all. But if I recall correctly, when I installed Win 10 I chose the least annoying visual arrangement so it may only apply to certain choices.
        Rod
        I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

        Comment


        • #5
          ISTR some of the DDT commands for location of dialogs took the coordinates passed and used themt for the location of the CLIENT area... or maybe there was an assumption on the style of dialog mused for calculating the border widths and other styles could throw things off a couple of pixels. .

          Something like that. Unless my memory is faulty... which is quite possible these days.

          My other excuse is, "I'm not a DDT guy.:"

          MCM
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            Originally posted by Gary Beene View Post
            I just noticed #3 ...

            1. %WS_Popup gives no border

            2. %WS_Popup or %WS_Border gives a small border

            3. %WS_Popup or %WS_ThickFrame not only gives a small border, but Win10 provides that "fuzzy" border as well. This also has a tiny caption across the top.

            I wonder if I can get the fuzzy border without the tiny caption?
            Hi Gary,

            The pale strip at the top is not a caption - rather I think it is Windows10's way of marking the dialog as resizable.

            Rod,

            The setting that you may have unchecked is in:
            Advanced system settings / Performance - Settings.. / Visual Effects / Show shadows under windows.
            It can also be set programatically..
            Code:
            #DIM ALL
            #COMPILE EXE
            #INCLUDE "WIN32API.INC"
             
            FUNCTION PBMAIN
             SetProcessDPIAware()
             LOCAL hDlg AS DWORD
             
              DIALOG NEW 0, "Dialog Test", , , 150, 50, %WS_POPUP OR %WS_THICKFRAME TO hDlg
                CONTROL ADD BUTTON, hDlg, %IDCANCEL, "Esc", 95, 32, 50, 14
              DIALOG SHOW MODAL hDlg CALL DlgProc
             
            END FUNCTION
            '------------------/PBMain
             
            CALLBACK FUNCTION DlgProc() AS LONG
              SELECT CASE AS LONG CB.MSG
               STATIC UsrPref AS LONG
                CASE %WM_INITDIALOG
                  SystemParametersInfo (%SPI_GETDROPSHADOW, 0,UsrPref,0)
                  SystemParametersInfo (%SPI_SETDROPSHADOW, 0, BYVAL(UsrPref XOR 1), 0)
                  DIALOG POST CB.HNDL, %WM_App,0,0
             
                CASE %WM_App
                  DIALOG REDRAW CB.HNDL
                  SLEEP 3000
                  SystemParametersInfo (%SPI_SETDROPSHADOW, 0, BYVAL UsrPref, 0)
                  Dialog Redraw Cb.Hndl
             
                CASE %WM_NCHITTEST
                    IF DefWindowProc(Cb.Hndl, Cb.Msg, Cb.wParam, Cb.lParam) = %HTCLIENT THEN
                      FUNCTION = %HTCAPTION: EXIT FUNCTION     ' Drag Dialog
                    END IF
                
                CASE %WM_COMMAND
                  IF Cb.Ctl = %IDCANCEL THEN DIALOG END CB.HNDL, 0
              END SELECT
             
            END FUNCTION
            '------------------/DlgProc
            Rgds, Dave

            Comment


            • #7
              Why not using the CS_DROPSHADOW style, or a skin engine...
              Patrice Terrier
              www.zapsolution.com
              www.objreader.com
              Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

              Comment


              • #8
                Hello Dave, regarding your post #6 , I w'd need to know more

                the below codes seems to clear off the shadow in the border in Win 10
                and making the border real thin? is this assumption correct?
                Code:
                  SystemParametersInfo (%SPI_GETDROPSHADOW, 0,UsrPref,0)
                  SystemParametersInfo (%SPI_SETDROPSHADOW, 0, BYVAL(UsrPref XOR 1), 0)


                then what's the purpose of these below codes, is it for dragging the dialog
                but without these codes, we can still able to drag the dialog around the screen?
                Code:
                CASE %WM_NCHITTEST
                        IF DefWindowProc(Cb.Hndl, Cb.Msg, Cb.wParam, Cb.lParam) = %HTCLIENT THEN
                          FUNCTION = %HTCAPTION: EXIT FUNCTION     ' Drag Dialog
                        END IF

                Comment


                • #9
                  Tim,

                  That's easy code to experiment with. Try commenting out lines to see the effect. Check the API functions in MSDN.

                  The %WM_NCHITTEST code allows the user to drag the window to new positions. Without it the dialog cannot be moved (no caption bar to drag with
                  %WS_POPUP OR %WS_THICKFRAME style).
                  Rgds, Dave

                  Comment


                  • #10
                    Thank you Sir Biggs

                    Comment

                    Working...
                    X