CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Class Constructor Parameters

    The best thing you can do is to go and buy yourself a MFC book.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  2. #17
    Join Date
    Jan 2010
    Posts
    1,133

    Re: Class Constructor Parameters

    You can find some MFC tutorials on the web - start with something simple, like making a window, then adding a few controls. You'll get the hang of it.
    Again, I'm not against experimenting, but as Paul McKenzie said, if you insist on doing this to actually get a functional editor for your school project, then you're way over your head - your code already has some design issues as it is (as we pointed out) - even if it compiles.

    Just find a tutorial and try it out - I mean, you're using functions like RegisterClassEx(...) while just knowing what it does, and not knowing how exactly it does it under the hood - and yet you are able to manage just fine. So, what makes you think you'll have overwhelming trouble with a higher level API?

  3. #18
    Join Date
    Oct 2008
    Posts
    1,456

    Re: Class Constructor Parameters

    BTW, adding to what other said, I'd say that among all the wheels you could reinvent this is one of the hardest for a novice because it's already hard for experts too: IMHO, currently there's no completely satisfying c++ GUI abstraction out there; the most used ones ( MFC, QT, etc..., ignoring their vast non strictly gui related facilities ) are very productive but are far away from having the same level of conceptual clarity and safety as other c++ libraries, like STL or boost components.

    I mean, in a dream world one should be able of treating concepts like windows, window layouts, widgets, user interaction devices, etc... as fundamentals entities like integers, strings or iostreams. That is, one should be able of really decoupling programs in terms of presentation/user interaction/core logic parts, but existing frameworks accomplish that only partially and at some cost.

    BTW, today's flows in the user interface arena ( look at the new Metro interface thing, new touch or gesture based devices, etc... ) show that the very idea of gui is far from being settled, which is probably the most difficult obstacle to forming a mature abstraction ...

  4. #19
    Join Date
    Mar 2012
    Posts
    8

    Re: Class Constructor Parameters

    Okay, ive looked over various MFC tutorials out there, and noticed one big problem with them all.

    Ill start by saying that im using Code::Blocks, and by school project i mean that the group im in picked what to do, or in this case make. So i pretty much have to use free software and such to learn this. In all MFC tutorials ive found, you need microsoft visual C++, which isnt free. Since MFC isnt compatible with Code::Blocks by default, i either need an alternative that is compatible with MFC that i can import into Code::Blocks to make it work, or another type of framework that is compatible.

    If anyone knows of a free compiler that can handle MFC by default, or something i can import into Code::Blocks so that it can handle it, please give me an example. If it isnt possible, just say so. Its possible that i wont get this finished in time, but at least i want to try.

  5. #20
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Re: Class Constructor Parameters

    Ill start by saying that im using Code::Blocks
    You should have told us this to begin with. Code::Blocks isn't going to work with the MFC.

    You can get Visual C++ Express to work with the MFC (without the Forms Wizard) by downloading and installed the appropriate Windows SDK. See the related section of this link.
    http://en.wikipedia.org/wiki/Microso...Studio_Express

    No other framework is "compatible" with the MFC. Some are comparable. If you must use Code::Blocks try wxWidgets (the wxSmith plugin comes with code::Blocks).

    Alternatively, QT Creator provides the compiler and the Qt framework. In my experience, it's structure is the one closest to MFC and will have the shortest learning curve.
    http://qt.nokia.com/products/developer-tools/
    "Effective teaching is the essence of leadership..."

    "There is no substitute for a carefully thought-out design."

    If you have found this post to be useful, please Rate it.

  6. #21
    Join Date
    Feb 2009
    Posts
    24

    Re: Class Constructor Parameters

    You are trying to reinvent the wheel, there is no need of using win32 API, unless it is very necessary... Use MFC student version.

  7. #22
    Join Date
    Mar 2012
    Posts
    8

    Re: Class Constructor Parameters

    Sorry for the late reply, my computer decided to crash on me. Took awhile to get fixed, but i managed to save all the data needed, even now though i probably wont be making the deadline. However i did download wxWidgets and am trying to learn how to use it. Sadly, it gives me an error ive never seen before when i try to compile it.

    mingw32-g++.exe: bin\Debug\wxTest4.exe: No such file or directory

    As far as i know it should create the .exe file on its own, so i have no idea why it doesnt. i dont know if this is the proper place to ask for help regarding wxWidgets but ill post it here anyway. I know that i probably wont be finished in time but i wish to learn more about this for future reference. If you wonder what the code is, im using the standard template file you get whenever you start a new wxWidgets project.

    Regards, Entiranz.

  8. #23
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Re: Class Constructor Parameters

    Please zip up your project and attach the file. Are you using Code::Blocks with wxSmith? What version of Code::Blocks and which OS?
    "Effective teaching is the essence of leadership..."

    "There is no substitute for a carefully thought-out design."

    If you have found this post to be useful, please Rate it.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured