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
S

Swinefeaster

@Swinefeaster
About
Posts
174
Topics
66
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • std::map or stdex:hash_map
    S Swinefeaster

    hi there, i'm trying to set up a hash map such as:

    class ObserversByMessageMap :
    public stdext::hash_map<messagekey,>
    {};

    and i've got MessageKey defined with these operators:

      bool operator==(const MessageKey& other)const;
      bool operator!=(const MessageKey& other)const;
      bool operator<(const MessageKey& other)const;
      bool operator>(const MessageKey& other)const;
    
      // Used for hashing.
      operator size\_t(void)const;
    

    something doesn't work quite right however. i'm trying to do something like:

    MessageObserverSet& observers = (\*m\_observersByMessageMap)\[key\];
    observers.insert(observer);
    

    but it appears that the map (either hash or map) seems to collide with a *different* key than what i expect, and therefore adds the observer to the wrong pre-existing key. i figured the operator==() is supposed to prevent that from happening, but it aint being called. instead the size_t hash is called and also the < operator, which i've defined as:

    bool
    MessageKey::operator<(const MessageKey& other)const
    {
    bool lessThan = false;

    if(m_messageId <= other.m_messageId)
    {
    if(m_objectId < other.m_objectId)
    {
    lessThan = true;
    }
    }

    return lessThan;
    }

    since m_objectId is a nested object. any ideas? in mfc this kind of stuff worked no problem... :(

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

  • NULL Checking and Defensive Programming
    S Swinefeaster

    I just received a crazy lecture from one of my superiors when I tried to introduce NULL pointer checks in the code. Apparently, he says, "Pointers should never be NULL" and "Checking pointers for NULL throughout the code eats too many cpu cycles and seriously degrades performance", "It's better just to crash and provide a stack dump." Am I on crack?

    The Weird and The Wonderful data-structures performance question

  • Any tools allow customer to customize their website?
    S Swinefeaster

    Just wondering, I'm not too advanced in terms of web dev... But I have a client that would like to have a section where she can add text and graphics herself. I was thinking of setting up a forum for her on her site, granting only her access. Is there anything better than this that doesn't look so much like a forum? Something free :)... Cheers swine

    Web Development graphics sales tools question

  • To me this is a coding horror, and to you? [modified]
    S Swinefeaster

    i would go with:

    m_boolVar = intVar ? true : false;

    The Weird and The Wonderful question

  • Search Timeout
    S Swinefeaster

    "Searches in large forums or over a long date range can take a while to complete. In some cases the search may timeout before it has completed. If this occurs please try restricting your search to a shorter date span or to fewer forums." you mean you don't know if there were no results or if it timed out? cmon this sucks guys. how is the user supposed to guess which one it is? and it's a pain in ass to get to the search message boards page. swine

    Site Bugs / Suggestions question

  • DwmSetWindowAttribute()
    S Swinefeaster

    Where do I get the api for DWM? I'm trying to #include "DwmApi.h" but it's nowhere to be found. I'm running vc8. Thanks! swine

    Windows API json question

  • Macros in Vista and Visual Studio 2005
    S Swinefeaster

    Yeah I have vs2005 SP1 for vista installed and it is still a dud... This is very frustrating because I wrote a lot of macros to make vs2005 more keyboard friendly --- as it's lack of keyboard friendliness it quite terrible. O mouse o mouse o mouse.

    C / C++ / MFC csharp visual-studio com beta-testing help

  • Macros in Vista and Visual Studio 2005
    S Swinefeaster

    Has anyone got macros working for VS2005 under Vista? They are completely broken, and the fix for VS2005 on xp does not work... this is retarded https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=225977 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2022094&SiteID=1

    C / C++ / MFC csharp visual-studio com beta-testing help

  • Macros in Vista and Visual Studio 2005
    S Swinefeaster

    Has anyone got macros working for VS2005 under Vista? They are completely broken, and the fix for VS2005 on xp does not work... this is retarded :( https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=225977 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2022094&SiteID=1

    Windows API csharp visual-studio com beta-testing help

  • VC++ 6.0 runtime in Vista
    S Swinefeaster

    Have you found a way to install Visual Studio 6 Service Pack 6 on Vista? Mine fails miserably. I tried just copying the installed folder over from an xp machine over the install non-service pack one in Vista and it seems to work, but then when running, the code fails in occsite.cpp and crashes. Any ideas? Thanks!

    Windows API c++ tutorial question

  • Vista + Vc6 + CDocHostHtmlView = @!#$@#$@
    S Swinefeaster

    In an app that ran no problem on vc6 under xp, debugging under vista asserts in occsite.cpp: HRESULT COleControlSite::CreateControl(CWnd* pWndCtrl, REFCLSID clsid, LPCTSTR lpszWindowName, DWORD dwStyle, const POINT* ppt, const SIZE* psize, UINT nID, CFile* pPersist, BOOL bStorage, BSTR bstrLicKey) { HRESULT hr = E_FAIL; m_hWnd = NULL; CSize size; // Connect the OLE Control with its proxy CWnd object if (pWndCtrl != NULL) { >>>>>>>>>>> ASSERT(pWndCtrl->m_pCtrlSite == NULL); m_pWndCtrl = pWndCtrl; pWndCtrl->m_pCtrlSite = this; } Callstack: COleControlSite::CreateControl(CWnd * 0x009f721c _CLSID_WebBrowser, const _GUID & {6E6E6142-7265-0000-426F-646F6720506F}, const char * 0x50000000, unsigned long 1237588, const tagPOINT * 0x063591b0 {x=10408680 y=1}, const tagSIZE * 0x0000e900, unsigned int 0, CFile * 0x00000000 {hFile=??? name=???}, int 0, unsigned short * 0x0012e338) line 161 + 28 bytes CDocHostHtmlView::Create(const char * 0x00000000, const char * 0x009de4d8 `string', unsigned long 1342177280, const tagRECT & {top=26 bottom=562 left=8 right=211}, CWnd * 0x002089c0 {GameClientDlg hWnd=???}, unsigned int 1169, CCreateContext * 0x00000000) line 77 + 47 bytes Any thoughts? Thanks!

    [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    Windows API com c++ help question discussion

  • Metafile antialising in Gdiplus
    S Swinefeaster

    I'm calling: Graphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias); but still it doesn't work. My Metafile object is drawn without antialiasing. Does anyone know why? Thanks!

    [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    C / C++ / MFC com graphics question

  • Where's the HWND in Form?
    S Swinefeaster

    Excellent! That's exactly what I needed. Thanks :) :) [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    .NET (Core and Framework) c++ com question

  • Where's the HWND in Form?
    S Swinefeaster

    That's great but here it doesn't work. :confused: [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    .NET (Core and Framework) c++ com question

  • Where's the HWND in Form?
    S Swinefeaster

    Is it a HWND type? I get a compiler error saying: Error 3 error C2440: 'type cast' : cannot convert from 'System::IntPtr' to 'HWND' My code is: HWND h = (HWND)Handle; [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    .NET (Core and Framework) c++ com question

  • Where's the HWND in Form?
    S Swinefeaster

    How do you get an HWND handle inside a Form object in C++, VC2005 ? Thanks swine [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    .NET (Core and Framework) c++ com question

  • VS2005 Compiles Wrong Files
    S Swinefeaster

    actually i was doing some weird stuff with the configuration, setting the intermediate files to all the same obj... that really confused vc2005 (and me). cheers swine [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    Visual Studio com help question

  • Why Is F7 in VS2005 so Gay?
    S Swinefeaster

    LOL vs2003 was much worse than 2005... wasn't it? [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    The Lounge com question

  • Why Is F7 in VS2005 so Gay?
    S Swinefeaster

    not really, the whole "current project" concept in vs2005 is fucked [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    The Lounge com question

  • Why Is F7 in VS2005 so Gay?
    S Swinefeaster

    It never seems to build the right thing... I don't want *all* my projects to build, just for the damn start-up project... And no, I don't want to right-click on it and select Build --- who wants to use the mouse anyway? Ahhh... some things about vc6 were real nice... [b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.

    The Lounge com 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