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. just a question...

just a question...

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionjsonlearning
16 Posts 6 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.
  • B Baafie

    yes. I suggest that you read a book about visual c++.

    R Offline
    R Offline
    roel
    wrote on last edited by
    #3

    i have. there's not much about books about visual c++ from where i am. the thing is, its a programming reference book. class listings, fields, methods ang all that stuff. not much about explaining the programming environment. if you please, kind sir, could you explain it do me, if it won't bother you. :)

    B 1 Reply Last reply
    0
    • R roel

      i have. there's not much about books about visual c++ from where i am. the thing is, its a programming reference book. class listings, fields, methods ang all that stuff. not much about explaining the programming environment. if you please, kind sir, could you explain it do me, if it won't bother you. :)

      B Offline
      B Offline
      Baafie
      wrote on last edited by
      #4

      What exactly do you need explained? You can order books via the internet, you know..

      R 1 Reply Last reply
      0
      • B Baafie

        What exactly do you need explained? You can order books via the internet, you know..

        R Offline
        R Offline
        roel
        wrote on last edited by
        #5

        thank you for your interest to reply. i need the resource editor explained, if you please. :-O i am just a student. i have no income and books cost a lot. that is why i resort to programming reference books...best 'bang' for the buck. :)

        C 1 Reply Last reply
        0
        • R roel

          thank you for your interest to reply. i need the resource editor explained, if you please. :-O i am just a student. i have no income and books cost a lot. that is why i resort to programming reference books...best 'bang' for the buck. :)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #6

          If you can't afford to buy books ( and I was a student once too, so I know how you feel ) then I'd suggest looking for free books on the net. It's a poor substitute but could be your best bet for now. However, if you're serious about it, you *will* have to spring for some books eventually. Look at the list on this site for books that are highly recommended so you don't blow your cash. However, it sounds to me more like you need to learn C++ before diving into Windows or MFC. MFC makes Windows programming *easier*, not harder. I'd recommend going Win32 AFTER learning it in MFC, unless you own Pethold's book, but even then, I still think it is more complex. The resource editor allows you to create things like menus and bitmaps which you can load from the resource, meaning they are stored in your .exe file. The dialog editor allows you to design a dialog box, then you can double click on it to create a class that uses that dialog template, and use the class wizard to add message handlers for events and controls on the dialog. Christian #include "std_disclaimer.h" The careful application of terror is also a form of communication. Eagles may soar, but weasels don't get sucked into jet engines.

          R 1 Reply Last reply
          0
          • C Christian Graus

            If you can't afford to buy books ( and I was a student once too, so I know how you feel ) then I'd suggest looking for free books on the net. It's a poor substitute but could be your best bet for now. However, if you're serious about it, you *will* have to spring for some books eventually. Look at the list on this site for books that are highly recommended so you don't blow your cash. However, it sounds to me more like you need to learn C++ before diving into Windows or MFC. MFC makes Windows programming *easier*, not harder. I'd recommend going Win32 AFTER learning it in MFC, unless you own Pethold's book, but even then, I still think it is more complex. The resource editor allows you to create things like menus and bitmaps which you can load from the resource, meaning they are stored in your .exe file. The dialog editor allows you to design a dialog box, then you can double click on it to create a class that uses that dialog template, and use the class wizard to add message handlers for events and controls on the dialog. Christian #include "std_disclaimer.h" The careful application of terror is also a form of communication. Eagles may soar, but weasels don't get sucked into jet engines.

            R Offline
            R Offline
            roel
            wrote on last edited by
            #7

            i seem to have not placed my question correctly... here is the problem. if i dont use the mfc, i seem to create the components in my program during run time. when that happens, it is my impression that i *cant* use the DIALOG editor. i shall ask this quesion: is it possible to use the dialog editor, even though i will not use mfc? it is also my impression that mfc will make my program easier to write but after several tries and several programs later, i still cant understand all that other stuff that gets included in my programs. that is why i think i will do better without mfc. thanks:)

            C P 2 Replies Last reply
            0
            • R roel

              i seem to have not placed my question correctly... here is the problem. if i dont use the mfc, i seem to create the components in my program during run time. when that happens, it is my impression that i *cant* use the DIALOG editor. i shall ask this quesion: is it possible to use the dialog editor, even though i will not use mfc? it is also my impression that mfc will make my program easier to write but after several tries and several programs later, i still cant understand all that other stuff that gets included in my programs. that is why i think i will do better without mfc. thanks:)

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #8

              I don't know if it can be done. I would suggest again that you don't need to understand every line of code you get for free from MFC, you just need to learn bit by bit as you use them. You should also use the msdn online as much as possible, and there is a ton of online help for MFC there. Christian #include "std_disclaimer.h" The careful application of terror is also a form of communication. Eagles may soar, but weasels don't get sucked into jet engines.

              1 Reply Last reply
              0
              • R roel

                to tell the truth, im quite embarrassed to ask this question. is it possible for me to still use the resource editor even though i will not be using mfc? :confused: you see, i'm new to visual c++, a newbie, and can't seem to understand the intricacies of the language, particularly mfc. i've decided that creating applications using the basic win32 windows api, without the use of mfc, would be a nice start for me. please tell me if this is true. or better yet, just answer the question. :)

                T Offline
                T Offline
                Todd Smith
                wrote on last edited by
                #9

                Yes, you can use the resource editor without using MFC. I write programs all the time that do not use MFC but have dialogs, menus, icon, string, etc. I use the resource editor to create my dialogs, menu, icons, and string tables. All the resource editor does is give you a graphical tool for editing the .rc files. There's no MFC involved when it comes to editing resources.

                1 Reply Last reply
                0
                • R roel

                  to tell the truth, im quite embarrassed to ask this question. is it possible for me to still use the resource editor even though i will not be using mfc? :confused: you see, i'm new to visual c++, a newbie, and can't seem to understand the intricacies of the language, particularly mfc. i've decided that creating applications using the basic win32 windows api, without the use of mfc, would be a nice start for me. please tell me if this is true. or better yet, just answer the question. :)

                  T Offline
                  T Offline
                  Todd Smith
                  wrote on last edited by
                  #10

                  Yes, you can use the resource editor without using MFC. I write programs all the time that do not use MFC but have dialogs, menus, icon, string, etc. I use the resource editor to create my dialogs, menu, icons, and string tables. All the resource editor does is give you a graphical tool for editing the .rc files. There's no MFC involved when it comes to editing resources.

                  1 Reply Last reply
                  0
                  • R roel

                    to tell the truth, im quite embarrassed to ask this question. is it possible for me to still use the resource editor even though i will not be using mfc? :confused: you see, i'm new to visual c++, a newbie, and can't seem to understand the intricacies of the language, particularly mfc. i've decided that creating applications using the basic win32 windows api, without the use of mfc, would be a nice start for me. please tell me if this is true. or better yet, just answer the question. :)

                    T Offline
                    T Offline
                    Todd Smith
                    wrote on last edited by
                    #11

                    Yes, you can use the resource editor without using MFC. I write programs all the time that do not use MFC but have dialogs, menus, icon, string, etc. I use the resource editor to create my dialogs, menu, icons, and string tables. All the resource editor does is give you a graphical tool for editing the .rc files. There's no MFC involved when it comes to editing resources.

                    C R 2 Replies Last reply
                    0
                    • T Todd Smith

                      Yes, you can use the resource editor without using MFC. I write programs all the time that do not use MFC but have dialogs, menus, icon, string, etc. I use the resource editor to create my dialogs, menu, icons, and string tables. All the resource editor does is give you a graphical tool for editing the .rc files. There's no MFC involved when it comes to editing resources.

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #12

                      I thought that might be the case - how do you connect a class to the dialog template - is it just by putting in the enum IDD = IDD_MYDIALOG and passing IDD into the Create method ? Christian #include "std_disclaimer.h" The careful application of terror is also a form of communication. Eagles may soar, but weasels don't get sucked into jet engines.

                      T 1 Reply Last reply
                      0
                      • C Christian Graus

                        I thought that might be the case - how do you connect a class to the dialog template - is it just by putting in the enum IDD = IDD_MYDIALOG and passing IDD into the Create method ? Christian #include "std_disclaimer.h" The careful application of terror is also a form of communication. Eagles may soar, but weasels don't get sucked into jet engines.

                        T Offline
                        T Offline
                        Todd Smith
                        wrote on last edited by
                        #13

                        Using ATL (IDD = IDD_MYDIALOG), yes. Otherwise you have to call CreateDialog and pass in the resource ID.

                        HWND CreateDialog(
                        HINSTANCE hInstance, // handle to application instance
                        LPCTSTR lpTemplate, // identifies dialog box template name
                        HWND hWndParent, // handle to owner window
                        DLGPROC lpDialogFunc // pointer to dialog box procedure
                        );

                        lpTemplate
                        Identifies the dialog box template. This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier. You can use the MAKEINTRESOURCE macro to create this value.

                        And the tricky part is to call IsDialogMessage in the message loop if you're main window is a dialog.

                        1 Reply Last reply
                        0
                        • T Todd Smith

                          Yes, you can use the resource editor without using MFC. I write programs all the time that do not use MFC but have dialogs, menus, icon, string, etc. I use the resource editor to create my dialogs, menu, icons, and string tables. All the resource editor does is give you a graphical tool for editing the .rc files. There's no MFC involved when it comes to editing resources.

                          R Offline
                          R Offline
                          roel
                          wrote on last edited by
                          #14

                          i've seen msdn and it does provide a LOT of help but not enough for me apparently... i now see that it is possible to use the resource editor without mfc. does it mean i can create a win32 .exe 'empty' application and i can still use the resource editor? if the answer is yes, then i still have a few questions... do i need to edit my own .rc file? how do i link my class to the resource editor? it really seems that the resource editor has no idea as to what i'm doing in my code thereby it cant see what components i'm using that is why i cant use the editor... i'm really confused. :confused:

                          1 Reply Last reply
                          0
                          • R roel

                            to tell the truth, im quite embarrassed to ask this question. is it possible for me to still use the resource editor even though i will not be using mfc? :confused: you see, i'm new to visual c++, a newbie, and can't seem to understand the intricacies of the language, particularly mfc. i've decided that creating applications using the basic win32 windows api, without the use of mfc, would be a nice start for me. please tell me if this is true. or better yet, just answer the question. :)

                            K Offline
                            K Offline
                            Kuniva
                            wrote on last edited by
                            #15

                            yea u can use the resource editor without mfc, i'm a beginner too but i found out it was really easy to use mfc, u really should try it, especially when u already know a bit of visual basic its really easy. I started out with c++ with Dev-C++ (www.bloodshed.net). it doesn't have a resource editor u just have to do it manually with that one but i converted a win32 api example that show a simple window on the screen to a dialog application. i'm not going to enter the code here but you can find some help at: http://www.winprog.org/tutorial/ i will post the code here as soon as i can, i think this is a very interesting question because it was one of the first questions i asked myself too, because when u use resources for dialogs u can just draw them in the MSVC resource editor and u dont have to program everything in code + the final executable remains very small (in dev-c++ only 5kb or so, in MSVC about 24kb). I will send u both the code for dev-c++ and MSVC++ as soon as i can. i recommend u take a look at MFC and try to use the classwizard. A very helpfull tool :) , when u have a dialog in mfc and draw controls on it u just go to View>classwizzard> member variables and u double click the controls u want to acces, u then enter a name for the handle and press ok. fromt hat point on its as easy as VB really. for example u've drawn a textbox on a dialog and u declare a variable for it called m_hText. when u want to put something in the textbox it would look like this: m_hText = "coffee smells bad"; UpdateData(false); its that easy!! u just put the code where u want it to happen as in OnCreate(). UpdateData(); is used for the interaction between de member variables and the dialog. When u use UpdateData(false); the values of the member variables are displayed in the dialog, if u use UpdateData(true); the entered values in the dialog are stored in the member variables. Ugh i'm gonna stop now :p i'll just mail it :cool: Kuniva spidyvshades@hotmail.com

                            1 Reply Last reply
                            0
                            • R roel

                              i seem to have not placed my question correctly... here is the problem. if i dont use the mfc, i seem to create the components in my program during run time. when that happens, it is my impression that i *cant* use the DIALOG editor. i shall ask this quesion: is it possible to use the dialog editor, even though i will not use mfc? it is also my impression that mfc will make my program easier to write but after several tries and several programs later, i still cant understand all that other stuff that gets included in my programs. that is why i think i will do better without mfc. thanks:)

                              P Offline
                              P Offline
                              Paolo Messina
                              wrote on last edited by
                              #16

                              If the question is: can I use the Resource Editor in a Win32 application, not using MFC? The answer is: Yes, sure! If you create a new project with AppWizard, choosing Win32 Application -> Hello World , you can see the About dialog in the project's resources and all the other resources as well. Is there something I missed? Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

                              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