Language Alphabets Box Drawing Popup


Hi


Box drawing ---------------------------------------------------------

%test = 0 '1 for test as exe, 0 for dll

#if %test

  #compile exe

#else

  #compile dll "BoxDrawPopup.dll"

#endif

#dim all

global ghFont16, ghFont10 as dword

global gRowStr as wstring

#resource icon, 301, "BoxDraw.ico"

#resource bitmap, 302, "ClpBd22_22.bmp"

sub OutputEmpty (byval hParent as dword)

  local hOutEmpty, hFontBold as dword

  font new "Microsoft Sans Serif", 12, 1, 1, 0, 0 to hFontBold

  dialog new hParent, "", , , 66, 20, %ds_nofailcreate or %ds_setfont or _

     %ws_popup, %ws_ex_left or %ws_ex_ltrreading to hOutEmpty

  dialog set color hOutEmpty, %white, &h0000D8F4

  control add label, hOutEmpty, 1000, "The output buffer" + $$crlf + _

                                      "is already empty.", 1, 1, 64, 18, _

                                      %ss_center, %ws_ex_left

  control set color hOutEmpty, 1000, %white, &h0000D8F4

  control set font hOutEmpty, 1000, hFontBold

  beep

  sleep 250

  dialog show modeless hOutEmpty

  sleep 3000

  dialog end hOutEmpty

  font end hFontBold

end sub



'Control IDs not in callback

%ID_DblLbl = 1001

%ID_LiteLbl = 1002

%ID_HvyLbl = 1003

%ID_DblLiteLbl = 1004

%ID_HvyLiteLbl = 1005

%ID_ModeFrame = 1006

%ID_MiscLbl = 1007

%ID_DashLbl = 1008

%ID_BuiltLbl = 1009

%ID_LineTxtBx = 1010

%ID_CharCntLbl = 1011

%ID_CharCntTxtBx = 1012

'Control IDs in callback = = = = = = = = = = = = = = = = = = = = = = = = = = = =

%ID_DrawCharOpt = &h24FB

%ID_CharHexOpt = &h24FC

%ID_CharDecOpt = &h24FD

%ID_BackSpcBtn = &h24FE

%ID_LineToClipBdBtn = &h24FF

'Box Character buttons

'Double Light Line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

%ID_DblDownRiteBtn = &h2554

%ID_DblHorzBtn =  &h2550

%ID_DblHorzDownBtn =  &h2566

%ID_DblDownLeftBtn  = &h2557

%ID_DblVertBtn = &h2551

%ID_DblVertRiteBtn = &h2560

%ID_DblVertLeftBtn = &h2563

%ID_DblVertHorzBtn = &h256C

%ID_DblUpRiteBtn = &h255A

%ID_DblHorzUpBtn = &h2569

%ID_DblUpLeftBtn = &h255D

'Single Light - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

%ID_LiteDownRiteBtn = &h250C

%ID_LiteHorzBtn = &h2500

%ID_LiteHorzDownBtn = &h252C

%ID_LiteDownLeftBtn = &h2510

%ID_LiteVertBtn = &h2502

%ID_LiteVertRiteBtn  = &h251C

%ID_LiteVertHorzBtn = &h253C

%ID_LiteVertLeftBtn = &h2524

%ID_LiteUpRiteBtn = &h2514

%ID_LiteHorzUpBtn = &h2534

%ID_LiteUpLeftBtn = &h2518

'Curve & stub  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

'--row1

%ID_ArcDownRiteBtn = &h256D

%ID_LiteLeftStubBtn = &h2574

%ID_LiteRiteStubBtn = &h2576

%ID_ArcDownLeftBtn = &h256E

'--row2

%ID_LiteUpStubBtn = &h2575

%ID_HvyUpStubBtn = &h2579

%ID_HvyDownStubBtn = &h257B

%ID_LiteDownStubBtn = &h2577

'--row3

%ID_HvyLeftStubBtn = &h2578

%ID_HvyRiteStubBtn = &h257A

%ID_LiteDiagCrossBtn = &h2573

'--row4

%ID_ArcUpRiteBtn = &h2570

%ID_ArcUpLeftBtn = &h256F

%ID_LiteDiagDwnRiteUpLeftBtn = &h2571

%ID_LiteDiagUpLeftDwnRiteBtn = &h2572

'Double and Light  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

%ID_DblRghtLiteDownBtn = &h2552

%ID_DblDownLiteRghtBtn = &h2553

%ID_DblHorzLiteDownBtn = &h2564

%ID_DblDownLiteHorzBtn = &h2565

%ID_DblLftLiteDownBtn = &h2555

%ID_DblDownLiteLftBtn = &h2556

%ID_DblVertLiteRght = &h255F

%ID_DblRghtLiteVert = &h255E

%ID_DblVertLiteHorzBtn = &h256B

