www.digitalmars.com         C & C++   DMDScript  

c++.command-line - resource compiler - borderless edit box?

reply "Daniel Fazekas" <fds mailbox.hu> writes:
I can't figure out how to create a borderless, read-only edit box with the
Digital Mars resource compiler.

The one common syntax any other resource compiler accepts is:

EDITTEXT        IDC_SOMETHING,10,10,100,100,NOT WS_BORDER | ES_MULTILINE |
ES_READONLY

DMC's rcc says "Error: Invalid Numeric Expression", highlighting the letter
T in NOT.
Admittedly this syntax looks strange to me too (it is not about doing a
bitwise OR with NOT WS_BORDER); but apparently this is the correct resource
script syntax.


Changing the line to the following compiles fine:
EDITTEXT        IDC_SOMETHING,10,10,100,100,ES_MULTILINE | ES_READONLY

Only in this case you end up with an ugly black-bordered edit box control.


Using a borderless, read-only edit box instead of static text is considered
good practice by most UI experts, as it lets people to easily select and
copy the text to the clipboard, and is widely used.

--
Daniel
Jan 04 2003
parent reply "Walter" <walter digitalmars.com> writes:
Try using ~ for NOT.

"Daniel Fazekas" <fds mailbox.hu> wrote in message
news:av7u26$187c$1 digitaldaemon.com...
 I can't figure out how to create a borderless, read-only edit box with the
 Digital Mars resource compiler.

 The one common syntax any other resource compiler accepts is:

 EDITTEXT        IDC_SOMETHING,10,10,100,100,NOT WS_BORDER | ES_MULTILINE |
 ES_READONLY

 DMC's rcc says "Error: Invalid Numeric Expression", highlighting the
letter
 T in NOT.
 Admittedly this syntax looks strange to me too (it is not about doing a
 bitwise OR with NOT WS_BORDER); but apparently this is the correct
resource
 script syntax.


 Changing the line to the following compiles fine:
 EDITTEXT        IDC_SOMETHING,10,10,100,100,ES_MULTILINE | ES_READONLY

 Only in this case you end up with an ugly black-bordered edit box control.


 Using a borderless, read-only edit box instead of static text is
considered
 good practice by most UI experts, as it lets people to easily select and
 copy the text to the clipboard, and is widely used.

 --
 Daniel
Jan 04 2003
parent reply "Daniel Fazekas" <fds mailbox.hu> writes:
Already did, the same error occurs.
Also tried to use - and !, or reordering the whole expression, using
parenthesis, no luck either.

I wonder if you or someone else with the GUI resource editor could try to
make it output a borderless edit box control and see what .rc output
results, if the editor could output rc files.

I only have the web download of DMC and thus none of the IDE/GUI stuff.

--
Daniel

"Walter" <walter digitalmars.com> wrote in message
news:av8i79$1j3n$1 digitaldaemon.com...
 Try using ~ for NOT.

 "Daniel Fazekas" <fds mailbox.hu> wrote in message
 news:av7u26$187c$1 digitaldaemon.com...
 I can't figure out how to create a borderless, read-only edit box with
the
 Digital Mars resource compiler.

 The one common syntax any other resource compiler accepts is:

 EDITTEXT        IDC_SOMETHING,10,10,100,100,NOT WS_BORDER | ES_MULTILINE
|
 ES_READONLY

 DMC's rcc says "Error: Invalid Numeric Expression", highlighting the
letter
 T in NOT.
 Admittedly this syntax looks strange to me too (it is not about doing a
 bitwise OR with NOT WS_BORDER); but apparently this is the correct
resource
 script syntax.


 Changing the line to the following compiles fine:
 EDITTEXT        IDC_SOMETHING,10,10,100,100,ES_MULTILINE | ES_READONLY

 Only in this case you end up with an ugly black-bordered edit box
control.
 Using a borderless, read-only edit box instead of static text is
considered
 good practice by most UI experts, as it lets people to easily select and
 copy the text to the clipboard, and is widely used.

 --
 Daniel
Jan 05 2003
parent "Walter" <walter digitalmars.com> writes:
Try doing the math manually, and then entering the resulting constants.

"Daniel Fazekas" <fds mailbox.hu> wrote in message
news:av9jnb$2248$1 digitaldaemon.com...
 Already did, the same error occurs.
 Also tried to use - and !, or reordering the whole expression, using
 parenthesis, no luck either.

 I wonder if you or someone else with the GUI resource editor could try to
 make it output a borderless edit box control and see what .rc output
 results, if the editor could output rc files.

 I only have the web download of DMC and thus none of the IDE/GUI stuff.

 --
 Daniel

 "Walter" <walter digitalmars.com> wrote in message
 news:av8i79$1j3n$1 digitaldaemon.com...
 Try using ~ for NOT.

 "Daniel Fazekas" <fds mailbox.hu> wrote in message
 news:av7u26$187c$1 digitaldaemon.com...
 I can't figure out how to create a borderless, read-only edit box with
the
 Digital Mars resource compiler.

 The one common syntax any other resource compiler accepts is:

 EDITTEXT        IDC_SOMETHING,10,10,100,100,NOT WS_BORDER |
ES_MULTILINE
 |
 ES_READONLY

 DMC's rcc says "Error: Invalid Numeric Expression", highlighting the
letter
 T in NOT.
 Admittedly this syntax looks strange to me too (it is not about doing
a
 bitwise OR with NOT WS_BORDER); but apparently this is the correct
resource
 script syntax.


 Changing the line to the following compiles fine:
 EDITTEXT        IDC_SOMETHING,10,10,100,100,ES_MULTILINE | ES_READONLY

 Only in this case you end up with an ugly black-bordered edit box
control.
 Using a borderless, read-only edit box instead of static text is
considered
 good practice by most UI experts, as it lets people to easily select
and
 copy the text to the clipboard, and is widely used.

 --
 Daniel
Jan 05 2003