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
A

andwan0

@andwan0
About
Posts
12
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • HELP: UNICODE conversion sprung up problems with CString & CHARFORMAT2
    A andwan0

    I've dug up SteveKing's old article SpellEdit: SpellEdit[^] Originally it was made for Visual Studio 7.1 (2003) but I managed to fiddle with it to get it compiling/working under Visual Studio 6.0 (because that's what I have). Everything is working however the project is non-UNICODE. So I converted the project into UNICODE and now I get lots of build errors, such as:

    error C2664: 'spell' : cannot convert parameter 1 from 'class CString' to 'const char *'

    The whole MySpell library/code uses char * everywhere... and even HunSpell uses char * everywhere too. So how come previously (in non-UNICODE) there was an implicit conversion between CString & const char *, but after changing project to UNICODE I get this error. PS: This is not problem about converting CString to char * - even though I've tried this, it just doesn't work.

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

  • HELP: how to load satellite DLL for a DLL
    A andwan0

    I think I got it working: From VC2005 there's a function called AddResourceInstance() to chain DLLs. However am still using VC6 so this function doesn't exist. So I just copied some code from a DLL project. The DLL main file contains these lines:

    static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
    DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
    {
    AfxInitExtensionModule(extensionDLL, hInstance);
    new CDynLinkLibrary(extensionDLL);
    }

    This dynamically loads the DLL. If we put some of this code into the EXE project like so:

    HINSTANCE hDll2 = LoadLibrary(szFilename2);
    AfxInitExtensionModule(extensionDLL,hDll2);
    new CDynLinkLibrary(extensionDLL);

    After the AfxSetResourceHandle(hDll); //setting satellite DLL overriding EXE resources Originally, the EXE would be the resource container, but AfxSetResourceHandle(satelliteDLL) will set loaded DLL as default resource container, overriding the EXE like. We use the above extension DLL to chain (add-on) another resource DLL. The only issues now is freeing the library/memory..

    C / C++ / MFC c++ tutorial com docker help

  • HELP: how to load satellite DLL for a DLL
    A andwan0

    I have a Visual C++ workspace that has 2 projects (1 exe & 1 DLL). I used Serge Wautier's tutorial ( Resource DLLs and Language Selection Menu[^] ) to create (multi-language) resource DLLs (satellite DLLs) branching off the exe. Now I have a collection of strings in the DLL that are shared in other projects. I created a satellite DLL for that DLL but can't figure out how to load it on-demand just like the exe's satellite DLL. He used: HINSTANCE hDll = LoadLibrary(szFilename); AfxSetResourceHandle(hDll); void CLanguageSupport::UnloadResourceDll() { if (m_hDll!=NULL) { SetResourceHandle(AfxGetApp()->m_hInstance); // Restores the EXE as the resource container. FreeLibrary(m_hDll); m_hDll= NULL; } } etc etc for the unloading/loading satellite DLLs for the exe. but how to do the same for the DLL?

    C / C++ / MFC c++ tutorial com docker help

  • QUERY: How to control external exe & read it's process details
    A andwan0

    I would like to create a service or background running program (something that minimizes to system tray). It would have a path list of external applications, eg. - C:\App1\Task1.exe - C:\App2\Task2.exe - C:\App3\Task3.exe It would start the first one and monitor the process details (CPU Usage, Mem Usage, and maybe I/O Writes). Each application will do their jobs for a couple of minutes then go idle - hence completed the task. At this point the CPU Usage = 0, Mem Usage, etc. will be idle. Then I need to close/kill that process and start the next application in the list. And this repeats as above and so on. Does anyone know how to execute an external program, monitor the process details, then kill it?

    C / C++ / MFC database tutorial question

  • BUG: Firefox + log in = no CSS styling
    A andwan0

    Everytime I log in, the CSS/layout gets messed up. It's like the CSS didn't get applied, so I get a white background and all content just flows vertically down. It's a complete mess. This only happens in Firefox.

    Site Bugs / Suggestions css help

  • VISUAL C++ resource.h/rc madness mess
    A andwan0

    This is really for those Visual C++ 6.0 programmers out there. I have a workspace which builds 3 apps & dozen of DLLs. Each project has it's own resources (resource.h & corresponding RC file). I like to merge the resources of the 3 main apps into one. I notice the 3 apps share some common strings. However, due to 10-20 years of development, the defined constants that have same name may not have same number. App1 resource.h #define IDS_STRING1 82 App2 resource.h #define IDS_STRING1 79 App3 resource.h #define IDS_STRING1 83 Am wondering if there's a tool out there that can clean up multiple resources... to make final/eventual merging easier. Problems lie when it's a common define constant, but the string literal are actually different. So maybe should have a batch routine to index/map by the string literal first, then ensure the define constant matches, if not then flag it. My resource.h files are huge, millions of lines... hence why am wondering if there exists a resource.h cleaner.

    C / C++ / MFC c++ database learning workspace

  • HELP: pair-value search & replace
    A andwan0

    Does anyone know to quickly make a multiple search & replace app (in either C or C++)? Am not interested in searching multiple files, just one file. I want to translate a list of unicode characters into something else (pair-value lookup table) ... so it's basically a crude/naive translator! I just need a quick pseudocode to get me started. Or maybe there's an opensource/free code already written? PS: Or maybe it's easier quicker with sed/awk/perl?

    C / C++ / MFC c++ perl linux algorithms help

  • crc32/checksum app
    A andwan0

    I'd like to write a C++ app program that would store a list of files (by relative path/location) plus it's CRC32 or checksum. Then it would also store more CRC32/checksums for the same file, for each snapshot in time. The main usage of the app would be to help identify which versions of the current folder contents are. Does anyone know such program already exist? If not, how to write in C++ with common libraries (boost, etc)?

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

  • Programming MS Visual C++, David J. Kruglinski - missing files needed
    A andwan0

    Does anyone have the book "Programming Microsoft Visual C++ 5th Edition, David J. Kruglinski, George Shepherd, and Scot Wingo"? I bought the book secondhand but it never came with a CD because it was lost. I manage to type up the code listings to try out the examples. However am stuck on chapter 12: Windows Message Processing and Multithreaded Programming. Apparently the example 12B & 12C relies on 12A code, however it doesn't do complete listings for 12B or 12C but vaguely describes changes. I don't think it's explained all changes because I can't get it to compile. Just wondering if anyone had the CD (code listing files) for this book?

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

  • How to debug classic ASP pages during AJAX calls in ASP.NET website
    A andwan0

    I have a legacy classic ASP website with lots of classic AJAX (many ASP files specially made for processing AJAX requests). We are slowly migrating the website to ASP.NET 2.0 and developing under Visual Web Developer 2005/2008. I notice VWD doesn't debug ASP files. Since we are still migrating a very large website, we are mixing ASP.NET code with classic ASP (ASP.NET pages making AJAX calls to classic ASP pages). In Visual Studio 2003.NET it supported full server-side debugging in all ASP pages. Now, how can I debug the AJAX classic ASP pages? I tried running Visual Studio 2003.NET and attaching it as a debugger to Internet Explorer, but no breakpoints were stopped at. Please can someone help. How can we debug classic ASP pages during AJAX calls?

    Web Development csharp debugging question asp-net visual-studio

  • Automated CVS-VC6 building
    A andwan0

    hmm, looks cool does ant, cruise control work with C++ I've searched but still can't find any references to C++

    C / C++ / MFC tutorial question

  • Automated CVS-VC6 building
    A andwan0

    This is a big question that covers both building & source-control of programs. I use Perforce (they don't have forums) as my CVS source-control. Does anyone have any good ideas on how to write a batch-process to: 1. Sync to a specific changelist (collection of versions) in Perforce 2. Use MS VC6 to batch build (consists of multiple projs of dlls/exes) and might need rebuild/relink due to dependencies. 3. Once 100% built (rebuild doesn't do any further linking) then move to folder with same name as the changelist #. 4. Repeat from step 1 onto the next changelist.

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