Friday, January 31, 2020

clone old hard driver to SSD

clone old hard driver to SSD


.suo issue in Visual Studio 2017 -- tips in compiling MFC project

tips in compiling MFC project . working on some examples in <Programming MFC ground up > book. first example in the book.

  1. Quick tip: What to do when Visual Studio freaks out and everything is red
  2. Having just installed Xamarin, I first thought that it was the culprit. Or maybe Resharper. Anyway whatever the cause was (and I am still not 100% sure what actually triggered this behavior), recovering from it is actually quite easy:

    1. Close Visual Studio
    2. Delete the SUO file
    3. Restart Visual Studio.

    The SUO file is a hidden file,, which is placed in the same folder as the SLN file. It contains a lot of information such as which files are currently open in the IDE, some local settings, etc. Personally I hate this file because it can cause a lot of trouble if it gets corrupted. And since it is hidden, you don’t always think about it.

    So the rule is: If you see some weird behavior in Visual Studio, try to delete the SUO file first, before you try anything else.

    Update: I was just told that unloading and reloading the project file might help too. I suspect that under the cover this also modifies the SUO file and solves the issue. Good to know :)


    this tip works well: unload project and then reload project.

    Adding to the votes:

    • – Deleting suo did not help
    • – Restarting VS did not help
    • – Unloading and reloading the project solved the issue!

  3. Visual C++ : Please help me with the following code
  4. the answer is: These errors have to do with the fact that your application is using Unicode (wchar_t) strings. The best thing to do is change all your string literals to wide character literals, e.g.

  5. Visual Studio displaying errors even if projects build
  6. My symptoms in VS2019 were that I would build with some errors. Then I'd fix the errors, and the build would work, as shown in the Output window. But the Errors windows still showed the old errors. I could run it just fine. Closing VS2019 and reopneing fixed the issue, but only for a little while. This started happening on version 16.4.3

    This solution seems to work for me:

    Uncheck Tools->Option->Projects and Solutions->General->Allow parallel project initialization

  7. VS 2019 Intellisense reports compile errors when rebuild all does not.
  8. Thank you for report this issues. Do these errors go away if you uncheck Tools > Options > Projects and Solutions > General > Allow parallel project initialization, delete the .vs folder, and reload the solution?

  9. Fixing Visual Studio Intellisense Errors
  10. Clearing up Intellisense There's usually a simple solution when IntelliSense decides to sleep one off:

    Delete the .vs folder

    The .vs folder holds solution related temp data including the .suo file that caches intellisense and some debug data. That folder also holds Web site configuration data for Web projects and a few other things. It's safe to delete this folder - Visual Studio recreates it when it's missing.

    Older versions of Visual Studio (prior to VS 2015) didn't have a separate folder and dumped that same information into files in the solution's root folder.

    In these older versions you can fix Intellisense issues by deleting the Solution's .suo file. Deleting the .vs folder in newer version nukes the .suo file which is responsible for cached IntelliSense and also some cached Debug data. When VS acts up and reports whacky errors that seem wrong, the burning down the .suo file is a nice quick thing to try first.

    To do this:
    1. Shut down VS
    2. Nuke the .vs folder or the .suo file
    3. Restart VS

    The .suo file contains cached IntelliSense data and once that file is off, no amount of recompilation or clearing the project is going to help. Nuke the .suo file. or in VS 2015 or later the .vs folder and get back to sanity.

  11. Quick tip: What to do when Visual Studio freaks out and everything is red

beginner's step on GDI+

memory management research

memory management research. search "memory management" on codeproject.com

  1. Memory Management and RAII
  2. Memory Management for Beginners
  3. CString Management
  4. C++ Memory Management Innovation: GC Allocator
  5. Allocated Memory Management in C
  6. tonious/hash.c
  7. A Primer of the Windows Architecture
  8. Windows Memory Management - Part 2
  9. Memory Allocation Tool
  10. Unable to find atlapp.h file in Visual Studio 2017
  11. Exploiting Managed Memory
  12. Memory Leak Detection
  13. Windows Memory leak detection (update to existing article)
  14. Memory and Memory Corruption
  15. How a weak_ptr Might Prevent Full Memory Cleanup of Managed Object
  16. C++ Memory Pool
  17. How to create a Simple Lock Framework for C++ Synchronization
  18. SmartObject Class (Objective-C like Memory Management) for C++ (A substitute for Smart Pointer maybe?)

  19. What is Msimg32.dll?
  20. VS IDE Editor Tip: Quick Macros
  21. using / namespace
  22. Guide to Image Composition with Win32 MsImg32.dl
  23. Guide to WIN32 Paint for Beginners
  24. Guide to WIN32 Paint for Intermediates
  25. Guide to Win32 Memory DC
  26. Guide to WIN32 Regions
  27. A Guide to WIN32 Clipping Regions

  28. Walking the callstack
  29. C++ Memory Leak Finder
  30. Simple debug log for C++
  31. Easy Detection of Memory Leaks
  32. Diagnostic
  33. Catching Memory Leaks
  34. Memory Leak Detection in C
  35. Handle Management - Complete Solution

Thursday, January 30, 2020

add manifest into my application

tips on TotoriseSVN tool

scheme of software protection

some thoughts of software protection. include three components:

search "updater" in codeproject.com.

  1. software updater. it update software version and check sum into registry item.
  2. software version enforcer. it will check current running software copy version and check sum. then compare the assembly version and check sum in the current registry. if the comparison match/equal, then let current copy working. otherwise disable current working copy. this software enforcer must be signed with my public key.
  3. my software product. it is obfuscated copy first. when it starts to run, it needs to check if my software version enforcer installed, then check public key of my company. if it is my company public key, or no software enforcer installed, then stop working and refuse to run.

  4. Copy Protection for Windows Applications
  5. Copy Protection for Windows Applications (Part 2)
  6. Copy Protection for Windows Applications (Part 3
  7. Copy Protection for Windows Applications (Part 4)

  8. An efficient way for automatic updating
  9. Download-Manager-for-Application-Updates
  10. TU: The Easy Update Library for Your Projects
  11. SmartClient: .NET Self Updating Applications
  12. Updating application clients with a Windows Installer: a simple workaround
  13. CatenaLoigc product
  14. Updater
  15. Adding automatic updates to your program - Part 1
  16. Application Auto Update Revisited
  17. Automatic Online Update Toolkit
  18. Purchase the Software Update Wizard
  19. Simple update check function
  20. UpdaterApp - a Library for Easy Update

  21. Maintenance and Updating of Legacy Code
  22. MS Access (*.mdb) + C#: SELECT, INSERT, DELETE and UPDATE Queries
  23. Batch Image Resizer
  24. An Updated Batch Image Resize Tool

Sunday, January 26, 2020

Win32 programming

Win32 programming. good article to study and source to study.

  1. Not understanding How to Enumerate Child Windows.
  2. Walkthrough: Create a traditional Windows Desktop application (C++) in Visual Studio 2019
  3. Walkthrough: Creating Windows Desktop Applications (C++)
  4. Using Mouse Input: how to use mouse input
  5. focus on mouse input message.

  6. Keyboard Input
  7. focus on keyboard input process

  8. Raw Input
  9. raw input is used in gaming program.

the following posts are on Win32 intermediate.

  1. Win32 Window Minimal
  2. A dialog based Win32 C program, step by step
  3. Programming Applications for Microsoft Windows (Dv-Mps General)
  4. Programming Windows with MFC, Second Edition 2nd ed. Edition
  5. buy this book and get gist of it,,,,

  6. My first Win32 UI
  7. this post's code does not work. some constants definition got lost.

  8. Realtime Animation of a Mandelbrot Zoom in a Win32 Console with Visual C++ 6.0
  9. Pong in a Win32 Console
  10. Breakout Game in a Win32 Console
  11. Custom Controls in Win32 API: Standard Messages
  12. WinDrawLib
  13. Message Cracker Wizard for Win32 SDK Developers
  14. Win32 Tips and Tricks
  15. A Simple Win32 Window Wrapper Class
  16. Own-thread Win32 splash screen
  17. MFC Feature Pack Tutorial – Part 3 – CMFCPropertyGridCtrl
  18. Walkthrough: Create a traditional Windows Desktop application (C++)
  19. Welcome to theForger's Win32 API Tutorial
  20. Solutions to Common Errors
  21. WinMain function
  22. windef.h header

  23. Create a C++ console app project in Visual Studio 2019
  24. Windows Desktop Wizard
  25. a good official explanation.

  26. C++ project templates
  27. Create solutions and projects
  28. Walkthrough: Creating a Standard C++ Program (C++)
  29. No win32 console application option in Visual Studio 2017 v15.4.5
  30. this post in the bottom section, there is a good guide and explanation on how to do it.

  31. C++ Tutorial: Hello World:how to create an empty project of Console application
  32. Win32 Console Application missing in VS2017. How to create C++ Empty Project?
  33. Can't find win32 console application for new project list
  34. How to create C++ Win32 app in Visual Studio 2017
  35. SOLVED I cannot find win32 console application in visual studio 2105
  36. Walkthrough: Create a traditional Windows Desktop application (C++)
  37. How to link DLLs to C++ Projects

  38. 7++ reasons to move your C++ code to Visual
  39. Win32++: A Simple Alternative to MFC
  40. Welcome to the home of Win32++
  41. Win32++ on SourceForge.net
  42. Win32++ Tutorial: Menu of tutorials

  43. Yet-Another-Fully-Functional-ownerdraw-Menu
  44. A basic icon editor running on ReactOS
  45. can be used to create ICON for any software..

  46. Win32++ Programmatically-Created-Menus-with
  47. Introduction to Embedded Icons without Resource on ReactOS
  48. Support for Unicode
  49. What are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR (etc.)?

Saturday, January 18, 2020

Error: D8016 '/ZI' and '/Gy-' command-line options are incompatible dotNetTester D:\Registry32\Article_src\cl 1

issues in converting old C++ project into Visual Stuio 2019: I got this error message in converting:

Error D8016 '/ZI' and '/Gy-' command-line options are incompatible dotNetTester D:\Registry32\Article_src\cl 1

  1. Visual Studio error D8016: '/ZI' and '/Gy' command-line options are incompatible
  2. /ZI and /Gy command line options are Incompatible
  3. Note if you get the error command line error d8016 zi
  4. #visual studio编译# Error D8016 '/ZI' and '/Gy-' command-line options are incompatible
  5. warning D9035 while building the project in Visual Studio 17
  6. /Gm (Enable Minimal Rebuild)
  7. Visual Studio solution file headers
  8. how-can-visual-studio-determine-a-solution-files-version

  9. this post offer a good solution and explanation.

  10. How to fix .pch file missing on build?
  11. VCBuild vs. MSBuild: Build system changes in Visual Studio 2010
  12. C++ features deprecated in Visual Studio 2019
  13. Configuring Programs for Windows XP
  14. Upgrade C++ projects from earlier versions of Visual Studio
  15. Update WINVER and _WIN32_WINNT
  16. Using the Windows Headers
  17. visual studio project files
  18. Visual Studio Version Interoperability
  19. Some Useful Links
  20. VB.Net/C# Programming Articles
  21. C1083: Cannot open include file: … : No such file or directory?
  22. Visual Studio 2010: fatal error C1189: #error : shfolder.h/shfolder.lib provide platform independence with versions prior to Windows 2000.
  23. Hi Uttam_D,

    This message will be popped in SDK7.0 if NTDDI_VERSION >= NTDDI_WIN2K. The header file has been deprecated in Windows 2000 or later OS, as the message mentioned, please use the shlobj.h/shell32.lib instead if targetting Windows 2000 or higher.

    I believe it is a by design behavior if you are using SDK7.0A and VS2010. Please note, the minimal supported OS for VC++ 2010 CRT is Windows XP SP3, therefore, always use shlobj.h in VC++ 2010. You can find all the CSIDL definition in the shlobj.h.

    Regards, Yi

  24. winsdk-10/Include/10.0.10240.0/um/ShlObj.h
  25. Shlobj.h file is located under winsdk-10/Include/10.0.10240.0/um/ShlObj.h.


MFC Broher 7820N driver installation on local machine(Non-LAN)

MFC Broher 7820N driver installation on local machine(Non-LAN). download full driver package and install it on my local machine-Non LAN beside my printer.

  1. Full Driver & Software Package
  2. Full Driver & Software Package (Recommended)
  3. Rock PI compuer

Tuesday, January 7, 2020

.net framework checker

MFC quick demo

  1. MFC programming tutorial
  2. first 4 modules are good enough. it has drawing circle logic.

    quick tutorials

  3. Module 1: Microsoft Windows, Visual C++ and Microsoft Foundation Class (MFC)
  4. Module 1a: Microsoft Windows, Visual C++ and Microsoft Foundation Class (MFC)
  5. Module 2: Getting Started with Visual C++ 6.0 AppWizard 1
  6. Module 2: Getting Started with Visual C++ 6.0 AppWizard 2
  7. Module 3: Basic Event Handling, Mapping Modes, and a Scrolling View 1
  8. Module 3a: Basic Event Handling, Mapping Modes, and a Scrolling View 2
  9. Module 3b: Basic Event Handling, Mapping Modes, and a Scrolling View 3
  10. Module 4: The Graphics Device Interface (GDI), Colors, and Fonts 1
  11. Module 4: The Graphics Device Interface (GDI), Colors, and Fonts 2
  12. Module 4: The Graphics Device Interface (GDI), Colors, and Fonts 3
  13. Module 9: A Reusable Frame Window Base Class 1
  14. Module 9a: A Reusable Frame Window Base Class 2
  15. good info on include files and theory

  16. MODULE 10 THE C/C++ PREPROCESSOR DIRECTIVES 1
  17. MODULE 10 THE C/C++ PREPROCESSOR DIRECTIVES 2: #define etc.
  18. another quick tutorial

  19. MFC Tutorial
  20. MFC - Dialog Boxes: Beginning point
  21. MFC - Messages & Events:End point
  22. above two links are in one tutorial. it has clear descriptions on how to create MFC application by creating a Win32 project.

  23. MFC - GDI
  24. MFC - File System
  25. MFC - Standard I/O
  26. MFC - Document View
  27. MFC - Strings

Saturday, January 4, 2020

passing object into C++ function

good C++ video series

compiled list from Youtube of good C++ video series:

    class vs object related quick shots

  1. Class and Object
  2. Constructor Destructor in C++
  3. C++ Tutorial for Beginners - Full Course: by minutes
  4. class vs object related quick shots:by Extern CodeExtern Code

  5. C++ Tutorial from Basic to Advance: separated by minutes in one class
  6. good C++ video series from Cherno

  7. Using Libraries in C++ (Static Linking)
  8. Using Dynamic Libraries in C++
  9. How to Setup C++ on Windows
  10. Setup VS Code For C/C++ Development on Windows
  11. Welcome to C++
  12. above is good series of tutorials. worth watching,

    good video from NewBostons

  13. Buckys C++ Programming Tutorials - 30 - Function Overloading
  14. Buckys C++ Programming Tutorials - 1 - Installing CodeBlocks
  15. Buckys C++ Programming Tutorials - 58 - function Templates
  16. C++ Programming Tutorials Playlist:73 series
  17. above is good series of tutorials. worth watching,

    another series

  18. C++ Void Functions by profgustin
  19. C++ - Value-Returning Functions by profgustin
  20. another series

  21. C++ Part 51 - Void Functions Introduction by ICT Tutorial Channel
  22. C++ Part 52 - Reference Parameters
  23. C++ Part 81 - Class Constructors
  24. C++ Part 82 - Class Accessors
  25. C++ Part 01 - What You Need to Program: complete playlist from ICT Tutorial Channel
  26. one long lesson in 10 hours

  27. C++ Programming All-in-One Tutorial Series (10 HOURS!)
  28. C++ Tutorials: complete play list from Caleb Curry
  29. a complete list

  30. C++ Programming | In One Video by Mike Dane:: by minutes
  31. bad training: not so good training

  32. C Programming Tutorial - 48: Functions (Part-4) Call By Value Method

Wednesday, January 1, 2020

Resolving issues( .ipch , .db , .suo files) in uploading VS projects (VC++) to SVN repository.

to resolve issues in uploading VS projects (VC++) to SVN respository. there are some .ipch , .db , .suo files are very big and don't need to upload to SVN repository.

  1. How to avoid precompiled headers
  2. You can always disable the use of pre-compiled headers in the project settings.

    Instructions for VS 2010 (should be similar for other versions of VS):
    1. Select your project, use the "Project -> Properties" menu
    2. go to the "Configuration Properties -> C/C++ -> Precompiled Headers" section,
    3. then change the "Precompiled Header" setting to "Not Using Precompiled Headers" option.
  3. Visual Studio: Disable Precompiled Headers
    1. Open your project, then select “Project” > “appname Properties…“.
    2. Expand “Configuration Properties” > “C/C++” > “Precompiled Headers“.
    3. Set “Precompiled Header” to “Not Using Precompiled Headers“.
  4. What are these .pch and .ncb files in visual studio?
  5. PCH is the precompiled headers file. It's a temporary that you can safely delete. You can disable its creation through Project Settings > C++ > Precompiled Headers > Don't use precompiled headers and removing the stdafx.cpp file from your project.

    NCB is the database used by IntelliSense to allow you to browse the symbols defined in your project, including the inline hints and auto completion as you type. You can safely delete it. There is an option to disable IntelliSense too.

    However, both features may be useful; therefore you may not want to disable them. If you worry about the size of the backups or sending the projects to some other programmer, then you can just clean the project by removing said files.

  6. How to prevent or remove Visual Studio ipch/pch folders from the project
  7. not useful.