Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. i need some opinion on displaying fonts in dialog box.

i need some opinion on displaying fonts in dialog box.

Scheduled Pinned Locked Moved C / C++ / MFC
question
12 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cyn8
    wrote on last edited by
    #1

    Hi there, I have a dialog application. i want to display some text in a box(maybe an edit box but with multiple lines).It is sumthing like the diagram below except replace the dash line with continues one(i looks like a normal rectangle. The background will be in black n the text is green. And this is just for displaying(no editing is required) But how can i do this? _______ |input1| | | |input2| | | |input3| |______ |

    R K 3 Replies Last reply
    0
    • C cyn8

      Hi there, I have a dialog application. i want to display some text in a box(maybe an edit box but with multiple lines).It is sumthing like the diagram below except replace the dash line with continues one(i looks like a normal rectangle. The background will be in black n the text is green. And this is just for displaying(no editing is required) But how can i do this? _______ |input1| | | |input2| | | |input3| |______ |

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      cyn8 wrote:

      And this is just for displaying(no editing is required) But how can i do this?

      If no editing is required, then simply use static text and color them as you like. Search CP. There are heaps of articles on this. AFAIK you cannot change the white color of an edit control to any other color!


      Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

      J H C 3 Replies Last reply
      0
      • C cyn8

        Hi there, I have a dialog application. i want to display some text in a box(maybe an edit box but with multiple lines).It is sumthing like the diagram below except replace the dash line with continues one(i looks like a normal rectangle. The background will be in black n the text is green. And this is just for displaying(no editing is required) But how can i do this? _______ |input1| | | |input2| | | |input3| |______ |

        K Offline
        K Offline
        Kotesh N
        wrote on last edited by
        #3

        i think this site will help you alot www.flounder.com, download option will be there and click the option there win32progming will be appeared, download the al;l the code to your pc. Chinna

        1 Reply Last reply
        0
        • C cyn8

          Hi there, I have a dialog application. i want to display some text in a box(maybe an edit box but with multiple lines).It is sumthing like the diagram below except replace the dash line with continues one(i looks like a normal rectangle. The background will be in black n the text is green. And this is just for displaying(no editing is required) But how can i do this? _______ |input1| | | |input2| | | |input3| |______ |

          K Offline
          K Offline
          Kotesh N
          wrote on last edited by
          #4

          this site will help you alot in win32 programing http://www.flounder.com/download.htm#Complete Win32 CD Contents click Complete Win32 CD Contents Chinna

          1 Reply Last reply
          0
          • R Rajesh R Subramanian

            cyn8 wrote:

            And this is just for displaying(no editing is required) But how can i do this?

            If no editing is required, then simply use static text and color them as you like. Search CP. There are heaps of articles on this. AFAIK you cannot change the white color of an edit control to any other color!


            Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

            J Offline
            J Offline
            James R Twine
            wrote on last edited by
            #5

            brahmma wrote:

            AFAIK you cannot change the white color of an edit control to any other color!

            Sure you can... http://www.codeproject.com/editctrl/enhfocusedit.asp[^] :).    Peace!

            -=- James
            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            See DeleteFXPFiles

            R 1 Reply Last reply
            0
            • R Rajesh R Subramanian

              cyn8 wrote:

              And this is just for displaying(no editing is required) But how can i do this?

              If no editing is required, then simply use static text and color them as you like. Search CP. There are heaps of articles on this. AFAIK you cannot change the white color of an edit control to any other color!


              Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              I think you can change color


              WhiteSky


              R 1 Reply Last reply
              0
              • H Hamid Taebi

                I think you can change color


                WhiteSky


                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #7

                Please see this[^]


                Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                H 1 Reply Last reply
                0
                • J James R Twine

                  brahmma wrote:

                  AFAIK you cannot change the white color of an edit control to any other color!

                  Sure you can... http://www.codeproject.com/editctrl/enhfocusedit.asp[^] :).    Peace!

                  -=- James
                  Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                  Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                  See DeleteFXPFiles

                  R Offline
                  R Offline
                  Rajesh R Subramanian
                  wrote on last edited by
                  #8

                  You have subclassed the edit control, handled your message of interest, created a solid brush and painted your color there! Can you do it without subclassing an edit control? With a plain CEdit control? PS: The requirement of the person who started this thread was to simply display colored text. I would not even think of subclassing an edit control for this purpose.


                  Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                  J 1 Reply Last reply
                  0
                  • R Rajesh R Subramanian

                    Please see this[^]


                    Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                    H Offline
                    H Offline
                    Hamid Taebi
                    wrote on last edited by
                    #9

                    I know with subclassed but you said "you cannot change the white color of an edit control" ;)


                    WhiteSky


                    R 1 Reply Last reply
                    0
                    • H Hamid Taebi

                      I know with subclassed but you said "you cannot change the white color of an edit control" ;)


                      WhiteSky


                      R Offline
                      R Offline
                      Rajesh R Subramanian
                      wrote on last edited by
                      #10

                      It was completely in context with the question that was asked. It is silly to subclass an edit control and handle events and paint, just to display some colored text with background. And of course you will need to subclass to do such stuff. As you subclass it, it is no more the normal edit control. In that article I could see that certain events are not handled properly. For an instance, you cannot paste in the second edit control of that dialogbox. These are all the pitfalls of subclassing, about which we need to be extra careful.


                      Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                      1 Reply Last reply
                      0
                      • R Rajesh R Subramanian

                        You have subclassed the edit control, handled your message of interest, created a solid brush and painted your color there! Can you do it without subclassing an edit control? With a plain CEdit control? PS: The requirement of the person who started this thread was to simply display colored text. I would not even think of subclassing an edit control for this purpose.


                        Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                        J Offline
                        J Offline
                        James R Twine
                        wrote on last edited by
                        #11

                        You do not have to subclass the CEdit control, but you do have to handle its messages in order to paint the colors yourself.  You can do that by handling the messages in the parent window.    The control I wrote uses its own class so that users do not have to keep writing the same handling code over and over.    Peace!

                        -=- James
                        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                        Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                        See DeleteFXPFiles

                        1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          cyn8 wrote:

                          And this is just for displaying(no editing is required) But how can i do this?

                          If no editing is required, then simply use static text and color them as you like. Search CP. There are heaps of articles on this. AFAIK you cannot change the white color of an edit control to any other color!


                          Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                          C Offline
                          C Offline
                          cyn8
                          wrote on last edited by
                          #12

                          hey everyone, Thanks far all the reply. I've manage to do it by using the static text and from reading the articles from this website for examples. Thanks

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups