updown horizontal control

From: Anil Rodrigues <arodrix_at_weld.com>
Date: Tue, 6 Jul 2010 11:09:56 -0400

Anyone have some ideas of how to widen the arrows in a horizontal
updown control?
Tried playing with font size, window sizes and placement, but can't
make it budge.

code: - hope the crs are taken care of -
thanks, Anil

************************************************

 empty

\ UP-DOWN control for LeftRight arrows, rotate pipe view

0 VALUE hlfrt \ dialog win handle
0 value lrp \ L-R position
0 value hud

create lraccel 1 , 10 ,
 : dbu GetDialogBaseUnits loword * 4 / ;

 PACKAGE DLGCOMP
   s" msctls_updown32"
   (OR UDS_ALIGNRIGHT UDS_ARROWKEYS UDS_HORZ
               UDS_AUTOBUDDY UDS_SETBUDDYINT) CONTROL [LFRT
   #EDIT (OR ES_CENTER WS_BORDER ES_NUMBER WS_TABSTOP) CONTROL [EDITNUM
 END-PACKAGE

 DIALOG dlglr
  [Modeless " Spin Horiz." 22 22 22 22
       (FONT 12, FixedFont)
       (-style WS_SYSMENU WS_BORDER )
       (+STYLE WS_CHILD WS_VISIBLE WS_EX_TOPMOST DS_SETFONT
         WS_CLIPSIBLINGS) ]
  [GROUPBOX " Spin Horiz." -1 05 4 50 35 ]
  [EDITNUM 1001 10 15 40 18
                        (+style DS_SETFONT) ]
  [LFRT 1011 5 15 30 15
                       (+style UDS_WRAP CCS_NORESIZE ) ]
 END-DIALOG

 : lrcl hlfrt 0 to hlfrt DestroyWindow drop ;
 : lrpos hlfrt
         hwnd pad GetWindowRect drop
         pad @rect 66 dbu - swap
                   71 dbu - swap 2swap 2drop
         60 dbu 45 dbu
         movewin drop
 ;
 : lrinit
         hwnd 1011 GetDlgItem to hud
         hud UDM_SETRANGE 0 350 Sendmessage
         hud UDM_SETPOS 0 lrp Sendmessage drop
         hud UDM_SETACCEL 1 lraccel Sendmessage drop
 ;
 : lrchg hWND 1001 0 TRUE GetDlgItemInt to lrp 0 ;

[SWITCH lrMESSAGES ZERO ( -- res)
   WM_ACTIVATE RUNS MODELESS-ACTIVATE
   WM_CLOSE RUN: lrcl 0 ;
   WM_HSCROLL runs lrchg
   WM_INITDIALOG RUN: lrinit -1 ;
SWITCH]

:NONAME ( -- res ) MSG LOWORD lrMESSAGES ; 4 CB: runlr

: dlr ( -- )
    hlfrt 0=
           if
              0 to lrp
              HINST dlglr Hwnd runlr 0 CreateDialogIndirectParam
              to hlfrt
           then lrpos
           hlfrt SW_SHOW ShowWindow DROP
 ;

 dlr

cr .( type "lrcl" to close )
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Tue Jul 06 2010 - 08:16:26 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 06-Feb-2012. Archive updated nightly.