Announcement

Collapse
No announcement yet.

Dialog doesn't horizontal scroll

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

  • Dialog doesn't horizontal scroll

    The dialog draws wide but doesn't scroll horizontally. Am really puzzled.

    '
    Code:
    'PBWIN 9.01 - WinApi 05/2008 - XP Pro SP3
    #Dim All 
    #Compile Exe  
    #Include "WIN32API.INC"
    #Include "COMDLG32.INC"
    #Include "InitCtrl.inc"
    '
    Global hdlg As Dword                
    %Id_Exit_Btn = 1000
    %Id_Sample_Textbox = 1001
    %Id_Show_Result_Btn = 1002
    ' 
    Macro Common_Locals 'Macro easier than retyping and maintains coding consistency
      Global Stile, Dlg_hght, Dlg_Wd As Long 'Global in case want to use in Controls
      Local Row, col, hght, wd, Longest,ctr, ln, ln1, i As Long
      Local  l, s As String
    End Macro  
    '
    CallBack Function Dialog_Processor              
      Common_Locals
      Select Case CbMsg     'This is TO determine the message TYPE 
         '       
         Case %WM_INITDIALOG'<- Initialiaton when the program loads 
         '
         Case %WM_SYSCOMMAND 'Traps Any Alt key but only F4 closes              
         '
         Case %WM_COMMAND  'This processes command messages
           Select Case CbCtl
             Case %Id_Show_Result_Btn 
                Control Get Text CbHndl, %Id_Sample_Textbox To l$
                  ? l$, , FuncName$
             Case %Id_Exit_Btn
               Select Case CbCtlMsg        
                  Case 0
                    Dialog End CbHndl 'Applikation beenden
               End Select
           End Select
      End Select
    End Function
    '
    Function PBMain
      Common_Locals
      Desktop Get Size To Dlg_Wd, Dlg_Hght
      Dlg_Hght = Dlg_Hght - 100 'plenty room for taskbar 
      Dlg_Wd = Dlg_Wd * 2 'wider than screen 
       Stile = Stile Or %WS_CAPTION
       Stile = Stile Or %WS_SYSMENU
       Stile = Stile Or %WS_THICKFRAME 
       Stile = Stile Or %WM_HELP 
       Stile = Stile Or %WS_Border  'doesn't do anything
       Stile = Stile Or %WS_HSCROLL     
      Dialog New Pixels, hdlg, "Demo", 0, 0, Dlg_Wd, Dlg_Hght, Stile To hdlg 'centered
      Row = 0
      col = 0
      Wd = 40
      Hght = 12
      Control Add Label, hdlg, -1, " Name & Address ", Col, Row, Wd, Hght
      
      s$ = "Hagstrom, Borje" & $CrLf & _
           "123 PBWin Avenue" & $CrLf & _
           "PowerBasic, FL 12345"
             
      Col = Col + Wd + 10 'just past label 
      Hght = 15 * 10 'Plenty room for 10 lines of text
      Wd = Dlg_Wd - 40 - 30 'minus the label and leave a little
      Control Add TextBox, hdlg, %Id_Sample_Textbox, s$, Col, Row, Wd, Hght, %ES_WantReturn Or %ES_MultiLine
       hght = 25   
       Wd = Dlg_Wd - 20
       Col = 10 'center
       Row = Dlg_hght - (Hght * 2) - 4 
         Control Add Button, hdlg, %Id_Show_Result_Btn, "Show Textbox Results", col, row, Wd, Hght
       Row = Dlg_hght - Hght - 2 'Just off bottom
         Control Add Button, hdlg, %Id_Exit_Btn, "Abandon Ship", col, row, Wd, Hght
      
         Dialog Show Modal hDlg   Call Dialog_Processor
    End Function  'Applikation beenden
    '
    ====================================
    "The right to swing my fist ends
    where the other man's nose begins."
    Oliver Wendell Holmes (1841-1935)
    ====================================
    It's a pretty day. I hope you enjoy it.

    Gösta

    JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
    LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

  • #2
    Adding scrollbars to a Dialog do not automatically impliment scrolling of its client area.You have to process the WM_HSCROLL message to impliment the scrollbar itself and then in that code move all the controls via code yourself.
    Chris Boss
    Computer Workshop
    Developer of "EZGUI"
    http://cwsof.com
    http://twitter.com/EZGUIProGuy

    Comment


    • #3
      Gösta
      The following I found in the fora quite some time ago, don't know who provided it, and it shows the necessary processing.
      Code:
      #PBFORMS CREATED V1.51
      '--------------------------------------------------------------------------------------------------
      ' The first line in this file is a PB/Forms metastatement.
      ' It should ALWAYS be the first line of the file. Other
      ' PB/Forms metastatements are placed at the beginning and
      ' end of "Named Blocks" of code that should be edited
      ' with PBForms only. Do not manually edit or delete these
      ' metastatements or PB/Forms will not be able to reread
      ' the file correctly.  See the PB/Forms documentation for
      ' more information.
      ' Named blocks begin like this:    #PBFORMS BEGIN ...
      ' Named blocks end like this:      #PBFORMS END ...
      ' Other PB/Forms metastatements such as:
      '     #PBFORMS DECLARATIONS
      ' are used by PB/Forms to insert additional code.
      ' Feel free to make changes anywhere else in the file.
      '--------------------------------------------------------------------------------------------------
      
      #COMPILE EXE
      #DIM ALL
      
      '--------------------------------------------------------------------------------------------------
      '   ** Includes **
      '--------------------------------------------------------------------------------------------------
      #PBFORMS BEGIN INCLUDES 
      #IF NOT %DEF(%WINAPI)
        #INCLUDE "WIN32API.INC"
      #ENDIF
      #PBFORMS END INCLUDES
      '--------------------------------------------------------------------------------------------------
      
      '--------------------------------------------------------------------------------------------------
      '   ** Constants **
      '--------------------------------------------------------------------------------------------------
      #PBFORMS BEGIN CONSTANTS 
      %IDD_DIALOG1 =  101
      %IDC_LABEL1  = 1001
      %IDC_LABEL2  = 1002
      %IDC_LABEL3  = 1003
      %IDC_HELPME  = 1004
      #PBFORMS END CONSTANTS
      '--------------------------------------------------------------------------------------------------
      
      '--------------------------------------------------------------------------------------------------
      '   ** Declarations **
      '--------------------------------------------------------------------------------------------------
      DECLARE CALLBACK FUNCTION ShowDIALOG1Proc()
      DECLARE FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
      #PBFORMS DECLARATIONS
      '--------------------------------------------------------------------------------------------------
      
      '--------------------------------------------------------------------------------------------------
      '   ** Main Application Entry Point **
      '--------------------------------------------------------------------------------------------------
      FUNCTION PBMAIN()
        ShowDIALOG1 %HWND_DESKTOP
      END FUNCTION
      '--------------------------------------------------------------------------------------------------
      
      '--------------------------------------------------------------------------------------------------
      '   ** CallBacks **
      '--------------------------------------------------------------------------------------------------
      CALLBACK FUNCTION ShowDIALOG1Proc()
        LOCAL w AS LONG, h AS LONG, oldPos AS LONG, si AS SCROLLINFO
        LOCAL vt AS LONG, ht AS LONG, hs AS LONG, vs AS LONG
        w=600
        h=400
        vt=50
        ht=50
        hs=5
        vs=5
        SELECT CASE AS LONG CBMSG
          CASE %WM_INITDIALOG
            ' Initialization handler
            si.cbSize=LEN(si)
            si.fMask=%SIF_ALL
            si.nMin=0
            si.nMax=h
            si.nPage=vt
            SetScrollInfo CBHNDL, %SB_VERT, si, 1
            si.nMin=0
            si.nMax=w
            si.nPage=ht
            si.nPos=0
            SetScrollInfo CBHNDL, %SB_HORZ, si, 1
      
          CASE %WM_NCACTIVATE
            STATIC hWndSaveFocus AS DWORD
            IF ISFALSE CBWPARAM THEN
              ' Save control focus
              hWndSaveFocus = GetFocus()
            ELSEIF hWndSaveFocus THEN
              ' Restore control focus
              SetFocus(hWndSaveFocus)
              hWndSaveFocus = 0
            END IF
      
          CASE %WM_COMMAND
            ' Process control notifications
            SELECT CASE AS LONG CBCTL
              CASE %IDC_LABEL1
      
              CASE %IDC_LABEL2
      
              CASE %IDC_LABEL3
      
            END SELECT
          CASE %WM_HSCROLL
            si.cbSize=SIZEOF(si)
            si.fMask=%SIF_ALL
            GetScrollInfo CBHNDL, %SB_HORZ, si
            oldPos=si.nPos
            SELECT CASE LOWRD(CBWPARAM)
              CASE %SB_LINELEFT
                si.nPos=si.nPos-hs
              CASE %SB_PAGELEFT
                si.nPos=si.nPos=si.nPage
              CASE %SB_LINERIGHT
                si.nPos=si.nPos+hs
              CASE %SB_PAGERIGHT
                si.nPos=si.nPos+si.nPage
              CASE %SB_THUMBTRACK
                si.nPos=HIWRD(CBWPARAM)
              CASE ELSE
                EXIT FUNCTION
            END SELECT
            si.nPos=MAX&(si.nMin, MIN&(si.nPos, si.nMax-si.nPage))
            si.fMask=%SIF_POS
            SetScrollInfo CBHNDL,%SB_HORZ,si,1
            ScrollWindow CBHNDL, oldPos-si.nPos,0,BYVAL %NULL, BYVAL %NULL
            FUNCTION = 1
      
          CASE %WM_VSCROLL
            si.cbSize=SIZEOF(si)
            si.fMask=%SIF_ALL
            GetScrollInfo CBHNDL, %SB_VERT, si
            oldPos=si.nPos
            SELECT CASE LOWRD(CBWPARAM)
              CASE %SB_LINEUP
                si.nPos=si.nPos-vs
              CASE %SB_PAGEUP
                si.nPos=si.nPos-si.nPage
              CASE %SB_LINEDOWN
                si.nPos=si.nPos+vs
              CASE %SB_PAGEDOWN
                si.nPos=si.nPos+si.nPage
              CASE %SB_THUMBTRACK
                si.nPos=HIWRD(CBWPARAM)
              CASE ELSE
                EXIT FUNCTION
            END SELECT
            si.nPos=MAX&(si.nMin, MIN&(si.nPos, si.nMax-si.nPage+1))
            si.fMask=%SIF_POS
            SetScrollInfo CBHNDL, %SB_VERT, si, 1
            ScrollWindow CBHNDL,0, oldPos-si.nPos,BYVAL %NULL, BYVAL %NULL
            FUNCTION = 1
        END SELECT
      END FUNCTION
      '--------------------------------------------------------------------------------------------------
      
      '--------------------------------------------------------------------------------------------------
      '   ** Dialogs **
      '--------------------------------------------------------------------------------------------------
      FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
        LOCAL lRslt AS LONG
      
      #PBFORMS BEGIN DIALOG %IDD_DIALOG1->->
        LOCAL hDlg  AS DWORD
      
        DIALOG NEW hParent, "SCROLLER", 359, 88, 283, 359, %WS_POPUP OR %WS_BORDER OR %WS_DLGFRAME OR _
          %WS_SYSMENU OR %WS_MINIMIZEBOX OR %WS_MAXIMIZEBOX OR %WS_CLIPSIBLINGS OR %WS_VSCROLL OR _
          %WS_VISIBLE OR %DS_MODALFRAME OR %DS_3DLOOK OR %DS_NOFAILCREATE OR %DS_SETFONT, _
          %WS_EX_CONTROLPARENT OR %WS_EX_LEFT OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, TO hDlg
        CONTROL ADD LABEL,  hDlg, %IDC_LABEL1, "Label1", 5, 5, 100, 10
        CONTROL ADD LABEL,  hDlg, %IDC_LABEL2, "510 LEFT", 510, 260, 100, 10
        CONTROL ADD LABEL,  hDlg, %IDC_LABEL3, "405BOTTOM", 10, 305, 100, 10
        CONTROL ADD BUTTON, hDlg, %IDC_HELPME, "HELP", 475, 130, 50, 15
      #PBFORMS END DIALOG
      
        DIALOG SHOW MODAL hDlg, CALL ShowDIALOG1Proc TO lRslt
      
      #PBFORMS BEGIN CLEANUP %IDD_DIALOG1
      #PBFORMS END CLEANUP
      
        FUNCTION = lRslt
      END FUNCTION
      '--------------------------------------------------------------------------------------------------
      Rod
      In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

      Comment


      • #4
        Thanks the replies guys. Esp the code, Rodney. I'll look into it today. I just now recalled I wrote a "Health report" a couple years ago that scrolled the Dialog vertically and I don't recall having to do anything special there to do it.

        I'll let you know how I make out later.

        ======================================================
        "The oldest and strongest emotion of mankind is fear,
        and the oldest and strongest kind of fear is
        fear of the unknown."
        H.P. Lovecraft
        ======================================================
        It's a pretty day. I hope you enjoy it.

        Gösta

        JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
        LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

        Comment


        • #5
          Okay, U[date. Just looked into the Med-History program and found this (plus the code I used enabling Dialog Scrollbars)
          Code:
                      '==========================================================================
                      'http://www.powerbasic.com/support/pbforums/showthread.php?t=24898&highlight=Maciej+NEYMAN+April+2006+07%3A51
                      'HERE YOU WILL SETUP VALUES FOR THE CONSTANTS CONTROLING BEHAVIOUR OF THE
                      'SCROLL BARS:   (try to experiment with these values)
                      '==========================================================================
          Later today I will post working code for the example above (presuming success {hopeful, though wan, smile}.

          =================================================
          Hanging was the worst use a man could be put to.
          Sir Henry Wotton
          =================================================
          It's a pretty day. I hope you enjoy it.

          Gösta

          JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
          LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

          Comment


          • #6
            Here's working code: (Update to include Macros to unclutter the CallBack)

            '
            Code:
            'PBWIN 9.00 - WinApi 05/2008 - XP Pro SP3
            #Dim All 
            #Compile Exe  
            #Include "WIN32API.INC"
            #Include "COMDLG32.INC"
            #Include "InitCtrl.inc"
            '
            Global hdlg As Dword                
            %Id_Exit_Btn = 1000
            %Id_Sample_Textbox = 1001
            %Id_Show_Result_Btn = 1002
            ' 
            Macro Common_Locals 'Macro easier than retyping and maintains coding consistency
              Global Stile, Dlg_hght, Dlg_Wd As Long 'Global in case want to use in Controls
              Local Row, col, hght, wd, Longest,ctr, ln, ln1, i As Long
              Local  l, s As String
            End Macro  
            '
            Macro ScrollBars_HScroll
                    si.cbSize = SizeOf(si)
                    si.fMask  = %SIF_ALL
                    GetScrollInfo CbHndl, %SB_HORZ, si
                    oldPos = si.nPos
                    Select Case LoWrd(CbWParam)
                        Case %SB_LINELEFT   : si.nPos = si.nPos - hs
                        Case %SB_PAGELEFT   : si.nPos = si.nPos - si.nPage
                        Case %SB_LINERIGHT  : si.nPos = si.nPos + hs
                        Case %SB_PAGERIGHT  : si.nPos = si.nPos + si.nPage
                        Case %SB_THUMBTRACK : si.nPos = HiWrd(CbWParam)
                        Case Else           : Exit Function
                    End Select
                    'To limit scroling range remove REM from the next line.
                    'If you don't then you can keep scrolling indefinitelly (well, almost)
                    'by using small arrrows on the end of the scroll bar.
                    'si.nPos = Max&(si.nMin, Min&(si.nPos, si.nMax - si.nPage))
                    ' Update the scroll bar and scroll the client area
                    si.fMask  = %SIF_POS
                    SetScrollInfo CbHndl, %SB_HORZ, si, 1     'remember new geometry of the horizontal scroll bar
                    ScrollWindow CbHndl, oldPos - si.nPos, 0, ByVal %Null, ByVal %Null   'actual scroling action
                    Function = 1
            End Macro
            '
            Macro ScrollBars_VScroll
                    si.cbSize = SizeOf(si)
                    si.fMask  = %SIF_ALL
                    GetScrollInfo CbHndl, %SB_VERT, si
                    oldPos = si.nPos
                    Select Case LoWrd(CbWParam)
                        Case %SB_LINEUP     : si.nPos = si.nPos - vs
                        Case %SB_PAGEUP     : si.nPos = si.nPos - si.nPage
                        Case %SB_LINEDOWN   : si.nPos = si.nPos + vs
                        Case %SB_PAGEDOWN   : si.nPos = si.nPos + si.nPage
                        Case %SB_THUMBTRACK : si.nPos = HiWrd(CbWParam)
                        Case Else           : Exit Function
                    End Select
                    'To limit scroling range remove REM from the next line
                    'If you don't then you can keep scrolling indefinitelly (well, almost)
                    'by using small arrrows on the end of the scroll bar.
                    'si.nPos = Max&(si.nMin, Min&(si.nPos, si.nMax - si.nPage + 1))
                    ' Update the scroll bar and scroll the client area
                    si.fMask = %SIF_POS
                    SetScrollInfo CbHndl, %SB_VERT, si, 1    'remember new geometry of the vertical scroll bar
                    ScrollWindow CbHndl, 0, oldPos - si.nPos, ByVal %Null, ByVal %Null  'actual scroling action
                    Function = 1
            End Macro                    
            '
            Macro ScrollBars_Init
                          ' initialize scrollbar constants here
                          Local w As Long, h As Long, oldPos As Long, si As SCROLLINFO
                          Local vt As Long, ht As Long, hs As Long, vs As Long
                        '
                        '==========================================================================
                        'http://www.powerbasic.com/support/pbforums/showthread.php?t=24898&highlight=Maciej+NEYMAN+April+2006+07%3A51
                        'HERE YOU WILL SETUP VALUES FOR THE CONSTANTS CONTROLING BEHAVIOUR OF THE
                        'SCROLL BARS:   (try to experiment with these values)
                        '==========================================================================
                            w = 600    
                           'This is the number of dialog units by which the Dialog's Window
                           'will scroll horizontaly if the thumb of the Scrolling Bar
                           'travels between its extreme positions left and right
                           'Reasonable (but not compulsory) value for it is between 200 to 2000
                            h = 100 'Len(Patient_Data) / 3.75    
                           'This is the number of dialog units by which the Dialog's Window
                           'will scroll vertically if the thumb of the Scrolling Bar
                           'travels between its extreme positions top and bottom
                           'Reasonable (but not compulsory) value for it is between 200 to 1600
                            vt = h \ 5 '500   
                           'length of the vertical scroll bar's thumb, this is also the amount
                           'of dialog units by which the dialog will scroll verticaly if mouse is
                           'clicked between the ends of the scroll bar and the thumb itself
                           'reasonable value for it is between 10 and h/2
                            ht = 50    
                           'length of the horizontal scroling bar's thumb, this is also the amount
                           'of dialog units by which the dialog will scroll horizontaly if mouse is
                           'clicked between the ends of the scroll bar and the thumb itself
                           'reasonable value for it is between 10 and w/2
                            hs = 5     
                           'number of dialog units by which the Dialog scrolls horizontaly when the
                           'small arrow on either end of scroling bar is activated by mouse
                           'reasonable values for it is between 1 and 30. Small value produces
                           'smother but slower scrolling, the higher value is faster but more
                           'jerki - the Dialog scrolls by steps determined by this value.
                            vs = 50     
                           'number of dialog units by which the Dialog scrolls verticaly when the
                           'small arrow on either end of scroling bar is activated by mouse
                           'reasonable values for it is between 1 and 30. Small value produces
                           'smother but slower scrolling, the higher value is faster but more
                           'jerki - the Dialog scrolls by steps determined by this value.
                        '----------------
                           'If scroling by dialog units and not by pixels is giving you stomachache
                           'remove REM from the next line.
                           ' Dialog Units CbHndl, w, h To Pixels w, h
                        '==========================================================================
                        ' This is all you have to decide upon, the rest just copy.
                        ' If you remove all comments, the code become quite lean!
                        '==========================================================================
               
               
                               ' initialize scrollbars here
                        '---------------------------------------------------------------------------------
                         si.cbSize = Len(si)                   ' get place holders for the si parameters
                         si.fMask  = %SIF_ALL                  ' setting the topological space for the scroll bars
                         si.nMin   = 0                         ' min scroll pos
                         si.nMax   = h                         ' max scroll pos
                         si.nPage  = vt                        ' lenght of the vertical scroll bar's thumb
                         SetScrollInfo CbHndl, %SB_VERT, si, 1 ' initial setup of the vertical scrollbar, "1" represents
                                                               ' "TRUE" and causes redraw of the scroll bar
                         '--------------------------------------------------------------------------------
                         si.nMin   = 0                         ' min scroll pos
                         si.nMax   = w                         ' max scroll pos
                         si.nPage  = ht                        ' width of the horizontal scroll bar thumb
                         si.nPos   = 0                         ' initial position of the thumbs
                         SetScrollInfo CbHndl, %SB_HORZ, si, 1 ' initial setup of the horizontal scrollbar, "1" represents
                                                          ' "TRUE" and causes redraw of the scroll bar
                    '--------------------------------------------------------------------------------
            End Macro
             
            CallBack Function Dialog_Processor              
              Common_Locals
              Select Case CbMsg     'This is TO determine the message TYPE 
                 '       
                 Case %WM_INITDIALOG'<- Initialiaton when the program loads 
                      ScrollBars_Init
                 '
                 Case %WM_SYSCOMMAND 'Traps Any Alt key but only F4 closes              
                 '
                 Case %WM_COMMAND  'This processes command messages
                   Select Case CbCtl
                     Case %Id_Show_Result_Btn 
                        Control Get Text CbHndl, %Id_Sample_Textbox To l$
                          ? l$, , FuncName$
                     '
                     Case %Id_Exit_Btn
                       Select Case CbCtlMsg        
                          Case 0
                            Dialog End CbHndl 'Applikation beenden
                       End Select
                   End Select
            '
                 Case %WM_HSCROLL: ScrollBars_HScroll  ' call from the horizontal scroll bar
                 Case %WM_VSCROLL: ScrollBars_VScroll  'call from the vertical scroll bar
                   
              End Select
            End Function
            '
            Function PBMain
              Common_Locals
              Desktop Get Size To Dlg_Wd, Dlg_Hght
              Dlg_Hght = Dlg_Hght - 100 'plenty room for taskbar 
              Dlg_Wd = Dlg_Wd * 2 'wider than screen 
               Stile = Stile Or %WS_CAPTION
               Stile = Stile Or %WS_SYSMENU
               Stile = Stile Or %WS_THICKFRAME 
               Stile = Stile Or %WM_HELP 
               Stile = Stile Or %WS_Border  'doesn't do anything
               Stile = Stile Or %WS_HSCROLL     
              Dialog New Pixels, hdlg, "Demo", 0, 0, Dlg_Wd, Dlg_Hght, Stile To hdlg 'centered
              Row = 0
              col = 0
              Wd = 40
              Hght = 12
              Control Add Label, hdlg, -1, " Name & Address ", Col, Row, Wd, Hght
              
              s$ = "Hagstrom, Borje" & $CrLf & _
                   "123 PBWin Avenue" & $CrLf & _
                   "PowerBasic, FL 12345"
                     
              Col = Col + Wd + 10 'just past label 
              Hght = 15 * 10 'Plenty room for 10 lines of text
              Wd = Dlg_Wd - 40 - 30 'minus the label and leave a little
              Control Add TextBox, hdlg, %Id_Sample_Textbox, s$, Col, Row, Wd, Hght, %ES_WantReturn Or %ES_MultiLine
               hght = 25   
               Wd = Dlg_Wd - 20
               Col = 10 'center
               Row = Dlg_hght - (Hght * 2) - 4 
                 Control Add Button, hdlg, %Id_Show_Result_Btn, "Show Textbox Results", col, row, Wd, Hght
               Row = Dlg_hght - Hght - 2 'Just off bottom
                 Control Add Button, hdlg, %Id_Exit_Btn, "Abandon Ship", col, row, Wd, Hght
              
                 Dialog Show Modal hDlg   Call Dialog_Processor
            End Function  'Applikation beenden
            '
            ==============================================
            "All truth passes through three stages.
            First, it is ridiculed.
            Second, it is violently opposed.
            Third, it is accepted as being self-evident."
            Arthur Schopenhauer (1788-1860)
            ==============================================
            Last edited by Gösta H. Lovgren-2; 17 Mar 2009, 11:17 AM. Reason: (Update to include Macros to unclutter the CallBack)
            It's a pretty day. I hope you enjoy it.

            Gösta

            JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
            LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

            Comment


            • #7
              Tried it and it worked fine as far as I could tell. I didn't examine the code too much.
              I say as far as I could tell because I'm using a 22 inch HP monitor in portrait mode and it shows a bit differently because of aspect ratio. But you definitely got the scroll bars working.
              Rod
              In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

              Comment


              • #8
                Originally posted by Rodney Hicks View Post
                Tried it and it worked fine as far as I could tell. I didn't examine the code too much.
                I say as far as I could tell because I'm using a 22 inch HP monitor in portrait mode and it shows a bit differently because of aspect ratio. But you definitely got the scroll bars working.

                Can't beat Cut&Paste (from Maciej 's code) {grin}.

                ==========================================================
                "You are never dedicated to something
                you have complete confidence in.
                No one is shouting "The sun is going to rise tomorrow."
                You KNOW it's going to rise tomorrow.
                When people are dedicated to political or religious faiths
                or any other kinds of dogmas or goals,
                it's always because those dogmas or goals are in doubt."
                Zen, and the Art of Motorcycle Maintenance
                R. Pirsig
                ==========================================================
                It's a pretty day. I hope you enjoy it.

                Gösta

                JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                Comment


                • #9
                  Well I have to admit that I need to look at code closer, but your example of "Scrolling Dialogs" may be another alternative to "Multiple Dialogs" in a MDI sort of idea.

                  Until now, I never could figure how you would want (or need) to scroll controls on a Dialog (well could see the need , but seemed a lil "Counter-Intuitive" to me)


                  Still a lil "Counter-Intuitive" but can see its use (for ONCE)

                  I will have to investigate, but if each Dialog has its own callback then maybe a "Widget" idea that each scrolls its own dialog depending on the one that you have focus on???
                  Engineer's Motto: If it aint broke take it apart and fix it

                  "If at 1st you don't succeed... call it version 1.0"

                  "Half of Programming is coding"....."The other 90% is DEBUGGING"

                  "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                  Comment


                  • #10
                    but if each Dialog has its own callback then maybe a "Widget" idea that each scrolls its own dialog depending on the one that you have focus on???
                    Cliff, you may want to look at the rebar Common Control.

                    Multiple windows, each in its own area of screen, with "splitter bar" resizing.

                    There may or may not be a demo here; I don't recall seeing one but the memory really is the second thing to go.
                    Michael Mattias
                    Tal Systems (retired)
                    Port Washington WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #11
                      I looked at splitter bars before but
                      (maybe at the time it was toooo complicated....and bad results)

                      maybe worth a reloook, but scrolling a dialog could be too. (but then again...anything not seen on a single screen....one should really rethink design of the screen) sort of though
                      Engineer's Motto: If it aint broke take it apart and fix it

                      "If at 1st you don't succeed... call it version 1.0"

                      "Half of Programming is coding"....."The other 90% is DEBUGGING"

                      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                      Comment


                      • #12
                        >maybe worth a reloook, but scrolling a dialog could be too

                        Maybe you should look at eschewing the convenience of DDT dialogs and using this application as your "everyone should create at least one application using pure SDK-style coding" application.

                        Although..... I can't see where I'd like to use an application where I would have to scroll the window to get at controls which are currently out of sight. If it's just info to be viewed, that's one thing, but if I have to fill in text or click on buttons I'd just as soon have all the "direct interface" controls always visible without scrolling.



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

                        Comment


                        • #13
                          What I've ALWAYS liked most about programming is the ability/potential/satisfaction to design a program (exactly?) as I'd like, not to someone else's standards. (I know, I know. You have to please/satisfy the customer, but sometimes ...).


                          ==========================================
                          A great many people now programming
                          would be better employed keeping rabbits.
                          Edith Sitwell
                          ==========================================
                          It's a pretty day. I hope you enjoy it.

                          Gösta

                          JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                          LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                          Comment

                          Working...
                          X