Silverfrost Forums

Welcome to our forums

XP Theme for Input Box (CW+)

9 May 2006 9:28 #665

When I use a line in my .rc resource script that reads

1 24 DEFAULT.MANIFEST

my radio buttons, check boxes, drop-down lists, etc all take on the XP-style of display, as desired. However, my integer input boxes such (%rd) have an incomplete box around the input field with no top line for the box above the input field. As a simple example, the following from the CW+ Tutorial exhibits this problem.

  WINAPP 0,0
  PROGRAM FACTOR2
  IMPLICIT NONE
  INCLUDE <WINDOWS.INS>
  INTEGER ANS,NUMBER
  NUMBER=1
  ANS=WINIO@('%BG[BTNFACE]&')
  ANS=WINIO@('%CA[Number Factoriser]&')
  ANS=WINIO@('%IL&',1,2147483647)
  ANS=WINIO@('Number to be factorised: &')
  ANS=WINIO@('%`BG[WHITE]%RD&',NUMBER)
  ANS=WINIO@('%NL%BT[OK]')
  END

Any idea what I am doing wrong? I'd like to see a complete XP-style dialog. Also, is there a way to make the box around the input field blue (like in most other XP-styled inputs I've seen) rather than black?

Thanks, Dennis

Dennis Strong, Strong Concepts

10 May 2006 12:14 #666

Dennis

As far as I know you cannot get the correct border unless you resort to using %di as follows:

Resource file....

#include <windows.h>

1 24 DEFAULT.MANIFEST

1001 DIALOGEX 0, 0, 186, 54 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION 'Number Factoriser' FONT 8, 'MS Shell Dlg', 400, 0, 0x1 BEGIN DEFPUSHBUTTON 'OK',IDOK,41,30,109,14 EDITTEXT 101,106,11,62,12,ES_AUTOHSCROLL LTEXT 'Number to be factorised',-1,16,13,81,8 END

Fortran file.....

WINAPP PROGRAM FACTOR2 INTEGER ANS,NUMBER,WINIO@ NUMBER=1 ANS=WINIO@('%DI&',1001) ANS=WINIO@('%RD',101,NUMBER) END

Please login to reply.