%ID_DblHorzLiteVertBtn = &h256A

%ID_DblLeftLiteVertBtn = &h2561

%ID_DblVertLiteLftBtn = &h2562

%ID_DblRghtLiteUpBtn = &h2558

%ID_DblUpLiteRghtBtn = &h2559

%ID_DblHorzLiteUpBtn = &h2567

%ID_DblUpLiteHorzBtn = &h2568

%ID_DblLeftLiteUpBtn = &h255B

%ID_DblUpLiteLftBtn = &h255C

'Dashed Lines

'--row11

%ID_Lite2DashHorzBtn = &h254C

%ID_Lite2DashVertBtn = &h254E

%ID_Lite3DashHorzBtn = &h2504

%ID_Lite3DashVertBtn = &h2506

%ID_Lite4DashHorzBtn = &h2508

%ID_Lite4DashVertBtn = &h250A

'--row12

%ID_Hvy2DashHorzBtn = &h254D

%ID_Hvy2DashVertBtn = &h254F

%ID_Hvy3DashHorzBtn = &h2505

%ID_Hvy3DashVertBtn = &h2507

%ID_Hvy4DashHorzBtn = &h2509

%ID_Hvy4DashVertBtn = &h250B

'Heavy buttons

%ID_HvyDownRghtBtn = &h250F

%ID_HvyHorzBtn = &h2501

%ID_HvyHorzDownBtn = &h2533

%ID_HvyLftDownBtn = &h2513

%ID_HvyVeRiteBtn = &h2503

%ID_HvyRiteVertBtn = &h2523

%ID_HvyHorzVeRiteBtn = &h254B

%ID_HvyLeftVertBtn = &h252B

%ID_HvyRghtUpBtn = &h2517

%ID_HvyHorzUpBtn = &h253B

%ID_HvyLftUpBtn = &h251B

'Heavy and Lite combination buttons

'--row6

%ID_HvyRiteLiteDownBtn = &h250D

%ID_HvyDownLiteRiteBtn = &h250E

%ID_HvyLftLiteRghtBtn = &h257E

%ID_HvyRghtLiteLftBtn = &h257C

%ID_HvyHorzLiteDownBtn = &h252F

%ID_HvyLftDownLiteRghtBtn = &h2531

%ID_HvyLftLiteRiteDownBtn = &h252D

%ID_HvyLeftLiteDownBtn = &h2511

%ID_HvyDownLiteLeftBtn = &h2512

'--row7

%ID_HvyUpLiteDownBtn = &h257F

%ID_HvyDownLiteUpBtn = &h257D

%ID_HvyRiteDownLiteLeftBtn = &h2532

%ID_HvyRiteLiteLeftDownBtn = &h252E

%ID_HvyDownLiteHorzBtn = &h2530

'--row8

%ID_HvyUpRiteLiteDownBtn = &h2521

%ID_HvyVertLiteRiteBtn = &h2520

%ID_HvyLeftLiteRiteVertBtn = &h253D

%ID_HvyHorzLiteLeftVertBtn = &h253E

%ID_HvyHorzLiteVertBtn = &h253F

%ID_HvyUpLiteDownHorzBtn = &h2540

%ID_HvyDownLiteUpHorzBtn = &h2541

%ID_HvyLeftLiteVertBtn = &h2525

%ID_HvyUpLiteLeftDownBtn = &h2526

'--row9

%ID_HvyRiteLiteVertBtn = &h251D

%ID_HvyUpLiteRiteDownBtn = &h251E

%ID_HvyVertLiteHorzBtn = &h2542

%ID_HvyLeftUpLiteRiteDownBtn = &h2543

%ID_HvyUpRiteLiteLeftDownBtn = &h2544

%ID_HvyLeftDownLiteRiteUpBtn = &h2545

%ID_HvyRiteDownLiteLeftUpBtn = &h2546

%ID_HvyDownLiteLeftUpBtn = &h2527

%ID_HvyVertLiteLeftBtn = &h2528

'--row10

%ID_HvyDownLiteRiteUpBtn = &h251F

%ID_HvyRiteDownLiteUpBtn = &h2522

%ID_HvyHorzUpLiteDownBtn = &h2547

%ID_HvyHorzDownLiteUpBtn = &h2548

%ID_HvyVertLeftLiteRiteBtn = &h2549

%ID_HvyVertRiteLiteLeftBtn = &h254A

%ID_HvyLeftUpLiteDownBtn = &h2529

%ID_HvyLeftDownLiteUpBtn = &h252A

'--row11

%ID_HvyLeftLiteRiteUpBtn = &h2535

%ID_HvyRiteLiteLeftUpBtn = &h2536

%ID_HvyHorzLiteUpBtn = &h2537

'--row12

%ID_HvyRiteLiteUpBtn = &h2515

