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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Static control question....

Static control question....

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpvisual-studiohelp
6 Posts 3 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
    Rickard Andersson20
    wrote on last edited by
    #1

    When I try to create a variable for a static control (a simple text static control, not that static which you can right click on and chose to put an image on or a rectangle, a simple text static... hope you understand! :)) it gives me this error message: c:\program\microsoft visual studio\myprojects\reminder\reminderdlg.h(44) : error C2040: 'm_Static3' : 'class CString' differs in levels of indirection from 'class CWnd *' I putted a static control on the dialog and then gave it an ID (IDC_STATIC3). Then I right clicked on it and created a variable for the control( a CString). And then it wont work for me!! GRRR!! What to do??? ------------------------------ CodeCracker - That's me! :) ------------------------------

    C 1 Reply Last reply
    0
    • R Rickard Andersson20

      When I try to create a variable for a static control (a simple text static control, not that static which you can right click on and chose to put an image on or a rectangle, a simple text static... hope you understand! :)) it gives me this error message: c:\program\microsoft visual studio\myprojects\reminder\reminderdlg.h(44) : error C2040: 'm_Static3' : 'class CString' differs in levels of indirection from 'class CWnd *' I putted a static control on the dialog and then gave it an ID (IDC_STATIC3). Then I right clicked on it and created a variable for the control( a CString). And then it wont work for me!! GRRR!! What to do??? ------------------------------ CodeCracker - That's me! :) ------------------------------

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      When you creted the variable with the class wizzard you select object and no CString. Delete all the references of your variable and make again the variable and have special care in the category you must to select the categoy value and variable type CString.... That is all... Best Regards... :-D Carlos Antollini.

      R 1 Reply Last reply
      0
      • C Carlos Antollini

        When you creted the variable with the class wizzard you select object and no CString. Delete all the references of your variable and make again the variable and have special care in the category you must to select the categoy value and variable type CString.... That is all... Best Regards... :-D Carlos Antollini.

        R Offline
        R Offline
        Rickard Andersson20
        wrote on last edited by
        #3

        Sorry... I found wath it was now... hehe... my fault!! :-O :-O :-O It was a varible with the exactly same name! :-O :-O hehehehe.... That's what happends when you write much code!! :) ------------------------------ CodeCracker - That's me! :) ------------------------------

        C 1 Reply Last reply
        0
        • R Rickard Andersson20

          Sorry... I found wath it was now... hehe... my fault!! :-O :-O :-O It was a varible with the exactly same name! :-O :-O hehehehe.... That's what happends when you write much code!! :) ------------------------------ CodeCracker - That's me! :) ------------------------------

          C Offline
          C Offline
          Carlos Antollini
          wrote on last edited by
          #4

          Don't worry about that... But For tomorrow you must to write 1000 times: I don't must write two variables in the same class with the same name. Cheers!!! ;) :bob: I want :beer: Carlos Antollini.

          R 1 Reply Last reply
          0
          • C Carlos Antollini

            Don't worry about that... But For tomorrow you must to write 1000 times: I don't must write two variables in the same class with the same name. Cheers!!! ;) :bob: I want :beer: Carlos Antollini.

            R Offline
            R Offline
            Remi Morin
            wrote on last edited by
            #5

            just two word... cut and paste 1000 times: 1000 times: I don't must write two variables in the same class with the same name. I don't must write two variables in the same class with the same name. I don't must write two variables in the same class with the same name. I don't must write two variables in the same class with the same name. ... Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com

            C 1 Reply Last reply
            0
            • R Remi Morin

              just two word... cut and paste 1000 times: 1000 times: I don't must write two variables in the same class with the same name. I don't must write two variables in the same class with the same name. I don't must write two variables in the same class with the same name. I don't must write two variables in the same class with the same name. ... Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com

              C Offline
              C Offline
              Carlos Antollini
              wrote on last edited by
              #6

              hhhmmmmm. And what about void main() { int i = 0; for(i = 0; i < 1000; i++) printf("I don't must write two variables in the same class with the same name.\n"); } Best Regards!!! :-D Carlos Antollini.

              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