c++.command-line - resource compiler - borderless edit box?
- Daniel Fazekas (18/18) Jan 04 2003 I can't figure out how to create a borderless, read-only edit box with t...
- Walter (6/24) Jan 04 2003 Try using ~ for NOT.
- Daniel Fazekas (14/49) Jan 05 2003 Already did, the same error occurs.
- Walter (6/58) Jan 05 2003 Try doing the math manually, and then entering the resulting constants.
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
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 theletterT 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 correctresourcescript 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 isconsideredgood 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
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...theI can't figure out how to create a borderless, read-only edit box with|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_MULTILINEcontrol.ES_READONLY DMC's rcc says "Error: Invalid Numeric Expression", highlighting theletterT 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 correctresourcescript 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 boxUsing a borderless, read-only edit box instead of static text isconsideredgood 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
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...ES_MULTILINETry using ~ for NOT. "Daniel Fazekas" <fds mailbox.hu> wrote in message news:av7u26$187c$1 digitaldaemon.com...theI can't figure out how to create a borderless, read-only edit box withDigital Mars resource compiler. The one common syntax any other resource compiler accepts is: EDITTEXT IDC_SOMETHING,10,10,100,100,NOT WS_BORDER ||aES_READONLY DMC's rcc says "Error: Invalid Numeric Expression", highlighting theletterT in NOT. Admittedly this syntax looks strange to me too (it is not about doingandcontrol.bitwise OR with NOT WS_BORDER); but apparently this is the correctresourcescript 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 boxUsing a borderless, read-only edit box instead of static text isconsideredgood practice by most UI experts, as it lets people to easily selectcopy the text to the clipboard, and is widely used. -- Daniel
Jan 05 2003