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

scott sanders

@scott sanders
About
Posts
12
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Any Function in VC++ that can retrive the Unique ID of my computer,
    S scott sanders

    I assume you're talking about the SID. Check out the NewSID program by Mark Russinovich over at SysInternals. It comes with the source code and should tell you way more than you were wanting to know. Excerpt from the article:

    A computer's SID is stored in the Registry's SECURITY hive under SECURITY\SAM\Domains\Account. This key has a value named F and a value named V. The V value is a binary value that has the computer SID embedded within it at the end of its data.

    C / C++ / MFC c++ help

  • self update exe?
    S scott sanders

    I do something similar to this for getting my programs to update themselves from the web. But I use an MSI for distribution so that is the second program in the scenario. I like your solution because you can easily execute the updated program when it has finished. My method was: 1. Check for updates 2. If any found, confirm and download into user Temp directory 3. ShellExecute the MSI package (/qb) just downloaded 4. PostQuitMessage on self The installer updates the program and then leaves the user back at the desktop. I never thought of a good way to restart the application. I might try something like yours next time.

    C / C++ / MFC tutorial question announcement

  • GMail Invites: 3 to spare
    S scott sanders

    I'm all set up with my new GMail account. Thanks !!

    The Lounge

  • GMail Invites: 3 to spare
    S scott sanders

    I'm still gmail-less after all this time. I'll take one, please. Thanks scott srs@svott.com

    The Lounge

  • Tooltip question
    S scott sanders

    If I understand your question, what you want to do is specify the TTS_ALWAYSTIP style when you create the CToolTipCtrl. m_ToolTip.Create(this, TTS_ALWAYSTIP); srs

    C / C++ / MFC question

  • increasing InfoTip duration ?
    S scott sanders

    Hello, I'm using a CTreeCtrl, which is processing the notify message TVN_GETINFOTIP to display an InfoTip. The tip displays a multiline description of the item in the tree, and that is working just fine. However, the InfoTip goes away on its own after a few seconds, which is often not long enough for the user to read its entire contents. Is there a way I can increase the duration of the InfoTip, so it stays displayed longer, or until the user moves the mouse away? Would it be a better idea for me to use a ToolTip control instead? thanks srs

    C / C++ / MFC data-structures question

  • xlocale & xlocnum produce warnings at level 4
    S scott sanders

    Fixed. My solution to this problem was to change the global warning level before including the headers that used the locale files, like so : #pragma warning(push, 3) #if !defined(_BITSET_) # include #endif // !defined(_BITSET_) #pragma warning(pop)

    C / C++ / MFC csharp c++ ios visual-studio tutorial

  • xlocale & xlocnum produce warnings at level 4
    S scott sanders

    Hello, When I build my MFC project at warning level 4 using VS6sp5, the compiler generates a ton of warning messages from the locale files xlocale and xlocnum. Is this a normal occurance ? I don't want to see these warnings every time I do a rebuild, so how can build my own project files at warning level 4 but outside includes at level 3 ? Or is there a better solution ? An example of the compiler messages I receive is shown below. Thank You srs c:\program files\microsoft visual studio\vc98\include\xlocnum(599) : warning C4018: '<' : signed/unsigned mismatch c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator > __cdecl std::num_put > >::_Iput(class std::ostreambuf_iterator >,class std::ios_base &,unsigned short,char *,unsigned int)' c:\program files\microsoft visual studio\vc98\include\xlocnum(606) : warning C4018: '<=' : signed/unsigned mismatch c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator > __cdecl std::num_put > >::_Iput(class std::ostreambuf_iterator >,class std::ios_base &,unsigned short,char *,unsigned int)' c:\program files\microsoft visual studio\vc98\include\xlocale(204) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator > &,class std::istreambuf_it erator > &,unsigned int,const char *)' being compiled c:\program files\microsoft visual studio\vc98\include\xlocale(207) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator > &,clas

    C / C++ / MFC csharp c++ ios visual-studio tutorial

  • CEditView -> CEdit::ReplaceSel() leaks GDI Objects?
    S scott sanders

    Thank you for your reply ! After experimenting a bit more, I found out that the resource leak was actually coming from my CMyView::CtlColor() function. I was allocating a brush to change the background color of the window, depending on the program state, and never releasing it. So it was my silly fault all along; sorry to send you on a wild goose chase. I changed the brush to be static, and the problem disappeared. Thanks again for looking into this for me. scott

    C / C++ / MFC graphics architecture help question discussion

  • CEditView -> CEdit::ReplaceSel() leaks GDI Objects?
    S scott sanders

    I have an MDI app using CEditView in the Doc/View architecture. In this view, I have a function like so, which I call from the Document class: void CMyEditView::addText(LPCTSTR szOutput) { ASSERT_VALID(this); int nSize = GetBufferLength(); GetEditCtrl().SetSel(nSize, nSize, TRUE); GetEditCtrl().ReplaceSel(szOutput, FALSE); } After feeding it data for a while, the program inevitably crashes and the display gets corrupted. By watching the executable's resources in Task Manager, I notice that the GDI Objects are steadily increasing, until they reach 9999, and then the crash happens. By setting breakpoints, I can see that one GDI Object is consumed every time CEdit::ReplaceSel() is called, and never released. Is this method for appending text to an Edit Control contained in a View appropriate? Anyone know a better way? Using GetWindowText() and SetWindowText() has the same problem! Any thoughts as to what's happening, and how I can prevent the resource loss? Thanks ! scott sanders

    C / C++ / MFC graphics architecture help question discussion

  • Nice QOTD
    S scott sanders

    Look up at The Lounge header. It's the Jeff Prosise Question of the Day.

    The Lounge com

  • increasing maximum threads per process
    S scott sanders

    I'm writing an application to utilize 30 external processors, and I would like to have 2 threads open for each chip (monitoring and control). The program is an MFC app, and I'm using AfxBeginThread to launch each thread. This works great up to 56 threads, but after that Windows won't create any more (I get NULL returned from AfxBeginThread). Including the 5 other threads in my program, Task Manager correctly reports that 61 threads are in use. I need 65. Can I exceed this number in Windows 2000? Is there actually a limit on 61 threads per process? Thank you srs

    C / C++ / MFC c++ 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