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. Font Dialog problems

Font Dialog problems

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpvisual-studiocomtutorial
5 Posts 2 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.
  • T Offline
    T Offline
    Tom Sapp
    wrote on last edited by
    #1

    I have this very odd problem, my application contains and open, save, and font dialog box in it. I am using the ones that come with Visual Studio already, and when I first run my application and launch the font dialog it comes up all weird looking, see this screen shot, until I launch either the open or save dialogs. I dont have to do anything with them other than open them and then cancel them and once I do the font dialog works like it should. Anyone have any suggestions as to why this may be happening or how to fix it? Thanks, Tom Sapp http://www.sappsworld.com -- modified at 23:41 Saturday 5th November, 2005

    T G 2 Replies Last reply
    0
    • T Tom Sapp

      I have this very odd problem, my application contains and open, save, and font dialog box in it. I am using the ones that come with Visual Studio already, and when I first run my application and launch the font dialog it comes up all weird looking, see this screen shot, until I launch either the open or save dialogs. I dont have to do anything with them other than open them and then cancel them and once I do the font dialog works like it should. Anyone have any suggestions as to why this may be happening or how to fix it? Thanks, Tom Sapp http://www.sappsworld.com -- modified at 23:41 Saturday 5th November, 2005

      T Offline
      T Offline
      Tom Sapp
      wrote on last edited by
      #2

      Ok, the even weirder part is this happens with the MessageBox.Show as well! Very Very Odd! Screen Shot Thanks, Tom Sapp http://www.sappsworld.com -- modified at 23:42 Saturday 5th November, 2005

      1 Reply Last reply
      0
      • T Tom Sapp

        I have this very odd problem, my application contains and open, save, and font dialog box in it. I am using the ones that come with Visual Studio already, and when I first run my application and launch the font dialog it comes up all weird looking, see this screen shot, until I launch either the open or save dialogs. I dont have to do anything with them other than open them and then cancel them and once I do the font dialog works like it should. Anyone have any suggestions as to why this may be happening or how to fix it? Thanks, Tom Sapp http://www.sappsworld.com -- modified at 23:41 Saturday 5th November, 2005

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #3

        Hmm. It looks like the static controls in the dialogs aren't loading (or painting) correctly, while the dialogs themselves are OK. Note that these are common dialogs, provided by Windows, and don't "come with" Visual Studio. That said, are you trying to customize these dialogs at all? Are you creating your own class, derived from CFontDialog? Post some of your code where you are using these dialogs, and we'll take a look.


        Software Zen: delete this;

        T 1 Reply Last reply
        0
        • G Gary R Wheeler

          Hmm. It looks like the static controls in the dialogs aren't loading (or painting) correctly, while the dialogs themselves are OK. Note that these are common dialogs, provided by Windows, and don't "come with" Visual Studio. That said, are you trying to customize these dialogs at all? Are you creating your own class, derived from CFontDialog? Post some of your code where you are using these dialogs, and we'll take a look.


          Software Zen: delete this;

          T Offline
          T Offline
          Tom Sapp
          wrote on last edited by
          #4

          Other than this code called on a menu click: if ( fdFont->ShowDialog() == DialogResult::OK ) rtbDocument->Font = fdFont->Font; all the other code I have is to set options on the dialog to have a minimum size and maximum size. I haven't made a custom object or anything, just used what ever was added when I dragged the font dialog tool from the toolbox to the form. It also happens with the MessageBox.Show code as well. Here is that code: MessageBox::Show( this, message, caption, buttons, MessageBoxIcon::Question, MessageBoxDefaultButton::Button1 ); It's very weird and if you would like to, you can download the project here and take a look at all the code. Thanks, Tom Sapp http://www.sappsworld.com

          G 1 Reply Last reply
          0
          • T Tom Sapp

            Other than this code called on a menu click: if ( fdFont->ShowDialog() == DialogResult::OK ) rtbDocument->Font = fdFont->Font; all the other code I have is to set options on the dialog to have a minimum size and maximum size. I haven't made a custom object or anything, just used what ever was added when I dragged the font dialog tool from the toolbox to the form. It also happens with the MessageBox.Show code as well. Here is that code: MessageBox::Show( this, message, caption, buttons, MessageBoxIcon::Question, MessageBoxDefaultButton::Button1 ); It's very weird and if you would like to, you can download the project here and take a look at all the code. Thanks, Tom Sapp http://www.sappsworld.com

            G Offline
            G Offline
            Gary R Wheeler
            wrote on last edited by
            #5

            Tom, I downloaded your project. I ran both the debug and release executables on my machine. The font dialog displayed correctly in both cases. It looks like your project is a managed C++ .NET application. Unfortunately, my expertise is in Win32 and MFC applications (which is why this is the only forum in which I tend to answer questions). You may want to repost your question in the C++/CLI forum[^]. Good luck, and sorry I couldn't be of help.


            Software Zen: delete this;

            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