Announcement

Collapse
No announcement yet.

VERY basic PB/DLL question -- new to PB/DLL

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

  • VERY basic PB/DLL question -- new to PB/DLL

    I'm a long-time user of Turbo and Power Basic, for a game program
    I (still) publish in DOS, but am just beginning the effort to
    convert it to Windows with PB/DLL 6.0.

    After a couple of weeks of reading the PB/DLL manual from end to
    end, I'm still mystified as to what PB/DLL control or command, if
    any, will let me simply display text (up to a couple of pages
    worth in some cases) in a box (other than the quickie MSGBOX
    feature, which won't permit multiple pages of scrollable text,
    far as I can tell).

    In particular, since mine is a stock-market/corporate finance
    simulation, I'm trying to find a way to create a moving stock
    ticker on-screen, using a text string. In DOS, this was easy -- I
    I just reprinted the leftmost 75 characters of the ticker string
    across the top of the screen for about .05 seconds, then lopped
    off the left most character, and then reprinted the leftmost 75
    characters of the truncated string. My thought was that, with
    PB/DLL I SHOULD be able to print and rapidly reprint a text
    box containing a ticker string on part of the screen which
    gives a similar appearance of moving, and which continues
    reprinting (loading new text as needed) until the user clicks
    on a listbox or other user input area also displayed at the
    time. I'm begining to doubt if the latter is possible.

    Can anyone give me a hint where I might start? Obviously, there
    is no longer a "PRINT" command as there was in the DOS version,
    but I assume there must be SOME type of control or command in
    the Win GUI that allows you to simply pass a text string to a
    box of a defined size and shape and display it.

    ------------------


    [This message has been edited by Mike Jenkins (edited September 25, 2000).]

  • #2
    Mike,
    Transferring ideas from procedure-based programming to
    message/event -based programming is difficult. To be effective,
    you have to change the way you perceive your application. You
    have to respond to messages. If you want something in particular
    done, you have to send your program a message.

    I recommend that you invest the money in a Windows Programming
    book. Preferrably Petzold, or perhaps Schildt. I guarantee you
    that you will meet with frustration for a long time to come. But
    in 3 months time, things will pull together and you might even
    begin to understand the whys and wherefores.

    It is definitely worth it. If you want to have a "ticker" style
    display, they investigate the Windows Timer functions. If you don't
    want the user to edit the display, you could put the text in a
    continuously updating label control. If you want the text displayed
    in toto, you could display it in a pull-down combo-box, or in a
    rich-edit text box.

    But first, you have to understand these controls. That is one
    of the functions of the Windows Programming Books.

    Best Regards,

    ------------------
    [email protected]
    :) IRC :)

    Comment


    • #3
      Mike, If your "game" is text based then you might consider PBCC
      instead. Even if it has Graphics you may want to go that way
      and use the tools from Perfect Sync. Pbcc has much more of a
      "DOS" feel to it as far as programming goes. It is also a good
      way to step-up to PBdll in my opinion.

      I am currently using both (pbcc/dll) in my conversion of my
      accounting software package and have gotten nice responses
      so far.


      ------------------
      Client Writeup for the CPA

      buffs.proboards2.com

      Links Page

      Comment


      • #4
        Originally posted by Fred Buffington:
        Mike, If your "game" is text based then you might consider PBCC
        instead. Even if it has Graphics you may want to go that way
        and use the tools from Perfect Sync. Pbcc has much more of a
        "DOS" feel to it as far as programming goes. It is also a good
        way to step-up to PBdll in my opinion.

        I am currently using both (pbcc/dll) in my conversion of my
        accounting software package and have gotten nice responses
        so far.


        Yes, thanks, Fred. I considered going that route initially, but
        was told that it's very difficult to add graphics to a text-based
        program like mine, after porting it to PBCC. I'm not familiar
        with Perfect Sync. I take it that it is not a PB product? Does
        it enable you to create a Windows GUI as an add-on to your
        PBCC code?



        ------------------

        Comment


        • #5
          Mike,
          If you have some trouble ADJUSTING to Windows using PBDLL,
          I may suggest you take a look at this product EZGUI, it really eases
          the way to do programming in Windows using PBDLL.
          You can find a FREEWARE version at www.ezgui.com see
          how you like it.

          My 2¢

          ------------------
          Ivan

          Uncle Droid (Android Apps)

          Comment


          • #6
            Originally posted by Ivan Iraola:
            Mike,
            If you have some trouble ADJUSTING to Windows using PBDLL,
            I may suggest you take a look at this product EZGUI, it really eases
            the way to do programming in Windows using PBDLL.
            You can find a FREEWARE version at www.ezgui.com see
            how you like it.

            My 2¢

            Thanks a bunch, Ivan. EZGUI looks very useful, if it works as
            simply as it appears to, and may actually be usable w/o a
            brain transplant! Have you used and it and found it works
            reasonably well?

            -- Mike



            ------------------

            Comment


            • #7
              Surely, you make a any-size list box (without scroll bars) and
              manipulate the strings in it? White background only?

              ------------------

              Comment


              • #8
                Contools Pro + Graphics allows you to do all kinds of nice
                things with PBCC. Take a look at the Third-Party discussion
                (where EZGUI is discussed too) Eric Pearson is one to ask
                at Perfect Sync.

                But I have been able to port text program over with very little
                change using PBCC (from QB4.5). You can also use API calls etc
                in it. BTW they do have some demo programs you could see.
                (Perfect Sync that is).

                Im not promoting this over PBdll which I also use and really like
                just wanted to give you the options that are out there. And
                EZGUI might be another way to go. So checkout the Third
                Party Forum (BTW if you are still in the grace Period,
                you may be able to get a discount on getting PBcc).

                ------------------
                Client Writeup for the CPA

                buffs.proboards2.com

                Links Page

                Comment


                • #9
                  Well Mike, let me tell you, I used to be a DOS programmer (PB32)
                  and then MIGRATED into Windows (PBDLL) and the tool that made that
                  possible WITHOUT A BRAIN TRANSPLANT was EZGUI, I have the commercial
                  version...I CAN'T LIVE WITHOUT IT!!!

                  I don't usually RECOMMEND any product unless I'm very satisfied,
                  PBDLL is the BEST compiler ever, and EZGUI the BEST tool to do
                  programming using PBDLL.

                  ------------------
                  Ivan

                  Uncle Droid (Android Apps)

                  Comment


                  • #10
                    Originally posted by Ivan Iraola:
                    I don't usually RECOMMEND any product unless I'm very satisfied,
                    PBDLL is the BEST compiler ever, and EZGUI the BEST tool to do
                    programming using PBDLL.

                    Gracias! That's what I wanted to know. Even after just a quick
                    gander at their site and examples, I think it may be simple
                    enough for an old DOS dinosaur like me to use... !


                    ------------------

                    Comment


                    • #11
                      If you need help, this forum is very cool as well as EZGUI
                      forums, I'm gonna post soon (I hope) several source codes done
                      with PBDLL and EZGUI, just hang around.

                      ------------------
                      Ivan

                      Uncle Droid (Android Apps)

                      Comment


                      • #12
                        Originally posted by Ivan Iraola:
                        If you need help, this forum is very cool as well as EZGUI
                        forums, I'm gonna post soon (I hope) several source codes done
                        with PBDLL and EZGUI, just hang around.


                        Ivan, the only free/trial version I found on EZGUI's site was
                        their Dialog Designer 1.031 (plus the EZTREE Lite file). Is the
                        Dialog Designer a stripped down version of their registered
                        version 1.0 of EZGUI? Or have they perhaps stopped offering a
                        trial version of EZGUI?

                        Thanks again,

                        Mike Jenkins

                        ------------------

                        Comment


                        • #13
                          mike --
                          probably, you search something like this http://www.powerbasic.com/support/pb...ad.php?t=22594


                          ------------------
                          e-mail: [email protected]

                          Comment


                          • #14
                            Mike,

                            The DIALOG DESIGNER is the tool I'm talking about, when done, you
                            just CREATE the code and FILL the blanks (if you look at the menu
                            bar you'll see an option GENERATE). It will create something like
                            this:

                            Code:
                            ' *************************************************************
                            '       Code Generated by EZGUI Freeware Dialog Designer
                            ' *************************************************************
                            
                            #COMPILE EXE
                            #REGISTER NONE
                            #DIM ALL          '  This is helpful to prevent errors in coding
                            
                            
                             ' Remark out the Constants for Controls you Will use in your program !
                            
                             %NOANIMATE    = 1
                             %NOBUTTON     = 1
                             %NOCOMBO      = 1
                             %NODRAGLIST   = 1
                             %NOHEADER     = 1
                             %NOIMAGELIST  = 1
                             %NOLIST       = 1
                             '    %NOLISTVIEW   = 1
                             '    %NOSTATUSBAR  = 1
                             '    %NOTABCONTROL = 1
                             '    %NOTOOLBAR    = 1
                             '    %NOTOOLTIPS   = 1
                             %NOTRACKBAR   = 1
                             '    %NOTREEVIEW   = 1
                             '    %NOUPDOWN     = 1
                            #INCLUDE "win32api.inc"   ' Must come first before other include files !
                            #INCLUDE "commctrl.inc"  ' The Common Controls include file !
                            ' *************************************************************
                            
                            ' *************************************************************
                            '              EZGUI Library Constants and Declares
                            ' *************************************************************
                            
                            DECLARE SUB EZLIB_InitFonts()
                            DECLARE SUB EZLIB_DeleteFonts()
                            DECLARE SUB EZLIB_FixSize(BYVAL hDlg&, BYVAL Style&, BYVAL HasMenu&)
                            DECLARE FUNCTION EZLIB_IsTooltip(BYVAL lParam AS LONG) AS LONG
                            DECLARE FUNCTION EZLIB_TooltipID(BYVAL lParam AS LONG) AS LONG
                            DECLARE SUB EZLIB_SetTooltipText(BYVAL lParam AS LONG, TipText$)
                            DECLARE FUNCTION EZLIB_IsTab(BYVAL lParam AS LONG) AS LONG
                            DECLARE FUNCTION EZLIB_TabID(BYVAL lParam AS LONG) AS LONG
                            DECLARE FUNCTION EZLIB_TabNum(BYVAL lParam AS LONG) AS LONG
                            DECLARE SUB EZLIB_AddTabs(BYVAL hDlg AS LONG, BYVAL IDNum&, BYVAL TabText$)
                            DECLARE SUB EZLIB_DefColors()
                            DECLARE SUB EZLIB_DeleteBrushes()
                            DECLARE FUNCTION EZLIB_QBColor(N&) AS LONG
                            DECLARE SUB EZLIB_ShowControl(BYVAL hWnd&, BYVAL ID&, BYVAL SFlag&)
                            
                            ' *************************************************************
                            '              Application Constants and Declares
                            ' *************************************************************
                            
                            %FORM1_FRAME1             = 100
                            %FORM1_LABEL1             = 105
                            %FORM1_BUTTON1            = 110
                            ' --------------------------------------------------
                            DECLARE SUB ShowDialog_Form1(BYVAL hParent&)
                            DECLARE CALLBACK FUNCTION Form1_DLGPROC
                            ' --------------------------------------------------
                            ' ------------------------------------------------
                            
                            DECLARE CALLBACK FUNCTION CBF_FORM1_BUTTON1()
                            
                            
                            ' (1) Put NEXT DIALOG Constant and Declare code after here :
                            
                            
                            ' *************************************************************
                            '            Application Global Variables and Types
                            ' *************************************************************
                            
                            GLOBAL App_Brush&()
                            GLOBAL App_Color&()
                            GLOBAL App_Font&()
                            
                            
                            GLOBAL hForm1&    ' Dialog handle
                            
                            
                            ' (2) Put NEXT DIALOG Globals code after here :
                            
                            ' *************************************************************
                            '                    Application Entrance
                            ' *************************************************************
                            
                            FUNCTION PBMAIN
                                LOCAL Count&
                                LOCAL CC1 AS INIT_COMMON_CONTROLSEX
                            
                                CC1.dwSize=SIZEOF(CC1)
                                CC1.dwICC=%ICC_WIN95_CLASSES
                                InitCommonControlsEX CC1
                                EZLIB_DefColors
                                EZLIB_InitFonts
                            
                                ShowDialog_Form1 0
                                DO
                                    DIALOG DOEVENTS TO Count&
                                LOOP UNTIL Count&=0
                            
                            
                                EZLIB_DeleteBrushes
                                EZLIB_DeleteFonts
                            END FUNCTION
                            
                            
                            ' *************************************************************
                            '                    Application Dialogs
                            ' *************************************************************
                            
                            SUB ShowDialog_Form1(BYVAL hParent&)
                                LOCAL Style&, ExStyle&
                                LOCAL N&, CT&        '  Variables used for Reading Data in Arrays for Listbox and Combobox
                                '   hParent& = 0 if no parent Dialog
                                Style& = %WS_POPUP OR %DS_MODALFRAME OR %WS_CAPTION OR %WS_MINIMIZEBOX OR %WS_SYSMENU OR %DS_CENTER
                                ExStyle& = 0
                                DIALOG NEW hParent&, "EZ Sample", 0, 0,  149,  98, Style&, ExStyle& TO hForm1&
                                EZLIB_FixSize hForm1&, Style&, 0
                                ' Layer # 0
                                CONTROL ADD FRAME, hForm1&,  %FORM1_FRAME1,  "A simple Hello", 8, 5, 131, 59, _
                                    %WS_CHILD OR %WS_VISIBLE OR %BS_GROUPBOX, _
                                    %WS_EX_TRANSPARENT
                                CONTROL ADD LABEL, hForm1&,  %FORM1_LABEL1,  "Hello Mike!!!", 35, 32, 80, 12, _
                                    %WS_CHILD OR %WS_VISIBLE OR %SS_CENTER
                                CONTROL ADD "Button", hForm1&,  %FORM1_BUTTON1,  "&Click Me", 48, 71, 53, 15, _
                                    %WS_CHILD OR %WS_VISIBLE OR %BS_PUSHBUTTON OR %WS_TABSTOP CALL CBF_FORM1_BUTTON1
                                DIALOG SHOW MODELESS hForm1& , CALL Form1_DLGPROC
                            END SUB
                            
                            ' *************************************************************
                            '                             Dialog Callback Procedure
                            '                             for Form Form1
                            '                             uses Global Handle - hForm1&
                            ' *************************************************************
                            
                            CALLBACK FUNCTION Form1_DLGPROC
                                SELECT CASE CBMSG
                                    ' Common Windows Messages you may want to process
                                    ' -----------------------------------------------
                                    CASE %WM_TIMER
                                    CASE %WM_HSCROLL
                                    CASE %WM_VSCROLL
                                    CASE %WM_SIZE
                                    CASE %WM_CLOSE
                                    CASE %WM_DESTROY
                                    CASE %WM_SYSCOMMAND
                                    CASE %WM_PAINT
                                    ' -----------------------------------------------
                                    CASE %WM_CTLCOLORMSGBOX , %WM_CTLCOLORBTN, %WM_CTLCOLOREDIT,_
                                         %WM_CTLCOLORSTATIC, %WM_CTLCOLORSCROLLBAR, %WM_CTLCOLORLISTBOX
                                        ' Control colors
                                        SELECT CASE GetDlgCtrlID(CBLPARAM)
                                            CASE ELSE
                                                FUNCTION=0
                                        END SELECT
                                    CASE %WM_NOTIFY
                                        IF EZLIB_IsTooltip(CBLPARAM) THEN
                                            SELECT CASE EZLIB_TooltipID(CBLPARAM)
                                                CASE  %FORM1_BUTTON1
                                                    EZLIB_SetTooltipText CBLPARAM, "Control -  %FORM1_BUTTON1"
                                                CASE ELSE
                                            END SELECT
                                        END IF
                                        IF EZLIB_IsTab(CBLPARAM) THEN
                                            SELECT CASE EZLIB_TabID(CBLPARAM)
                                                CASE ELSE
                                            END SELECT
                                        END IF
                                    CASE %WM_COMMAND
                                        ' Process Messages to Controls that have no Callback Function
                                        ' and Process Messages to Menu Items
                                        SELECT CASE CBCTL
                                            CASE ELSE
                                        END SELECT
                                    CASE ELSE
                                END SELECT
                            END FUNCTION
                            
                            
                            ' (3) Put NEXT DIALOG Creation / Dialog Procedure code after here :
                            
                            
                            ' *************************************************************
                            '              EZGUI Freeware Dialog Designer Library
                            '
                            '                   see web site at EZGUI.COM
                            '
                            ' Copyright (C) 2000, Christopher R. Boss , All Rights Reserved !
                            '
                            ' This code was Generated by the EZGUI Freeware Dialog Designer
                            ' and may be used ROYALTY FREE, as long as this Copyright notice
                            ' is kept with the source code.
                            ' The Author also gives you the right to post this code on a
                            ' web site and to distribute it to others.
                            ' *************************************************************
                            
                            SUB EZLIB_InitFonts()
                                REDIM App_Font(0 TO 5)
                                App_Font(0)=GetStockObject(%SYSTEM_FONT)
                                App_Font(1)=GetStockObject(%SYSTEM_FIXED_FONT)
                                App_Font(2)=GetStockObject(%ANSI_VAR_FONT)
                                App_Font(3)=GetStockObject(%ANSI_FIXED_FONT)
                                App_Font(4)=GetStockObject(%DEFAULT_GUI_FONT)    ' MS Sans Serif
                                App_Font(5)=GetStockObject(%OEM_FIXED_FONT)      ' Terminal Font
                                END SUB
                            
                            ' -------------------------------------------------------------
                            
                            SUB EZLIB_DeleteFonts()
                                LOCAL N&
                                ' Fonts 0 to 5 do not need to be deleted
                                FOR N&=6 TO UBOUND(App_Font)
                                    IF App_Font(N&)<>0 THEN DeleteObject App_Font(N&)
                                NEXT N&
                                END SUB
                            
                            ' -------------------------------------------------------------
                            
                            SUB EZLIB_FixSize(BYVAL hDlg&, BYVAL Style&, BYVAL HasMenu&)
                                LOCAL X&, Y&, W&, H&, XX&, YY&
                                DIALOG GET SIZE hDlg& TO X&, Y&
                                IF (Style& AND %WS_CAPTION) = %WS_CAPTION THEN
                                    IF HasMenu& THEN
                                        H&=H&+GetSystemMetrics(%SM_CYCAPTION)
                                    END IF
                                END IF
                                IF (Style& AND %WS_HSCROLL) = %WS_HSCROLL THEN
                                    H&=H&+GetSystemMetrics(%SM_CYHSCROLL)
                                END IF
                                IF (Style& AND %WS_VSCROLL) = %WS_VSCROLL THEN
                                    W&=W&+GetSystemMetrics(%SM_CYVSCROLL)
                                END IF
                                DIALOG PIXELS hDlg&, W&, H& TO UNITS XX&, YY&
                                X&=X&+XX&
                                Y&=Y&+YY&
                                DIALOG SET SIZE hDlg&, X&, Y&
                            END SUB
                            
                            ' -------------------------------------------------------------
                            
                            FUNCTION EZLIB_IsTooltip(BYVAL lParam AS LONG) AS LONG
                                LOCAL pNM AS NMHDR PTR
                                pNM=lParam
                                IF @pNM.code=%TTN_NEEDTEXT THEN FUNCTION=1 ELSE FUNCTION=0
                            END FUNCTION
                            
                            ' -------------------------------------------------------------
                            
                            FUNCTION EZLIB_TooltipID(BYVAL lParam AS LONG) AS LONG
                                LOCAL pNM AS NMHDR PTR, pTT AS TOOLTIPTEXT PTR
                                LOCAL IDNum&, UF&
                                IDNum&=0
                                pNM=lParam
                                IF @pNM.code=%TTN_NEEDTEXT THEN
                                    ' Check for Tooltip message
                                    pTT=lParam
                                    UF&[email protected] AND %TTF_IDISHWND
                                    IF UF&=%TTF_IDISHWND THEN
                                        IDNum&=GetDlgCtrlID(@pTT.hdr.idfrom)
                                    ELSE
                                        IDNum&[email protected]
                                    END IF
                                END IF
                                FUNCTION=IDNum&
                            END FUNCTION
                            
                            ' -------------------------------------------------------------
                            
                            SUB EZLIB_SetTooltipText(BYVAL lParam AS LONG, TipText$)
                                LOCAL pNM AS NMHDR PTR, pTT AS TOOLTIPTEXT PTR
                                pNM=lParam
                                IF @pNM.code=%TTN_NEEDTEXT THEN
                                    ' Check for Tooltip message
                                    pTT=lParam
                                    IF TipText$<>"" THEN
                                        @pTT.szText=LEFT$(TipText$, 79)+CHR$(0)
                                    END IF
                                END IF
                            END SUB
                            
                            ' -------------------------------------------------------------
                            
                            FUNCTION EZLIB_IsTab(BYVAL lParam AS LONG) AS LONG
                                LOCAL pNM AS NMHDR PTR
                                pNM=lParam
                                IF @pNM.code=%TCN_SELCHANGE THEN FUNCTION=1 ELSE FUNCTION=0
                            END FUNCTION
                            
                            ' -------------------------------------------------------------
                            
                            FUNCTION EZLIB_TabID(BYVAL lParam AS LONG) AS LONG
                                LOCAL pNM AS NMHDR PTR
                                LOCAL IDNum&
                                pNM=lParam
                                IF @pNM.code=%TCN_SELCHANGE THEN
                                    IDNum&[email protected]
                                END IF
                                FUNCTION=IDNum&
                            END FUNCTION
                            
                            ' -------------------------------------------------------------
                            
                            FUNCTION EZLIB_TabNum(BYVAL lParam AS LONG) AS LONG
                                LOCAL RV&, pNM AS NMHDR PTR
                                LOCAL hCtrl AS LONG
                                pNM=lParam
                                IF @pNM.code=%TCN_SELCHANGE THEN
                                [email protected]
                                    RV&=SendMessage(hCtrl, %TCM_GETCURSEL, 0, 0)+1
                                END IF
                                FUNCTION=RV&
                            END FUNCTION
                            
                            ' -------------------------------------------------------------
                            
                            SUB EZLIB_AddTabs(BYVAL hDlg AS LONG, BYVAL IDNum&, BYVAL TabText$)
                                LOCAL pItem AS TC_ITEM, hCtrl&
                                LOCAL zText AS ASCIIZ*80
                                LOCAL D$, P&, TB&
                                IF IDNum&<>0 THEN
                                    hCtrl&=GetDlgItem(hDlg,IDNum&)
                                    IF hCtrl&<>0 THEN
                                        TB&=0
                                        DO
                                            IF TabText$="" THEN EXIT DO
                                            P&=INSTR(TabText$,"|")
                                            IF P&>0 THEN
                                                D$=LEFT$(TabText$,P&-1)
                                                TabText$=MID$(TabText$,P&+1)
                                            ELSE
                                                D$=TabText$
                                                IF TabText$="" THEN EXIT DO
                                                TabText$=""
                                            END IF
                                            pItem.Mask=%TCIF_TEXT
                                            zText=D$+CHR$(0)
                                            pItem.pszText=VARPTR(zText)
                                            SendMessage hCtrl&, %TCM_INSERTITEM, TB&, VARPTR(pItem)
                                            TB&=TB&+1
                                        LOOP
                                    END IF
                                END IF
                            END SUB
                            
                            ' -------------------------------------------------------------
                            
                            SUB EZLIB_DefColors()
                                LOCAL T&
                                REDIM App_Brush&(0 TO 31)
                                REDIM App_Color&(0 TO 31)
                                FOR T&=0 TO 31
                                    App_Brush&(T&)=CreateSolidBrush(EZLIB_QBColor(T&))
                                    App_Color&(T&)=EZLIB_QBColor(T&)
                                NEXT T&
                            END SUB
                            
                            ' -------------------------------------------------------------
                            
                            SUB EZLIB_DeleteBrushes()
                                LOCAL T&
                                FOR T&=0 TO 31
                                    DeleteObject App_Brush&(T&)
                                NEXT T&
                            END SUB
                            
                            ' -------------------------------------------------------------
                            
                            FUNCTION EZLIB_QBColor(N&) AS LONG
                                LOCAL RV&
                                SELECT CASE N&
                                    CASE 0
                                    RV&=RGB(0,0,0)       ' Black
                                CASE 1
                                    RV&=RGB(0,0,128)     ' Blue
                                CASE 2
                                    RV&=RGB(0,128,0)     ' Green
                                CASE 3
                                    RV&=RGB(0,128,128)   ' Cyan
                                CASE 4
                                    RV&=RGB(196,0,0)     ' Red
                                CASE 5
                                    RV&=RGB(128,0,128)   ' Magenta (Purple)
                                CASE 6
                                    RV&=RGB(128,64,0)    ' Brown
                                CASE 7
                                    RV&=RGB(196,196,196) ' White
                                CASE 8
                                    RV&=RGB(128,128,128) ' Gray
                                CASE 9
                                    RV&=RGB(0,0, 255)    ' Lt. Blue
                                CASE 10
                                    RV&=RGB(0,255,0)     ' Lt. Green
                                CASE 11
                                    RV&=RGB(0,255,255)   ' Lt. Cyan
                                CASE 12
                                    RV&=RGB(255,0,0)     ' Lt. Red
                                CASE 13
                                    RV&=RGB(255,0,255)   ' Lt. magenta (Purple)
                                CASE 14
                                    RV&=RGB(255,255,0)   ' Yellow
                                CASE 15
                                    RV&=RGB(255,255,255) ' Bright White
                                CASE 16   ' - Extended QB colors Pastel version -
                                    RV&=RGB(164,164,164)
                                CASE 17
                                    RV&=RGB(128,160,255)
                                CASE 18
                                    RV&=RGB(160,255,160)
                                CASE 19
                                    RV&=RGB(160,255,255)
                                CASE 20
                                    RV&=RGB(255,160,160)
                                CASE 21
                                    RV&=RGB(255,160,255)
                                CASE 22
                                    RV&=RGB(255,255,160)
                                CASE 23
                                    RV&=RGB(212,212,212)
                                CASE 24
                                    RV&=RGB(180,180,180)
                                CASE 25
                                    RV&=RGB(188,220,255)
                                CASE 26
                                    RV&= RGB(220,255,220)
                                CASE 27
                                    RV&=RGB(220,255,255)
                                CASE 28
                                    RV&=RGB(255,220,220)
                                CASE 29
                                    RV&=RGB(255,220,255)
                                CASE 30
                                    RV&=RGB(255,255,220)
                                CASE 31
                                    RV&=RGB(228,228,228)
                                CASE ELSE
                                    RV&=RGB(0,0,0)
                                END SELECT
                                FUNCTION=RV&
                            END FUNCTION
                             ' -------------------------------------------------------------
                            SUB EZLIB_ShowControl(BYVAL hWnd&, BYVAL ID&, BYVAL SFlag&)
                                LOCAL hCtrl&
                                IF IsWindow(hWnd&) THEN
                                    IF ID&<>0 THEN
                                        hCtrl&=GetDlgItem(hWnd&,ID&)
                                        IF SFlag&=0 THEN
                                            ShowWindow hCtrl&, %SW_HIDE
                                        ELSE
                                            ShowWindow hCtrl&, %SW_SHOW
                                        END IF
                                    END IF
                                END IF
                            END SUB
                             ' -------------------------------------------------------------
                            ' *************************************************************
                            '             End of EZGUI Dynamic Dialogs Library
                            ' *************************************************************
                            
                            
                            ' *************************************************************
                            '  Application Callback Functions (or Procedures) for Controls
                            ' *************************************************************
                            
                            ' ------------------------------------------------
                            CALLBACK FUNCTION CBF_FORM1_BUTTON1
                                IF CBCTLMSG=%BN_CLICKED THEN
                                   MSGBOX "Click OK and then the 'X' on the bar to exit",,"Example" 'This is the ONLY line I typed!!!
                                END IF
                                IF CBCTLMSG=%BN_SETFOCUS THEN
                            
                                END IF
                                IF CBCTLMSG=%BN_KILLFOCUS THEN
                            
                                END IF
                            END FUNCTION
                            ' ------------------------------------------------
                            
                            ' (4) Put NEXT DIALOG Callback / Subs code after here :
                            
                            ' *************************************************************
                            '                     Put Your Code Here
                            ' *************************************************************
                            ------------------
                            Ivan

                            Uncle Droid (Android Apps)

                            Comment


                            • #15
                              Mike --

                              > I considered going that route initially, but
                              > was told that it's very difficult to add
                              > graphics to a text-based program like mine

                              My company's Console Tools Plus Graphics makes it very easy to add graphics to PB/CC and PB/DLL programs.

                              http://perfectsync.com/GraphicsTools.htm

                              > I'm not familiar with Perfect Sync. I take it
                              > that it is not a PB product?

                              Correct. We (Perfect Sync) have been in the software business for 14 years, and one of our newer ventures is Development Tools for the PowerBASIC compiers. Click here to see a summary of our product line:

                              http://perfectsync.com/DevelopmentTools.htm

                              > Does it enable you to create a Windows GUI as
                              > an add-on to your PBCC code?

                              Yes, several Console Tools Plus Graphics users have used it to "draw" a complete GUI, but that it not its main puprose, and I would not recommend it for that sole purpose. It is primarily a drawing package. If you want to create a text-less GUI, the PB/DLL would be a more appropriate tool. But if you want to combine text-mode (console) and GUI elements, then Console Tools Plus Graphics would be a great alternative.

                              I want to explain, however, that the process of drawing a button (for example) does not create a "working" GUI-style button. Most Console Tools Plus Graphics users draw buttons over the console window so that they line up with row/column boundaries. When a user clicks the button, your program sees the click (via INKEY$) as if the user had clicked the console. The program can then (optionally) momentarily draw the button in the "down" state, or simply perform the requested action. (The DrawButton function is very easy to use, and you simply specify the "up" or "down" state.)

                              If text is an important part of your program, but you also want graphical elements, Console Tools Plus Graphics is the way to go.

                              And by the way... If you decide to use PB/DLL instead of PB/CC, then our Graphics Tools package would be very helpful if you want to create stock-market graphs and charts.

                              -- Eric Pearson, Perfect Sync Software

                              ------------------
                              Perfect Sync: Perfect Sync Development Tools
                              Email: mailto:[email protected][email protected]</A>



                              [This message has been edited by Eric Pearson (edited September 26, 2000).]
                              "Not my circus, not my monkeys."

                              Comment


                              • #16
                                Mike,
                                I have a 'scroller' at the bottom of one screen... Here is a
                                working sample that was 'thrown' together using CBoss's FreeBe
                                EZDDT....
                                I have the EZGUI 1.0, but have found that the EZDDT puppy is
                                fastest and allows me more flexability and no DLL to link...
                                Code:
                                ' *************************************************************
                                '       Code Generated by EZGUI Freeware Dialog Designer
                                ' *************************************************************
                                #COMPILE EXE "C:\Windows\Desktop\Scroll.EXE"
                                #REGISTER NONE
                                #DIM ALL          '  This is helpful to prevent errors in coding
                                 ' Remark out the Constants for Controls you Will use in your program !
                                 %NOANIMATE    = 1
                                 %NOBUTTON     = 1
                                 %NOCOMBO      = 1
                                 %NODRAGLIST   = 1
                                 %NOHEADER     = 1
                                 %NOIMAGELIST  = 1
                                 %NOLIST       = 1
                                 %NOTRACKBAR   = 1
                                #INCLUDE "win32api.inc"   ' Must come first before other include files !
                                #INCLUDE "commctrl.inc"  ' The Common Controls include file !
                                ' *************************************************************
                                '              EZGUI Library Constants and Declares
                                ' *************************************************************
                                DECLARE SUB EZLIB_InitFonts()
                                DECLARE SUB EZLIB_DeleteFonts()
                                DECLARE SUB EZLIB_FixSize(BYVAL hDlg&, BYVAL Style&, BYVAL HasMenu&)
                                DECLARE FUNCTION EZLIB_IsTooltip(BYVAL lParam AS LONG) AS LONG
                                DECLARE FUNCTION EZLIB_TooltipID(BYVAL lParam AS LONG) AS LONG
                                DECLARE SUB EZLIB_SetTooltipText(BYVAL lParam AS LONG, TipText$)
                                DECLARE FUNCTION EZLIB_IsTab(BYVAL lParam AS LONG) AS LONG
                                DECLARE FUNCTION EZLIB_TabID(BYVAL lParam AS LONG) AS LONG
                                DECLARE FUNCTION EZLIB_TabNum(BYVAL lParam AS LONG) AS LONG
                                DECLARE SUB EZLIB_AddTabs(BYVAL hDlg AS LONG, BYVAL IDNum&, BYVAL TabText$)
                                DECLARE SUB EZLIB_DefColors()
                                DECLARE SUB EZLIB_DeleteBrushes()
                                DECLARE FUNCTION EZLIB_QBColor(N&) AS LONG
                                DECLARE SUB EZLIB_ShowControl(BYVAL hWnd&, BYVAL ID&, BYVAL SFlag&)
                                ' *************************************************************
                                '              Application Constants and Declares
                                ' *************************************************************
                                %FORM1_TEXT1              = 100
                                ' --------------------------------------------------
                                DECLARE SUB ShowDialog_Form1(BYVAL hParent&)
                                DECLARE CALLBACK FUNCTION Form1_DLGPROC
                                ' --------------------------------------------------
                                DECLARE CALLBACK FUNCTION CBF_FORM1_TEXT1()
                                ' (1) Put NEXT DIALOG Constant and Declare code after here :
                                
                                ' *************************************************************
                                '            Application Global Variables and Types
                                ' *************************************************************
                                GLOBAL App_Brush&()
                                GLOBAL App_Color&()
                                GLOBAL App_Font&()
                                GLOBAL hForm1&    ' Dialog handle
                                ' (2) Put NEXT DIALOG Globals code after here :
                                
                                ' *************************************************************
                                '                    Application Entrance
                                ' *************************************************************
                                FUNCTION PBMAIN
                                  LOCAL MoveTime&
                                  LOCAL MoveString$
                                  LOCAL Count&
                                  LOCAL CC1 AS INIT_COMMON_CONTROLSEX
                                  '
                                  CC1.dwSize=SIZEOF(CC1)
                                  CC1.dwICC=%ICC_WIN95_CLASSES
                                  InitCommonControlsEX CC1
                                  EZLIB_DefColors
                                  EZLIB_InitFonts
                                  '
                                  ShowDialog_Form1 0
                                  MoveString$ = "GTE 42 5/8    IBM 102 1/2    ADP 22 3/16    XON 166 5/8    ALA 99 1/8    " + _
                                                "DDC 12 3/8   UTE 87   OMC 31.25    SLB 108.90    DJII 1622   NASD 3381"
                                '  MoveString$ = "Now is the time for all good folks to come to the aid of their program......               "
                                  '
                                  DO
                                    IF TIMER > MoveTime& + 1 THEN
                                      CONTROL SET TEXT hForm1&, %FORM1_TEXT1, MoveString$
                                      MoveString$ = RIGHT$(MoveString$,(LEN(MoveString$)-1)) + LEFT$(MoveString$,1)
                                      InvalidateRect hForm1&, BYVAL %NULL, %TRUE
                                      UpdateWindow   hForm1&
                                      MoveTime&   = TIMER
                                    END IF
                                    DIALOG DOEVENTS TO Count&
                                  LOOP UNTIL Count&=0
                                  '
                                  EZLIB_DeleteBrushes
                                  EZLIB_DeleteFonts
                                END FUNCTION
                                ' *************************************************************
                                '                    Application Dialogs
                                ' *************************************************************
                                SUB ShowDialog_Form1(BYVAL hParent&)
                                  LOCAL Style&, ExStyle&
                                  '  Variables used for Reading Data in Arrays for Listbox and Combobox
                                  LOCAL N&, CT&
                                  '   hParent& = 0 if no parent Dialog
                                  Style& = %WS_POPUP OR %DS_MODALFRAME OR %WS_CAPTION OR _
                                           %WS_MINIMIZEBOX OR %WS_SYSMENU OR %DS_CENTER
                                  ExStyle& = 0
                                  '
                                  DIALOG NEW hParent&, "Scrolling Marguee", 0, 0,  267,  20, Style&, ExStyle& TO hForm1&
                                    EZLIB_FixSize hForm1&, Style&, 0
                                    ' Layer # 0
                                    CONTROL ADD TEXTBOX, hForm1&,  %FORM1_TEXT1,  "", 5, 5, 256, 12, %WS_CHILD OR _
                                                         %WS_VISIBLE OR %ES_READONLY OR %ES_LEFT OR %WS_BORDER
                                    CONTROL SEND hForm1&,  %FORM1_TEXT1, %WM_SETFONT, App_Font&(1), %TRUE
                                    '
                                  DIALOG SHOW MODELESS hForm1& , CALL Form1_DLGPROC
                                  '
                                END SUB
                                ' *************************************************************
                                '                             Dialog Callback Procedure
                                '                             for Form Form1
                                '                             uses Global Handle - hForm1&
                                ' *************************************************************
                                CALLBACK FUNCTION Form1_DLGPROC
                                  SELECT CASE CBMSG
                                    ' Common Windows Messages you may want to process
                                    ' -----------------------------------------------
                                    CASE %WM_TIMER
                                    CASE %WM_HSCROLL
                                    CASE %WM_VSCROLL
                                    CASE %WM_SIZE
                                    CASE %WM_CLOSE
                                    CASE %WM_DESTROY
                                    CASE %WM_SYSCOMMAND
                                    CASE %WM_PAINT
                                    ' -----------------------------------------------
                                    CASE %WM_CTLCOLORDLG
                                      IF CBLPARAM=CBHNDL THEN
                                        ' Dialogs colors
                                        SetTextColor CBWPARAM, App_Color&(0)
                                        SetBkColor   CBWPARAM, App_Color&( 19)
                                        FUNCTION=App_Brush&( 19)
                                      END IF
                                    CASE %WM_CTLCOLORMSGBOX , %WM_CTLCOLORBTN, %WM_CTLCOLOREDIT,_
                                         %WM_CTLCOLORSTATIC, %WM_CTLCOLORSCROLLBAR, %WM_CTLCOLORLISTBOX
                                      ' Control colors
                                      SELECT CASE GetDlgCtrlID(CBLPARAM)
                                        CASE  %FORM1_TEXT1
                                          SetTextColor CBWPARAM, App_Color&( 0)
                                          SetBkColor   CBWPARAM, App_Color&( 14)
                                          FUNCTION=App_Brush&( 14)
                                        CASE ELSE
                                          FUNCTION=0
                                      END SELECT
                                    CASE %WM_NOTIFY
                                      IF EZLIB_IsTooltip(CBLPARAM) THEN
                                        SELECT CASE EZLIB_TooltipID(CBLPARAM)
                                          CASE ELSE
                                        END SELECT
                                      END IF
                                      IF EZLIB_IsTab(CBLPARAM) THEN
                                        SELECT CASE EZLIB_TabID(CBLPARAM)
                                          CASE ELSE
                                        END SELECT
                                      END IF
                                    CASE %WM_COMMAND
                                      ' Process Messages to Controls that have no Callback Function
                                      ' and Process Messages to Menu Items
                                      SELECT CASE CBCTL
                                        CASE ELSE
                                      END SELECT
                                    CASE ELSE
                                  END SELECT
                                END FUNCTION
                                ' (3) Put NEXT DIALOG Creation / Dialog Procedure code after here :
                                
                                ' *************************************************************
                                '              EZGUI Freeware Dialog Designer Library
                                '
                                '                   see web site at EZGUI.COM
                                '
                                ' Copyright (C) 2000, Christopher R. Boss , All Rights Reserved !
                                '
                                ' This code was Generated by the EZGUI Freeware Dialog Designer
                                ' and may be used ROYALTY FREE, as long as this Copyright notice
                                ' is kept with the source code.
                                ' The Author also gives you the right to post this code on a
                                ' web site and to distribute it to others.
                                ' *************************************************************
                                SUB EZLIB_InitFonts()
                                  REDIM App_Font(0 TO 5)
                                  App_Font(0)=GetStockObject(%SYSTEM_FONT)
                                  App_Font(1)=GetStockObject(%SYSTEM_FIXED_FONT)
                                  App_Font(2)=GetStockObject(%ANSI_VAR_FONT)
                                  App_Font(3)=GetStockObject(%ANSI_FIXED_FONT)
                                  App_Font(4)=GetStockObject(%DEFAULT_GUI_FONT)    ' MS Sans Serif
                                  App_Font(5)=GetStockObject(%OEM_FIXED_FONT)      ' Terminal Font
                                  END SUB
                                ' -------------------------------------------------------------
                                SUB EZLIB_DeleteFonts()
                                  LOCAL N&
                                  ' Fonts 0 to 5 do not need to be deleted
                                  FOR N&=6 TO UBOUND(App_Font)
                                    IF App_Font(N&)<>0 THEN DeleteObject App_Font(N&)
                                  NEXT N&
                                  END SUB
                                ' -------------------------------------------------------------
                                SUB EZLIB_FixSize(BYVAL hDlg&, BYVAL Style&, BYVAL HasMenu&)
                                  LOCAL X&, Y&, W&, H&, XX&, YY&
                                  DIALOG GET SIZE hDlg& TO X&, Y&
                                  IF (Style& AND %WS_CAPTION) = %WS_CAPTION THEN
                                    IF HasMenu& THEN
                                      H&=H&+GetSystemMetrics(%SM_CYCAPTION)
                                    END IF
                                  END IF
                                  IF (Style& AND %WS_HSCROLL) = %WS_HSCROLL THEN
                                    H&=H&+GetSystemMetrics(%SM_CYHSCROLL)
                                  END IF
                                  IF (Style& AND %WS_VSCROLL) = %WS_VSCROLL THEN
                                    W&=W&+GetSystemMetrics(%SM_CYVSCROLL)
                                  END IF
                                  DIALOG PIXELS hDlg&, W&, H& TO UNITS XX&, YY&
                                  X&=X&+XX&
                                  Y&=Y&+YY&
                                  DIALOG SET SIZE hDlg&, X&, Y&
                                END SUB
                                ' -------------------------------------------------------------
                                FUNCTION EZLIB_IsTooltip(BYVAL lParam AS LONG) AS LONG
                                  LOCAL pNM AS NMHDR PTR
                                  pNM=lParam
                                  IF @pNM.code=%TTN_NEEDTEXT THEN FUNCTION=1 ELSE FUNCTION=0
                                END FUNCTION
                                ' -------------------------------------------------------------
                                FUNCTION EZLIB_TooltipID(BYVAL lParam AS LONG) AS LONG
                                  LOCAL pNM AS NMHDR PTR, pTT AS TOOLTIPTEXT PTR
                                  LOCAL IDNum&, UF&
                                  IDNum&=0
                                  pNM=lParam
                                  IF @pNM.code=%TTN_NEEDTEXT THEN
                                    ' Check for Tooltip message
                                    pTT=lParam
                                    UF&[email protected] AND %TTF_IDISHWND
                                    IF UF&=%TTF_IDISHWND THEN
                                      IDNum&=GetDlgCtrlID(@pTT.hdr.idfrom)
                                    ELSE
                                      IDNum&[email protected]
                                    END IF
                                  END IF
                                  FUNCTION=IDNum&
                                END FUNCTION
                                ' -------------------------------------------------------------
                                SUB EZLIB_SetTooltipText(BYVAL lParam AS LONG, TipText$)
                                  LOCAL pNM AS NMHDR PTR, pTT AS TOOLTIPTEXT PTR
                                  pNM=lParam
                                  IF @pNM.code=%TTN_NEEDTEXT THEN
                                    ' Check for Tooltip message
                                    pTT=lParam
                                    IF TipText$<>"" THEN
                                      @pTT.szText=LEFT$(TipText$, 79)+CHR$(0)
                                    END IF
                                  END IF
                                END SUB
                                ' -------------------------------------------------------------
                                FUNCTION EZLIB_IsTab(BYVAL lParam AS LONG) AS LONG
                                  LOCAL pNM AS NMHDR PTR
                                  pNM=lParam
                                  IF @pNM.code=%TCN_SELCHANGE THEN FUNCTION=1 ELSE FUNCTION=0
                                END FUNCTION
                                ' -------------------------------------------------------------
                                FUNCTION EZLIB_TabID(BYVAL lParam AS LONG) AS LONG
                                  LOCAL pNM AS NMHDR PTR
                                  LOCAL IDNum&
                                  pNM=lParam
                                  IF @pNM.code=%TCN_SELCHANGE THEN
                                    IDNum&[email protected]
                                  END IF
                                  FUNCTION=IDNum&
                                END FUNCTION
                                ' -------------------------------------------------------------
                                FUNCTION EZLIB_TabNum(BYVAL lParam AS LONG) AS LONG
                                  LOCAL RV&, pNM AS NMHDR PTR
                                  LOCAL hCtrl AS LONG
                                  pNM=lParam
                                  IF @pNM.code=%TCN_SELCHANGE THEN
                                  [email protected]
                                    RV&=SendMessage(hCtrl, %TCM_GETCURSEL, 0, 0)+1
                                  END IF
                                  FUNCTION=RV&
                                END FUNCTION
                                ' -------------------------------------------------------------
                                SUB EZLIB_AddTabs(BYVAL hDlg AS LONG, BYVAL IDNum&, BYVAL TabText$)
                                  LOCAL pItem AS TC_ITEM, hCtrl&
                                  LOCAL zText AS ASCIIZ*80
                                  LOCAL D$, P&, TB&
                                  IF IDNum&<>0 THEN
                                    hCtrl&=GetDlgItem(hDlg,IDNum&)
                                    IF hCtrl&<>0 THEN
                                      TB&=0
                                      DO
                                        IF TabText$="" THEN EXIT DO
                                        P&=INSTR(TabText$,"|")
                                        IF P&>0 THEN
                                          D$=LEFT$(TabText$,P&-1)
                                          TabText$=MID$(TabText$,P&+1)
                                        ELSE
                                          D$=TabText$
                                          IF TabText$="" THEN EXIT DO
                                          TabText$=""
                                        END IF
                                        pItem.Mask=%TCIF_TEXT
                                        zText=D$+CHR$(0)
                                        pItem.pszText=VARPTR(zText)
                                        SendMessage hCtrl&, %TCM_INSERTITEM, TB&, VARPTR(pItem)
                                        TB&=TB&+1
                                      LOOP
                                    END IF
                                  END IF
                                END SUB
                                ' -------------------------------------------------------------
                                SUB EZLIB_DefColors()
                                  LOCAL T&
                                  REDIM App_Brush&(0 TO 31)
                                  REDIM App_Color&(0 TO 31)
                                  FOR T&=0 TO 31
                                    App_Brush&(T&)=CreateSolidBrush(EZLIB_QBColor(T&))
                                    App_Color&(T&)=EZLIB_QBColor(T&)
                                  NEXT T&
                                END SUB
                                ' -------------------------------------------------------------
                                SUB EZLIB_DeleteBrushes()
                                  LOCAL T&
                                  FOR T&=0 TO 31
                                    DeleteObject App_Brush&(T&)
                                  NEXT T&
                                END SUB
                                ' -------------------------------------------------------------
                                FUNCTION EZLIB_QBColor(N&) AS LONG
                                  LOCAL RV&
                                  SELECT CASE N&
                                    CASE 0
                                    RV&=RGB(0,0,0)       ' Black
                                  CASE 1
                                    RV&=RGB(0,0,128)     ' Blue
                                  CASE 2
                                    RV&=RGB(0,128,0)     ' Green
                                  CASE 3
                                    RV&=RGB(0,128,128)   ' Cyan
                                  CASE 4
                                    RV&=RGB(196,0,0)     ' Red
                                  CASE 5
                                    RV&=RGB(128,0,128)   ' Magenta (Purple)
                                  CASE 6
                                    RV&=RGB(128,64,0)    ' Brown
                                  CASE 7
                                    RV&=RGB(196,196,196) ' White
                                  CASE 8
                                    RV&=RGB(128,128,128) ' Gray
                                  CASE 9
                                    RV&=RGB(0,0, 255)    ' Lt. Blue
                                  CASE 10
                                    RV&=RGB(0,255,0)     ' Lt. Green
                                  CASE 11
                                    RV&=RGB(0,255,255)   ' Lt. Cyan
                                  CASE 12
                                    RV&=RGB(255,0,0)     ' Lt. Red
                                  CASE 13
                                    RV&=RGB(255,0,255)   ' Lt. magenta (Purple)
                                  CASE 14
                                    RV&=RGB(255,255,0)   ' Yellow
                                  CASE 15
                                    RV&=RGB(255,255,255) ' Bright White
                                  CASE 16   ' - Extended QB colors Pastel version -
                                    RV&=RGB(164,164,164)
                                  CASE 17
                                    RV&=RGB(128,160,255)
                                  CASE 18
                                    RV&=RGB(160,255,160)
                                  CASE 19
                                    RV&=RGB(160,255,255)
                                  CASE 20
                                    RV&=RGB(255,160,160)
                                  CASE 21
                                    RV&=RGB(255,160,255)
                                  CASE 22
                                    RV&=RGB(255,255,160)
                                  CASE 23
                                    RV&=RGB(212,212,212)
                                  CASE 24
                                    RV&=RGB(180,180,180)
                                  CASE 25
                                    RV&=RGB(188,220,255)
                                  CASE 26
                                    RV&= RGB(220,255,220)
                                  CASE 27
                                    RV&=RGB(220,255,255)
                                  CASE 28
                                    RV&=RGB(255,220,220)
                                  CASE 29
                                    RV&=RGB(255,220,255)
                                  CASE 30
                                    RV&=RGB(255,255,220)
                                  CASE 31
                                    RV&=RGB(228,228,228)
                                  CASE ELSE
                                    RV&=RGB(0,0,0)
                                  END SELECT
                                  FUNCTION=RV&
                                END FUNCTION
                                 ' -------------------------------------------------------------
                                SUB EZLIB_ShowControl(BYVAL hWnd&, BYVAL ID&, BYVAL SFlag&)
                                  LOCAL hCtrl&
                                  IF IsWindow(hWnd&) THEN
                                    IF ID&<>0 THEN
                                      hCtrl&=GetDlgItem(hWnd&,ID&)
                                      IF SFlag&=0 THEN
                                        ShowWindow hCtrl&, %SW_HIDE
                                      ELSE
                                        ShowWindow hCtrl&, %SW_SHOW
                                      END IF
                                    END IF
                                  END IF
                                END SUB
                                 ' -------------------------------------------------------------
                                ' *************************************************************
                                '             End of EZGUI Dynamic Dialogs Library
                                ' *************************************************************
                                ------------------

                                Comment


                                • #17
                                  Hi,

                                  Game?

                                  Should check this book: Trick of the Windows game programming Gurus

                                  by Andre Lamothe, ISBN: 0-672-31361-8

                                  This book give you far more then "game" it had most of you need for
                                  Windows programming and a lot of Algorithms(even for Physic)and
                                  AI.

                                  Still in VC++, but the SDK style are close to PBdll.



                                  ------------------

                                  Comment

                                  Working...
                                  X