character display window in a dialog???
-
Hello: I am in the midst of trying to make a small dialog based application that has an interface to a COM port. I need to be able to display the data that comes from the COM port into a text type box that is organized in specific rows and columns similar to a terminal display. I have tried to use an edit control, a static text box and other types of controls but none give me the features I need. I am curious as to whether anyone has any idea of where I can start with this project in order to get it off the ground. Here I list the requirements that are needed for this text display area... - It needs to permit me to use a fixed width pitch for the characters so that distinct columns are produced. It would be nice of the actual font used is selectable but that is not a requirement. - The text area needs to be accessable to dynamically determined row and column positions of the array so that a text string can be displayed. - Any given part of the text needs to be able to be displayed in an alternate color scheme. Ideally the effect that needs to be achieved is to make certain text appear as reverse video to the rest of the text in the box. - It is not really necessary for there to be any kind of cursor in the text area for "user entry of data. Just think of this text area as a display field. - The control mechanism needs to be able to function as a control on a dialog. I am somewhat experienced with creating windows applications but so far all my work has been with dialog based applets. The current project is one of this type and the request for help here is to try to add a small display window to the dialog that works somewhat like the text box of a HyperTerminal window with regards to the display of data characters that will be arriving from a serial port. Any help, discussion, pointers, or sample code would be extremely helpful to me. Note that I am working in a Win32 environment with MFC and Visual C++ Ver 6. Thanks Mike Karas -
-
Hello: I am in the midst of trying to make a small dialog based application that has an interface to a COM port. I need to be able to display the data that comes from the COM port into a text type box that is organized in specific rows and columns similar to a terminal display. I have tried to use an edit control, a static text box and other types of controls but none give me the features I need. I am curious as to whether anyone has any idea of where I can start with this project in order to get it off the ground. Here I list the requirements that are needed for this text display area... - It needs to permit me to use a fixed width pitch for the characters so that distinct columns are produced. It would be nice of the actual font used is selectable but that is not a requirement. - The text area needs to be accessable to dynamically determined row and column positions of the array so that a text string can be displayed. - Any given part of the text needs to be able to be displayed in an alternate color scheme. Ideally the effect that needs to be achieved is to make certain text appear as reverse video to the rest of the text in the box. - It is not really necessary for there to be any kind of cursor in the text area for "user entry of data. Just think of this text area as a display field. - The control mechanism needs to be able to function as a control on a dialog. I am somewhat experienced with creating windows applications but so far all my work has been with dialog based applets. The current project is one of this type and the request for help here is to try to add a small display window to the dialog that works somewhat like the text box of a HyperTerminal window with regards to the display of data characters that will be arriving from a serial port. Any help, discussion, pointers, or sample code would be extremely helpful to me. Note that I am working in a Win32 environment with MFC and Visual C++ Ver 6. Thanks Mike Karas -
use a list control that does what u r looking for..and it also displays in rows and colums..search for more on list in CP and u will find many such articles... cheers Himanshu
-
Hello: I am in the midst of trying to make a small dialog based application that has an interface to a COM port. I need to be able to display the data that comes from the COM port into a text type box that is organized in specific rows and columns similar to a terminal display. I have tried to use an edit control, a static text box and other types of controls but none give me the features I need. I am curious as to whether anyone has any idea of where I can start with this project in order to get it off the ground. Here I list the requirements that are needed for this text display area... - It needs to permit me to use a fixed width pitch for the characters so that distinct columns are produced. It would be nice of the actual font used is selectable but that is not a requirement. - The text area needs to be accessable to dynamically determined row and column positions of the array so that a text string can be displayed. - Any given part of the text needs to be able to be displayed in an alternate color scheme. Ideally the effect that needs to be achieved is to make certain text appear as reverse video to the rest of the text in the box. - It is not really necessary for there to be any kind of cursor in the text area for "user entry of data. Just think of this text area as a display field. - The control mechanism needs to be able to function as a control on a dialog. I am somewhat experienced with creating windows applications but so far all my work has been with dialog based applets. The current project is one of this type and the request for help here is to try to add a small display window to the dialog that works somewhat like the text box of a HyperTerminal window with regards to the display of data characters that will be arriving from a serial port. Any help, discussion, pointers, or sample code would be extremely helpful to me. Note that I am working in a Win32 environment with MFC and Visual C++ Ver 6. Thanks Mike Karas -
I would think about a "owner drawn" control. You derive a CStatic in which you Paint yourself. Then you need a output, for which you make such a control in your dialog resources. It´s a lot of work, but you´ll should enjoy it.:cool: Try this @ home. (B&B)
-
use a list control that does what u r looking for..and it also displays in rows and colums..search for more on list in CP and u will find many such articles... cheers Himanshu
I have looked at all the CList control articles on this web site and tried to study each carefully. I cannot directly see how a list control would be used to simply display a box of text. I did see one article about using the CustomDraw features of the List Control - but that seems way over kill to me....... does it need to be this complicated to support a terminal emulator screen at 25x80 characters with just a reverse video attribute capability? Michael Karas
-
I would think about a "owner drawn" control. You derive a CStatic in which you Paint yourself. Then you need a output, for which you make such a control in your dialog resources. It´s a lot of work, but you´ll should enjoy it.:cool: Try this @ home. (B&B)
Thanks for the suggestion.....unfortunately I have no idea where to start in order to implement such a control. Can you make a suggestion where I can see a sample CStatic control in "Owner Drawn" mode that supports multiple lines (25 in my case) where the string for each row would be independent and each row need to be displayed in a manner with some text in normal video (black char on white background) and some characters in reverse video (white char on black background)? Michael Karas
-
Thanks for the suggestion.....unfortunately I have no idea where to start in order to implement such a control. Can you make a suggestion where I can see a sample CStatic control in "Owner Drawn" mode that supports multiple lines (25 in my case) where the string for each row would be independent and each row need to be displayed in a manner with some text in normal video (black char on white background) and some characters in reverse video (white char on black background)? Michael Karas