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
U

User 1472

@User 1472
About
Posts
5
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • c++
    U User 1472

    Uh, if you don't already know C++, please do yourself a favor and stay away from application specific books like "Inside Visual C++ x.x", "Teach Yourself Visual C++ ...". Buy a book that focuses on the language C++. Later, when you know C++ and want to get more familiar with Microsoft's development tools for C++, you can read a "Visual C++" book. Until then don't muddle the two things in your brain: there is C++ the language and there is Visual C++ which is a development tool for C++. Some recommened C++ books: Stanley B. Lippman C++ Primer, Second Edition Addison Wesley ISBN 0-201-54848-8. Bruce Eckel C++ Inside & Out McGraw-Hill ISBN 0-07-881809-5. (and for the hardcore only.. more of a refernce than a learning guide...) Bjarne Stroustrup The C++ programming language Addison-Wesley ISBN 0-201-539929-6

    C / C++ / MFC c++ help question

  • Visual C++ and Delphi/C++ Builder
    U User 1472

    Visual C++ is Microsoft. Uh, I think that's about it. :) Really, the fact that it's Microsoft means that they lead the technology, whether they should or not. When they come out with a new feature in the OS, support is rolled into all their application suites at the same time. When they come to market compititors have no choice but to play catchup. Other than that, I would say Delphi and/or C++ Builder are superior ways to program Windows. Both have well written, truly object-oriented class libraries to encapsulate the Windows API (unlike wierd hybrid thing that MFC is). You're right: you can get stuff done a lot faster with a lot less effort. Also, unlike VB, you suffer no gain in size or loss of speed. C++ Builder also happens to be one of the most ANSI compliant C++ compilers on the market. Much more compliant than MSVC++. I think Microsoft's compiler technology may be better though. One thing their compiler does that probably nobody else's does is to let you edit code and recompile while debugging without stopping the debugger! Pretty amazing.

    C / C++ / MFC c++ question delphi css

  • Any Mp3 related C++ class?
    U User 1472

    Check out the XAudio SDK. It does EVERYTHING (including streaming over the internet). It's super cleanly written, easy to use, and efficient. It's free. The only "problem" I could see is that it's big: over 200KB for the .lib. It doesn't really need to be that big, but you could chalk that up to the fact that it has a bunch of internet stuff built in too. I recently checked out about 10 different freeware MP3 decoders. XAudio was by far the best. Cheers, Eric

    C / C++ / MFC c++ question

  • Basic OOP question...
    U User 1472

    This is a basic C++ question, not OOP. When ever you create a class the compiler automatically creates a default constructor and a copy constructor. The default constructor is required if you want to create objects like this:CFoo foo;
    As soon as you create ANY constructor, the compiler requires you to write ALL constructors. In other words, it no longer creates the default constructor for you. That means if you write:struct Point { int x; int y; }; Point origin; // legal - using compiler-supplied default constructor
    ...but if you write this...struct Point { int x; int y; Point(int x, int y): x(x), y(y) {} };
    ...the compiler no longer generates the default constructor...Point origin; // illegal! no default constructor Point origin (12,45); // legal - using Point(int,int)
    Note that a default constructor does not have to take 0 arguments, you simply must be able to call it with 0 arguments. Like this...struct Point { int x; int y; Point(int x=0, int y=0): x(x), y(y) {} // default parameters };
    Now everything's happy again...Point origin; // legal - using Point(int,int) Point origin (12,45); // legal - using Point(int,int)
    Hope this clarifies more than it confuses! Cheers, Eric

    C / C++ / MFC question

  • How can I make the "__stdcall" function to be local?
    U User 1472

    You don't. You can't pass a non-static member function because the parameter list doesn't match (remember in C++ all non-static member functions receive a hidden first parameter, the "this" pointer). What you can do is declare write your callback like this: BOOl __stdcall SetButtonState (HWND hwnd, LPARAM lparam) { CMyApp* app = (CMyApp*)lparam; ASSERT (app != NULL); app->SetButtonState (hwnd, lparam); } Then call EnumChildWindows with the global SetButtonState, like this: ::EnumChildWindows (m_hWnd, ::SetButtonState, (LPARAM)&myApp); The global SetButtonState just redirects each call back to the object that you specified in the call to EnumChildWindows You could also make the global SetButtonState a static member of your class. Cheers, Eric Tetz

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups