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. VC++ in Visual Studio.NET

VC++ in Visual Studio.NET

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++databasehtmlvisual-studio
8 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.
  • R Offline
    R Offline
    Rick Crone
    wrote on last edited by
    #1

    I'm trying to do something that I think is very simple in VC++ 6.0 in the new VC++ in the Visual Studio.NET. I'm getting strange results. It looks like creating a dialog is creating some HTML code as well as the recource (.rc) and DoModal() seems to be using both of them. Here are the steps I'm using. I am creating a VC++ project selecting an MFC Application. I'm changing these defaults: Application type = Single Document Database Support = Header Files Only ODBC (instead of OLE DB) In the last step I'm chaning the CView to a CFormView. The wizard pops a message about no printing support - but I think that's ok. Now I add a resource, it's a dialog - leave the defaults for this test. Make a class from this resource - DIALOG1. On my CFormView I add a button [Do It]... add the #include for my DIALOG1.h and add a message handler for this [Do It] button with this simple code: DIALOG1 d; d.DoModal(); It runs... but the buttons seem to have shadows and there is a 'TODO: Place controls here' text on my dialog. Hey! That message is not on my dialog resource! Hey! In the HTML folder there is a IDR_HTML_DILAOG1 html file.... that's got buttons and the message that are not on my resource, but are displayed when my dialog 'runs'. If you move the buttons on the resource you can see that the 'shadows' are really copies of the [OK] and [CANCEL] buttons that are on my dialog. What's up with this? Is anyone else seeing this stuff? Rick Crone

    B 1 Reply Last reply
    0
    • R Rick Crone

      I'm trying to do something that I think is very simple in VC++ 6.0 in the new VC++ in the Visual Studio.NET. I'm getting strange results. It looks like creating a dialog is creating some HTML code as well as the recource (.rc) and DoModal() seems to be using both of them. Here are the steps I'm using. I am creating a VC++ project selecting an MFC Application. I'm changing these defaults: Application type = Single Document Database Support = Header Files Only ODBC (instead of OLE DB) In the last step I'm chaning the CView to a CFormView. The wizard pops a message about no printing support - but I think that's ok. Now I add a resource, it's a dialog - leave the defaults for this test. Make a class from this resource - DIALOG1. On my CFormView I add a button [Do It]... add the #include for my DIALOG1.h and add a message handler for this [Do It] button with this simple code: DIALOG1 d; d.DoModal(); It runs... but the buttons seem to have shadows and there is a 'TODO: Place controls here' text on my dialog. Hey! That message is not on my dialog resource! Hey! In the HTML folder there is a IDR_HTML_DILAOG1 html file.... that's got buttons and the message that are not on my resource, but are displayed when my dialog 'runs'. If you move the buttons on the resource you can see that the 'shadows' are really copies of the [OK] and [CANCEL] buttons that are on my dialog. What's up with this? Is anyone else seeing this stuff? Rick Crone

      B Offline
      B Offline
      Bill Wilson
      wrote on last edited by
      #2

      When the wizard creates a dialog, it includes 3 controls in it: OK Button Cancel button Static containing the text 'TODO: Place controls here' I don't know why you aren't seeing it with the resource editor. It apparently is there, or you wouldn't see it at run time. I've never seen it create HTML code when inserting a dialog. Good Luck, Bill

      R 1 Reply Last reply
      0
      • B Bill Wilson

        When the wizard creates a dialog, it includes 3 controls in it: OK Button Cancel button Static containing the text 'TODO: Place controls here' I don't know why you aren't seeing it with the resource editor. It apparently is there, or you wouldn't see it at run time. I've never seen it create HTML code when inserting a dialog. Good Luck, Bill

        R Offline
        R Offline
        Rick Crone
        wrote on last edited by
        #3

        I agree that is how it worked in VC++ 6.0. You have built a VC++ 7.0 MFC application and added a dialog to it and you don't see the html? I have the buttons on the resource, but not the TODO message. I have the buttons and the TODO message on the html code.

        B 1 Reply Last reply
        0
        • R Rick Crone

          I agree that is how it worked in VC++ 6.0. You have built a VC++ 7.0 MFC application and added a dialog to it and you don't see the html? I have the buttons on the resource, but not the TODO message. I have the buttons and the TODO message on the html code.

          B Offline
          B Offline
          Bill Wilson
          wrote on last edited by
          #4

          I haven't used VC7 yet. Sorry, I guess I thought you had a question.

          R 1 Reply Last reply
          0
          • B Bill Wilson

            I haven't used VC7 yet. Sorry, I guess I thought you had a question.

            R Offline
            R Offline
            Rick Crone
            wrote on last edited by
            #5

            Well, I guess I'm the only one trying to use VC++ 7.0 in .NET. At least it looks that way from the responses my question got. Unless: 1.) My version is just different from eveyone elses. 2.) There is something about how I'm setting up my application up. 3.) There is something new about creating dialogs. I don't see how anyone could be using this product. You are the only one who even answered.

            B 1 Reply Last reply
            0
            • R Rick Crone

              Well, I guess I'm the only one trying to use VC++ 7.0 in .NET. At least it looks that way from the responses my question got. Unless: 1.) My version is just different from eveyone elses. 2.) There is something about how I'm setting up my application up. 3.) There is something new about creating dialogs. I don't see how anyone could be using this product. You are the only one who even answered.

              B Offline
              B Offline
              Bill Wilson
              wrote on last edited by
              #6

              I guess I'm still having trouble understanding the question. Are you trying to get a different behaviour out of the wizard? (Not likely) Are you trying to modify the HTML? Are you trying to get rid of the html control on the dialog?

              R 1 Reply Last reply
              0
              • B Bill Wilson

                I guess I'm still having trouble understanding the question. Are you trying to get a different behaviour out of the wizard? (Not likely) Are you trying to modify the HTML? Are you trying to get rid of the html control on the dialog?

                R Offline
                R Offline
                Rick Crone
                wrote on last edited by
                #7

                I found out a bit more. In VC++ 7.0 when you create a dialog from a dialog resource the default class in NOT CDialog! It's CHTMLDialog. I don't know all about this (yet)... but if you want a dialog based on a dialog resource (like it was in VC++ 6.0) when you create the class you need to change it from CHTMLDialog to CDialog. Maybe we should be using CHTMLDialog for our dialogs in VC++ 7.0, but I haven't found the tools for editing the html like the tools we have for editing a dialog resource. The html code just comes up in text editor like view. Again, thanks for your interest in trying to help me with this.

                B 1 Reply Last reply
                0
                • R Rick Crone

                  I found out a bit more. In VC++ 7.0 when you create a dialog from a dialog resource the default class in NOT CDialog! It's CHTMLDialog. I don't know all about this (yet)... but if you want a dialog based on a dialog resource (like it was in VC++ 6.0) when you create the class you need to change it from CHTMLDialog to CDialog. Maybe we should be using CHTMLDialog for our dialogs in VC++ 7.0, but I haven't found the tools for editing the html like the tools we have for editing a dialog resource. The html code just comes up in text editor like view. Again, thanks for your interest in trying to help me with this.

                  B Offline
                  B Offline
                  Bill Wilson
                  wrote on last edited by
                  #8

                  You've definitely convinced me not to upgrade!! :laugh: Thanks for the help, Bill

                  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