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
P

pete mcquain

@pete mcquain
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Singleton component design problem
    P pete mcquain

    I think you want something along these lines... public class Singleton : Component { private Singleton m_instance = null; private Singleton(){} // constructor is private so it can't be created externally public static Instance() { if(!m_instance) m_instance = new Singleton; return m_instance; } } Your instance counting and dispose logic should still work. To use it, you dont create a new Singleton, but rather use Singleton s = Singleton.Instance();. -pete

    C# question csharp com design help

  • Dr Watson dump :-\
    P pete mcquain

    Yeah, what he said :-D -pete

    C / C++ / MFC announcement data-structures debugging question

  • Dr Watson dump :-\
    P pete mcquain

    There's a much easier way to debug this problem that doesnt (normally) require anything to be done to your clients machine. Use the .MAP file generated by the compiler. Look in the .MAP file for the next lowest function offset from the FAULT entry offset in the Dr. Watson log file. That will show you what function the fault is happening in. If you didn't have the .MAP file enabled when you built what's running on your customer's machine, you can enable it now and build it as long as everything else is the same. -pete

    C / C++ / MFC announcement data-structures debugging question

  • checking to see if a folder exists
    P pete mcquain

    ns wrote: how do I check its existence in code? I would do ::GetFileAttributesEx(strFolderPath, GetFileExInfoStandard, NULL) and check the return value and/or check ::GetLastError() for a return of 2 ("System cannot find the file specified") -pete

    C / C++ / MFC question help

  • Using STL in a DLL
    P pete mcquain

    Gian wrote: It's a problem of the STL, something to include in the DLL compiling options? It sounds more like it's a DLL-boundary issue with whatever chunk of memory you are trying to push onto the vector. Perhaps some sample code would help. -pete

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

  • Versioning
    P pete mcquain

    http://www.codeproject.com/macro/incprivatebuild.asp or search for auto-incrementing a version number here or on CodeGuru -pete

    C / C++ / MFC help

  • renaming a directory?
    P pete mcquain

    All you should have to do is use ::MoveFileEx(OldFolderName, NewFolderName, 0). There's nothing built into MFC that I'm aware of to do this. This doesn't kill the contents of the folder. It would probably be safest to use absolute paths for each paramter. If something in the folder is in use, you can specify a flag for the 3rd param to wait until reboot. -pete

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

  • Easy web page maintenance
    P pete mcquain

    You could set up an XML file containing the picture information: Then have an XSL or client-side script that represents the static parts of the page and renders the HTML with the contents of the XML file that you upload. Hope that helps... -pete

    Web Development question html xml help announcement
  • Login

  • Don't have an account? Register

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