%ID_HvyUpLiteRiteBtn = &h2516

%ID_HvyUpLiteHorzBtn = &h2538

%ID_HvyLeftUpLiteRiteBtn = &h2539

%ID_HvyRiteUpLiteLeftBtn = &h253A

%ID_HvyLeftLiteUpBtn = &h2519

%ID_HvyUpLiteLeftBtn = &h251A



'------------------------------------------------------------------- callback --

%CharMode = 1

%HexMode = 2

%DecMode = 3

callback function BoxDrawDlgCB() as long

  static ClipBdMode, CharCnt as long

  local TmpStr as wstring

  if cb.msg = %wm_command then

    select case as long cb.ctl

      case %ID_DrawCharOpt '.  .  .  .  .  .  .  .  .  .  To ClipBd Options .  .

        gosub EnableDrawButtons

        ClipBdMode = %CharMode

      case %ID_CharHexOpt

        gosub EnableDrawButtons

        ClipBdMode = %HexMode

      case %ID_CharDecOpt

        gosub EnableDrawButtons

        ClipBdMode = %DecMode

      case %ID_BackSpcBtn ' .  .  .  .  .  .  .  .  .  .  .  .   Bachspace  .  .

        if (cb.ctlmsg = %bn_clicked) then

          if CharCnt then

            decr CharCnt

            clipboard reset

            if CharCnt = 0 then 'zero due to this click of Backspace

              gRowStr = ""

              control set text cb.hndl, %ID_CharCntTxtBx, "0"

              control set text cb.hndl, %ID_LineTxtBx, ""

            else 'still something for output

              control set text cb.hndl, %ID_CharCntTxtBx, dec$(CharCnt)

              control get text cb.hndl, %ID_LineTxtBx to TmpStr

              control set text cb.hndl, %ID_LineTxtBx, left$(TmpStr, -1)

              if ClipBdMode = 1 then

                gRowStr = left$(gRowStr, -1)

              else 'ClipBdMode is 2 or 3

                gRowStr = left$(gRowStr, (instr(-1, gRowStr, ",")) - 1)

              end if

            end if

          else 'CharCnt zero from previous click of Backspace (or new start) - -

            OutputEmpty (cb.hndl) 'so BEEP and short Popup message

          end if

        end if

      case %ID_LineToClipBdBtn '  .  .  .  .  .  .  .  .   ClipBoard button .  .

        clipboard set text gRowStr

        gRowStr = ""

        CharCnt = 0

        control set text cb.hndl, %ID_CharCntTxtBx, "0"

        control set text cb.hndl, %ID_LineTxtBx, ""

      case %ID_LiteHorzBtn to %ID_HvyUpLiteDownBtn '.  .  Draw Char Buttons .  .

        control get text cb.hndl, %ID_LineTxtBx to TmpStr

        control set text cb.hndl, %ID_LineTxtBx, TmpStr + chr$$(cb.ctl)

        incr CharCnt

        control set text cb.hndl, %ID_CharCntTxtBx, dec$(CharCnt)

        if (CharCnt > 1) and (ClipBdMode > 1) then

          gRowStr += ", "

        end if

        select case const ClipBdMode

          case %CharMode

            gRowStr += chr$$(cb.ctl)

            clipboard set text chr$$(cb.ctl)

          case %HexMode

            gRowStr += hex$(cb.ctl, 4)

            clipboard set text hex$(cb.ctl, 4)

          case %DecMode

            gRowStr += dec$(cb.ctl)

            clipboard set text dec$(cb.ctl)

        end select

    end select

  end if

  exit function

  EnableDrawButtons:

    'temporary use of ClipBdMode for current button ID

    for ClipBdMode = %ID_LiteHorzBtn to %ID_HvyUpLiteDownBtn

      control enable cb.hndl, ClipBdMode

    next

  return

end function

'-------------------------------------------------------------------------------

%CharButSzX = 8

%Col1  = 4

%Col2  = %Col1 + %CharButSzX

%Col3  = %Col2 + %CharButSzX

%Col4  = %Col3 + %CharButSzX

%Col5  = %Col4 + %CharButSzX

%Col6  = %Col5 + %CharButSzX

%Col7  = %Col6 + %CharButSzX

%Col8  = %Col7 + %CharButSzX

%Col9  = %Col8 + %CharButSzX

%Col10 = %Col9 + %CharButSzX

%Col11 = %Col10 + %CharButSzX

%Col12 = %Col11 + %CharButSzX

%Col13 = %Col12 + %CharButSzX

%Col14 = %Col13 + %CharButSzX

%Col15 = %Col14 + %CharButSzX

%Col16 = %Col15 + %CharButSzX

%Col17 = %Col16 + %CharButSzX

%Col18 = %Col17 + %CharButSzX

%Col19 = %Col18 + %CharButSzX

%CharButSzY = 12

%Row1 = 41

%Row2 = %Row1 + %CharButSzY

%Row3 = %Row2 + %CharButSzY

%Row4 = %Row3 + %CharButSzY

%Row5 = %Row4 + %CharButSzY

%Row6 = %Row5 + %CharButSzY

%Row7 = %Row6 + %CharButSzY

%Row8 = %Row7 + %CharButSzY

%Row9 = %Row8 + %CharButSzY

%Row10 = %Row9 + %CharButSzY

%Row11 = %Row10 + %CharButSzY

%Row12 = %Row11 + %CharButSzY

'

%DrawButStyle = %bs_center or %bs_vcenter or %ws_disabled or %ws_tabstop



'-------------------------------------------------------------------------------

sub DrawCharDlg alias "DrawCharDlg" (byval hBoxDrawDlgt as dword, _

                                     byval DlgPosX as long, _

                                     byval DlgPosY as long, _

                                     byval DlgSzX as long, _

                                     byval DlgSzY as long) export

  local hBoxDrawDlg as dword

  #if %Test

  dialog new 0, "Box Drawing", , , 160, 220, %ds_3dlook or %ds_modalframe or _

     %ds_nofailcreate or %ds_setfont or %ws_caption or %ws_clipsiblings or _

     %ws_dlgframe or %ws_minimizebox or %ws_popup or %ws_sysmenu, _

     %ws_ex_left or %ws_ex_ltrreading or %ws_ex_rightscrollbar to hBoxDrawDlg

  #else

    dialog new 0, "Box Drawing", DlgPosX + 20, 220 - DlgSzY + DlgPosY , 160, 220, _

    %ds_3dlook or %ds_modalframe or %ds_nofailcreate or %ds_setfont or _

    %ws_caption or %ws_clipsiblings or %ws_dlgframe or %ws_minimizebox or _

    %ws_popup or %ws_sysmenu, %ws_ex_left or %ws_ex_ltrreading or _

    %ws_ex_rightscrollbar to hBoxDrawDlg

  #endif



  dialog set icon hBoxDrawDlg, "#301"

 ' control add button, hBoxDrawDlg, %ID_ExitBtn, "Exit", 2, 2, 20, 15

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  control add option, hBoxDrawDlg, %ID_DrawCharOpt, "The Draw Characters", _

     5, 10, 76, 9, %bs_left or %bs_top or %ws_group or %ws_tabstop, %ws_ex_left

  control add option, hBoxDrawDlg, %ID_CharHexOpt, "Hex Of Characters", _

     86, 10, 69, 9

  control add option, hBoxDrawDlg, %ID_CharDecOpt, "Decimal Of Characters", _

     5, 19, 79, 9

   control add frame, hBoxDrawDlg, %ID_ModeFrame, "Mode For Setting Clipboard", _

     2, 1, 156, 28, %bs_left or %bs_top or %bs_groupbox or %ws_group, _

     %ws_ex_left

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Double Light .

  control add label, hBoxDrawDlg, %ID_DblLbl, " Double", _

     %Col1, %Row1 - 9, %CharButSzX * 4, 9

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 1 .  .

  control add button, hBoxDrawDlg, %ID_DblDownRiteBtn, chr$$(&h2554), _

     %Col1, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblDownRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblHorzBtn, chr$$(&h2550), _

     %Col2, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblHorzDownBtn, chr$$(&h2566), _

     %Col3, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblHorzDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblDownLeftBtn, chr$$(&h2557), _

     %Col4, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblDownLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 2 .  .

  control add button, hBoxDrawDlg, %ID_DblVertBtn, chr$$(&h2551), _

     %Col1, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblVertBtn, ghFont16

     'no Col2, 3 or 4

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 3 .  .

  control add button, hBoxDrawDlg, %ID_DblVertRiteBtn, chr$$(&h2560), _

     %Col1, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblVertRiteBtn, ghFont16

     'no Col 2

  control add button, hBoxDrawDlg, %ID_DblVertHorzBtn, chr$$(&h256C), _

     %Col3, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblVertHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblVertLeftBtn, chr$$(&h2563), _

     %Col4, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblVertLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 4 .  .

  control add button, hBoxDrawDlg, %ID_DblUpRiteBtn, chr$$(&h255A), _

     %Col1, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblUpRiteBtn, ghFont16

     'no Col2

  control add button, hBoxDrawDlg, %ID_DblHorzUpBtn, chr$$(&h2569), _

     %Col3, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblHorzUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblUpLeftBtn, chr$$(&h255D), _

     %Col4, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblUpLeftBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Single Light .

  control add label, hBoxDrawDlg, %ID_LiteLbl, " Light", _

     %Col6, %Row1 - 9, %CharButSzX * 4, 9

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 1 .  .

  control add button, hBoxDrawDlg, %ID_LiteDownRiteBtn, chr$$(&h250C), _

     %Col6 , %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteDownRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteHorzBtn, chr$$(&h2500), _

     %Col7, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteHorzDownBtn, chr$$(&h252C), _

     %Col8, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteHorzDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteDownLeftBtn, chr$$(&h2510), _

     %Col9, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteDownLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 2 .  .

  control add button, hBoxDrawDlg, %ID_LiteVertBtn, chr$$(&h2502), _

     %Col6, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

  control set font hBoxDrawDlg, %ID_LiteVertBtn, ghFont16

     'no Col7, 8 or 9

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 3 .  .

  control add button, hBoxDrawDlg, %ID_LiteVertRiteBtn, chr$$(&h251C), _

     %Col6, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteVertRiteBtn, ghFont16

     'no Col7

  control add button, hBoxDrawDlg, %ID_LiteVertHorzBtn, chr$$(&h253C), _

     %Col8, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteVertHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteVertLeftBtn, chr$$(&h2524), _

     %Col9, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteVertLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 4 .  .

  control add button, hBoxDrawDlg, %ID_LiteUpRiteBtn, chr$$(&h2514), _

     %Col6, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteUpRiteBtn, ghFont16

     'no Col7

  control add button, hBoxDrawDlg, %ID_LiteHorzUpBtn, chr$$(&h2534), _

     %Col8, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteHorzUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteUpLeftBtn, chr$$(&h2518), _

     %Col9, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteUpLeftBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Single Heavy .

  control add label, hBoxDrawDlg, %ID_HvyLbl, " Heavy", _

     %Col11, %Row1 - 9, %CharButSzX * 4, 9

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 1 .  .

  control add button, hBoxDrawDlg, %ID_HvyDownRghtBtn, chr$$(&h250F), _

     %Col11 , %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownRghtBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzBtn, chr$$(&h2501), _

     %Col12, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzDownBtn, chr$$(&h2533), _

     %Col13, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLftDownBtn, chr$$(&h2513), _

     %Col14, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLftDownBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 2 .  .

  control add button, hBoxDrawDlg, %ID_HvyVeRiteBtn, chr$$(&h2503), _

     %Col11, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyVeRiteBtn, ghFont16

     'no Col12, 13 or 14

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 3 .  .

  control add button, hBoxDrawDlg, %ID_HvyRiteVertBtn, chr$$(&h2523), _

     %Col11, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteVertBtn, ghFont16

     'no Col12

  control add button, hBoxDrawDlg, %ID_HvyHorzVeRiteBtn, chr$$(&h254B), _

     %Col13, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzVeRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLeftVertBtn, chr$$(&h252B), _

     %Col14, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftVertBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 4 .  .

  control add button, hBoxDrawDlg, %ID_HvyRghtUpBtn, chr$$(&h2517), _

     %Col11, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRghtUpBtn, ghFont16

     'no Col12

  control add button, hBoxDrawDlg, %ID_HvyHorzUpBtn, chr$$(&h253B), _

     %Col13, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLftUpBtn, chr$$(&h251B), _

     %Col14, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLftUpBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . . . . . .  Misc, (curve & stub) .

  control add label, hBoxDrawDlg, %ID_MiscLbl, " Misc.", _

     %Col16, %Row1 - 9, %CharButSzX * 4, 9

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 1 .  .

  control add button, hBoxDrawDlg, %ID_ArcDownRiteBtn, chr$$(&h256D), _

     %Col16, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_ArcDownRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteLeftStubBtn, chr$$(&h2574), _

     %Col17, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteLeftStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteRiteStubBtn, chr$$(&h2576), _

     %Col18, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteRiteStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_ArcDownLeftBtn, chr$$(&h256E), _

     %Col19, %Row1, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_ArcDownLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 2 .  .

  control add button, hBoxDrawDlg, %ID_LiteUpStubBtn, chr$$(&h2575), _

     %Col16, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteUpStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpStubBtn, chr$$(&h2579), _

     %Col17, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownStubBtn, chr$$(&h257B), _

     %Col18, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteDownStubBtn, chr$$(&h2577), _

     %Col19, %Row2, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteDownStubBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 3 .  .

     'no Col17

  control add button, hBoxDrawDlg, %ID_HvyLeftStubBtn, chr$$(&h2578), _

     %Col17, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyRiteStubBtn, chr$$(&h257A), _

     %Col18, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteStubBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteDiagCrossBtn, chr$$(&h2573), _

     %Col19, %Row3, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteDiagCrossBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 4 .  .

  control add button, hBoxDrawDlg, %ID_ArcUpRiteBtn, chr$$(&h2570), _

     %Col16, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_ArcUpRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteDiagDwnRiteUpLeftBtn, chr$$(&h2571), _

     %Col17, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteDiagDwnRiteUpLeftBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_LiteDiagUpLeftDwnRiteBtn, chr$$(&h2572), _

     %Col18, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_LiteDiagUpLeftDwnRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_ArcUpLeftBtn, chr$$(&h256F), _

     %Col19, %Row4, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_ArcUpLeftBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . .  Double Light / Light Combine .

  control add label, hBoxDrawDlg, %ID_DblLiteLbl, " Double & Light", _

     %Col1, %Row6 - 9, %CharButSzX * 7, 9, %ss_left or %ss_noprefix, %ws_ex_left

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  First is Row 6 .  .

  control add button, hBoxDrawDlg, %ID_DblRghtLiteDownBtn, chr$$(&h2552), _

     %Col1, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblRghtLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblDownLiteRghtBtn, chr$$(&h2553), _

     %Col2, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblDownLiteRghtBtn, ghFont16

     'no Col3

  control add button, hBoxDrawDlg, %ID_DblHorzLiteDownBtn, chr$$(&h2564), _

     %Col4, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblHorzLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblDownLiteHorzBtn, chr$$(&h2565), _

     %Col5, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblDownLiteHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblLftLiteDownBtn, chr$$(&h2555), _

     %Col6, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblLftLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblDownLiteLftBtn, chr$$(&h2556), _

     %Col7, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblDownLiteLftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  no Row 7

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 8 .  .

  control add button, hBoxDrawDlg, %ID_DblRghtLiteVert, chr$$(&h255E), _

     %Col1, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

  control set font hBoxDrawDlg, %ID_DblRghtLiteVert, ghFont16

  control add button, hBoxDrawDlg, %ID_DblVertLiteRght, chr$$(&h255F), _

     %Col2, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

  control set font hBoxDrawDlg, %ID_DblVertLiteRght, ghFont16

    'no Col3

  control add button, hBoxDrawDlg, %ID_DblHorzLiteVertBtn, chr$$(&h256A), _

     %Col4, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblHorzLiteVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblVertLiteHorzBtn, chr$$(&h256B), _

     %Col5, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblVertLiteHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblLeftLiteVertBtn, chr$$(&h2561), _

     %Col6, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblLeftLiteVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblVertLiteLftBtn, chr$$(&h2562), _

     %Col7, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblVertLiteLftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 9 .  .

  control add button, hBoxDrawDlg, %ID_DblRghtLiteUpBtn, chr$$(&h2558), _

     %Col1, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblRghtLiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblUpLiteRghtBtn, chr$$(&h2559), _

     %Col2, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblUpLiteRghtBtn, ghFont16

    'no Col3

  control add button, hBoxDrawDlg, %ID_DblHorzLiteUpBtn, chr$$(&h2567), _

     %Col4, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblHorzLiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblUpLiteHorzBtn, chr$$(&h2568), _

     %Col5, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblUpLiteHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblLeftLiteUpBtn, chr$$(&h255B), _

     %Col6, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblLeftLiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_DblUpLiteLftBtn, chr$$(&h255C), _

     %Col7, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_DblUpLiteLftBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Dashed Lines .

  control add label, hBoxDrawDlg, %ID_DashLbl, " Dashed Lines", _

     %Col1, %Row11 - 9, %CharButSzX * 6, 9

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . Row 11 .  .

  control add button, hBoxDrawDlg, %ID_Lite2DashHorzBtn, chr$$(&h254C), _

     %Col1, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Lite2DashHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Lite2DashVertBtn, chr$$(&h254E), _

     %Col2, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Lite2DashVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Lite3DashHorzBtn, chr$$(&h2504), _

     %Col3, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Lite3DashHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Lite3DashVertBtn, chr$$(&h2506), _

     %Col4, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Lite3DashVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Lite4DashHorzBtn, chr$$(&h2508), _

     %Col5, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Lite4DashHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Lite4DashVertBtn, chr$$(&h250A), _

     %Col6, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Lite4DashVertBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . Row 12 .  .

  control add button, hBoxDrawDlg, %ID_Hvy2DashHorzBtn, chr$$(&h254D), _

     %Col1, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Hvy2DashHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Hvy2DashVertBtn, chr$$(&h254F), _

     %Col2, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Hvy2DashVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Hvy3DashHorzBtn, chr$$(&h2505), _

     %Col3, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Hvy3DashHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Hvy3DashVertBtn, chr$$(&h2507), _

     %Col4, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Hvy3DashVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Hvy4DashHorzBtn, chr$$(&h2509), _

     %Col5, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Hvy4DashHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_Hvy4DashVertBtn, chr$$(&h250B), _

     %Col6, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_Hvy4DashVertBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . Heavy / Light Combine .

  control add label, hBoxDrawDlg, %ID_HvyLiteLbl, " Heavy & Light", _

     %Col9, %Row6 - 9, %CharButSzX * 7, 9, %ss_left or %ss_noprefix, %ws_ex_left

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 6 .  .

  control add button, hBoxDrawDlg, %ID_HvyRiteLiteDownBtn, chr$$(&h250D), _

     %Col9, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownLiteRiteBtn, chr$$(&h250E),_

     %Col10, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLftLiteRghtBtn, chr$$(&h257E), _

     %Col11, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLftLiteRghtBtn, ghFont16

  control add button, hBoxDrawDlg,  %ID_HvyRghtLiteLftBtn, chr$$(&h257C), _

     %Col12, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRghtLiteLftBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzLiteDownBtn, chr$$(&h252F), _

     %Col13, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLftDownLiteRghtBtn, chr$$(&h2531), _

     %Col14, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLftDownLiteRghtBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLftLiteRiteDownBtn, chr$$(&h252D), _

     %Col15, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLftLiteRiteDownBtn, ghFont16

     'no Col16 or 17

  control add button, hBoxDrawDlg, %ID_HvyLeftLiteDownBtn, chr$$(&h2511), _

     %Col18, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownLiteLeftBtn, chr$$(&h2512), _

     %Col19, %Row6, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 7 .  .

  control add button, hBoxDrawDlg, %ID_HvyUpLiteDownBtn, chr$$(&h257F), _

     %Col9, %Row7, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownLiteUpBtn, chr$$(&h257D), _

     %Col10, %Row7, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteUpBtn, ghFont16

      'no Col11 or 12

  control add button, hBoxDrawDlg, %ID_HvyRiteDownLiteLeftBtn, chr$$(&h2532), _

     %Col13, %Row7, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteDownLiteLeftBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyRiteLiteLeftDownBtn, chr$$(&h252E), _

     %Col14, %Row7, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteLiteLeftDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownLiteHorzBtn, chr$$(&h2530), _

     %Col15, %Row7, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteHorzBtn, ghFont16

     'no Col16, 17, 18 or 19

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 8 .  .

  control add button, hBoxDrawDlg, %ID_HvyUpRiteLiteDownBtn, chr$$(&h2521), _

      %Col9, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpRiteLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyVertLiteRiteBtn, chr$$(&h2520), _

      %Col10, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyVertLiteRiteBtn, ghFont16

     'no Col11 or 12

  control add button, hBoxDrawDlg, %ID_HvyLeftLiteRiteVertBtn, chr$$(&h253D), _

     %Col13, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftLiteRiteVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzLiteLeftVertBtn, chr$$(&h253E), _

     %Col14, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzLiteLeftVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzLiteVertBtn, chr$$(&h253F), _

     %Col15, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzLiteVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpLiteDownHorzBtn, chr$$(&h2540), _

     %Col16, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteDownHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownLiteUpHorzBtn, chr$$(&h2541), _

     %Col17, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteUpHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLeftLiteVertBtn, chr$$(&h2525), _

     %Col18, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftLiteVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpLiteLeftDownBtn, chr$$(&h2526), _

     %Col19, %Row8, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteLeftDownBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  Row 9 .  .

  control add button, hBoxDrawDlg, %ID_HvyRiteLiteVertBtn, chr$$(&h251D), _

     %Col9, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteLiteVertBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpLiteRiteDownBtn, chr$$(&h251E), _

     %Col10, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteRiteDownBtn, ghFont16

     'no Col11 or 12

  control add button, hBoxDrawDlg, %ID_HvyVertLiteHorzBtn, chr$$(&h2542), _

     %Col13, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyVertLiteHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLeftUpLiteRiteDownBtn, chr$$(&h2543), _

     %Col14, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftUpLiteRiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpRiteLiteLeftDownBtn, chr$$(&h2544), _

     %Col15, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpRiteLiteLeftDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLeftDownLiteRiteUpBtn, chr$$(&h2545), _

     %Col16, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftDownLiteRiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyRiteDownLiteLeftUpBtn, chr$$(&h2546), _

     %Col17, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteDownLiteLeftUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyDownLiteLeftUpBtn, chr$$(&h2527), _

     %Col18, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteLeftUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyVertLiteLeftBtn, chr$$(&h2528), _

     %Col19, %Row9, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyVertLiteLeftBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . Row 10 .  .

  control add button, hBoxDrawDlg, %ID_HvyDownLiteRiteUpBtn, chr$$(&h251F), _

     %Col9, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyDownLiteRiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyRiteDownLiteUpBtn, chr$$(&h2522), _

     %Col10, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteDownLiteUpBtn, ghFont16

     'no Col11 or 12

  control add button, hBoxDrawDlg, %ID_HvyHorzUpLiteDownBtn, chr$$(&h2547), _

     %Col13, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzUpLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzDownLiteUpBtn, chr$$(&h2548), _

     %Col14, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzDownLiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyVertLeftLiteRiteBtn, chr$$(&h2549), _

     %Col15, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyVertLeftLiteRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyVertRiteLiteLeftBtn, chr$$(&h254A), _

     %Col16, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyVertRiteLiteLeftBtn, ghFont16

     'no Col17

  control add button, hBoxDrawDlg, %ID_HvyLeftUpLiteDownBtn, chr$$(&h2529), _

     %Col18, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftUpLiteDownBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLeftDownLiteUpBtn, chr$$(&h252A), _

     %Col19, %Row10, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftDownLiteUpBtn, ghFont16

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . Row 11 .  .

     'no Col9, 10, 11 or 12

  control add button, hBoxDrawDlg, %ID_HvyLeftLiteRiteUpBtn, chr$$(&h2535), _

     %Col13, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftLiteRiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyRiteLiteLeftUpBtn, chr$$(&h2536), _

     %Col14, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteLiteLeftUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyHorzLiteUpBtn, chr$$(&h2537), _

     %Col15, %Row11, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyHorzLiteUpBtn, ghFont16

     'no Col16, 17, 18 or 19

  ' .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . Row 12 .  .

  control add button, hBoxDrawDlg, %ID_HvyRiteLiteUpBtn, chr$$(&h2515), _

     %Col9, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteLiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpLiteRiteBtn, chr$$(&h2516), _

     %Col10, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteRiteBtn, ghFont16

     'no Col11 or 12

  control add button, hBoxDrawDlg, %ID_HvyUpLiteHorzBtn, chr$$(&h2538), _

     %Col13, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteHorzBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyLeftUpLiteRiteBtn, chr$$(&h2539), _

     %Col14, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftUpLiteRiteBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyRiteUpLiteLeftBtn, chr$$(&h253A), _

     %Col15, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyRiteUpLiteLeftBtn, ghFont16

     'no Col16 or 17

  control add button, hBoxDrawDlg, %ID_HvyLeftLiteUpBtn, chr$$(&h2519), _

     %Col18, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyLeftLiteUpBtn, ghFont16

  control add button, hBoxDrawDlg, %ID_HvyUpLiteLeftBtn, chr$$(&h251A), _

     %Col19, %Row12, %CharButSzX, %CharButSzY, %DrawButStyle, %ws_ex_left

    control set font hBoxDrawDlg, %ID_HvyUpLiteLeftBtn, ghFont16

  '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



  control add label, hBoxDrawDlg, %ID_BuiltLbl, chr$$(32, &h21D3) + " Built Line", _

     4, 197, 37, 9

  control add label, hBoxDrawDlg, %ID_CharCntLbl, "Char Count " + chr$$(&h21D2), _

     48, 193, 43, 9

  control add textbox, hBoxDrawDlg, %ID_CharCntTxtBx, "", _

     92, 193, 20, 10

  control add button,  hBoxDrawDlg, %ID_BackSpcBtn, "Backspace", _

     118, 191, 38, 11

  control add textbox, hBoxDrawDlg, %ID_LineTxtBx, "" , 4, 206, 139, 10



  control set font hBoxDrawDlg, %ID_LineTxtBx, ghFont10

  control add imgbuttonx, hBoxDrawDlg, %ID_LineToClipBdBtn, "#302", 145, 205, 11, 11



  '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  dialog show modal hBoxDrawDlg call BoxDrawDlgCB

end sub

'-------------------------------------------------------------------------------

' Main DLL entry

#if %test   '

function pbmain () as long

  dialog default font "Microsoft Sans Serif", 12, 0, 1

  font new "Consolas", 16, 0, 1, 0, 0 to ghFont16

  font new "Consolas", 10, 0, 1, 0, 0 to ghFont10

  DrawCharDlg 0

  font end ghFont16

  font end ghFont10



end function

#else

function libmain (byval hInstance   as long, _

                  byval fwdReason   as long, _

                  byval lpvReserved as long) as long

  select case fwdReason

    case 1 '%DLL_PROCESS_ATTACH

      'ghInstance = hInstance

      dialog default font "Microsoft Sans Serif", 12, 0, 1

      font new "Consolas", 16, 0, 1, 0, 0 to ghFont16

      font new "Consolas", 10, 0, 1, 0, 0 to ghFont10

      if ghFont16 and ghFont10 then

        function = 1   'success!

      end if

    case 0 '%DLL_PROCESS_DETACH

      font end ghFont16

      font end ghFont10

      function = 1   'success!

    case 2 '%DLL_THREAD_ATTACH

      function = 1   'success!

    case 3 '%DLL_THREAD_DETACH

      function = 1   'success!

  end select

end function

#endif

'


Created on 15 Oct 2021; last edit 15 Oct 2021