Saturday, September 12, 2020

MFC CPoint, CRect classes::tips and tricks, and porting legacy applications

CString and CRect types will be heavily used in my graphic apps.

  1. Enabling Visual Styles
  2. This topic explains how to configure your application to ensure that common controls are displayed in the user's preferred visual style.

  3. Porting a legacy MFC application to MFC Feature Pack
  4. Problems I encountered when polishing the GUI of an existing 200K LOC application.

  5. MFC Feature Pack: An Introduction
  6. Profiling of C++-Applications in Visual Studio for Free

  7. Working with Strings
  8. Windows Data Types
  9. Header files: BaseTsd.h; WinDef.h;WinNT.h

  10. What are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR (etc.)?
  11. Why is PCTSTR not defined but LPCTSTR defined?
  12. CString Management<--- classic papers
  13. CStrings are a useful data type. They greatly simplify a lot of operations in MFC, making it much more convenient to do string manipulation. However, there are some special techniques to using CStrings, particularly hard for people coming from a pure-C background to learn. This essay discusses some of these techniques.


  14. CRect Class
  15. Similar to a Windows RECT structure.

  16. CPoint Class
  17. Similar to the Windows POINT structure.

    Header: atltypes.h

  18. POINT structure
  19. Header windef.h (include Windows.h)

  20. RECT structure
  21. Header file: windef.h (include Windows.h)

  22. CSize Class
  23. Similar to the Windows SIZE structure, which implements a relative coordinate or position.

  24. SIZE structure
  25. The SIZE structure defines the width and height of a rectangle.

    Header file: windef.h (include Windows.h)

  26. windows.h - main header file for the Win32 API
  27. Windows.h on wikipedias
  28. windows.h is a Windows-specific header file for the C and C++ programming languages which contains declarations for all of the functions in the Windows API, all the common macros used by Windows programmers, and all the data types used by the various functions and subsystems. It defines a very large number of Windows specific functions that can be used in C. The Win32 API can be added to a C programming project by including the header file and linking to the appropriate libraries. To use functions in xxxx.dll, the program must be linked to xxxx.lib (or libxxxx.dll.a in MinGW). Some headers are not associated with a .dll but with a static library (e.g. scrnsave.h needs scrnsave.lib).

  29. windef.h
  30. windows.h - main header file for the Win32 API
  31. How to not #include

Friday, September 4, 2020

research on COM

research on COM

  1. COM in plain C
  2. Docking Toolbars in Plain C
  3. Embed an HTML control in your own window using plain C
  4. LiteZip and LiteUnzip Jeff Glatt
  5. Inside COM
  6. COM Interface Basics
  7. COM from scratch - PART ONE
  8. Step by Step COM Tutorial

MFC chart research

MFC chart research. search "MFC chart" on cp.com

  1. High-speed Charting Control
  2. An MFC Chart Control with Enhanced User Interface
  3. A Simple Pie Chart Control
  4. Automating Excel 2007 and creating charts using C++ MFC application in Visual Studio 2008
  5. Working with Excel in MFC
  6. What Is a Window?
  7. Creating a Window
  8. Module 3. Windows Graphics
  9. Module 2. Using COM in Your Windows-Based Program

research on thread

research "thread" on cp.com. reserched to page 12, but skipped from 1 to 4. need to recheck 1-4.

  1. Threads with MFC
  2. A Simple Worker Thread
  3. MFC UI Threads
  4. An MFC Chart Control with Enhanced User Interface
  5. Memory Leak Detection
  6. Threads And Timers
  7. Simple Multithreaded Application in pure C, Win32 and MFC
  8. Thread Synchronization for Beginners
  9. Creating a C++ Thread Class
  10. Using C and an embedded web-server to provide browser based source editing
  11. A class to synchronise thread completions
  12. An MFC Chart Control with Enhanced User Interface
  13. Start Class As Thread
  14. XWinVer - Simple class to get Windows OS version
  15. DtWinVer v1.34 - OS Detection Utility
  16. Threading is easy (A simple thread, thread pool, object pool, and more)
  17. Effective Threads in C++ - Part 1: The Basic Thread Class
  18. Provide Your Custom Class Name to your MFC Application
  19. Create projects easily with private MFC, ATL and CRT assemblies
  20. How to use the same thread function for multiple threads (safely) Derek Lakin
  21. CThread - a Worker Thread wrapper class
  22. An easy to use worker thread

Tuesday, September 1, 2020

knowledge to get system information

knowledge to get system information

  1. a good code signing certificate
  2. Working with Strings
  3. Getting System Information
  4. test this program and got error messages.

    Error C2440 'initializing': cannot convert from 'const wchar_t [18]' to 'TCHAR *' SystemInfo2

  5. XWinVer - Simple class to get Windows OS version
  6. Windows Version Numbers
  7. DtWinVer v1.34 - OS Detection Utility
  8. IsWindows10OrGreater function
  9. OSVERSIONINFOA structure
  10. it has most recent OS parameters needed in Hans's post.

  11. Version Helper functions
  12. The following functions can be used to determine the current operating system version or identify whether it is a Windows or Windows Server release. These functions provide simple tests that use the VerifyVersionInfo function and the recommended greater than or equal to comparisons that are proven as a robust means to determine the operating system version.

  13. GetVersionExA function
  14. Operating System Version
  15. Targeting your application for Windows
  16. The following example shows an app manifest file for an app that supports all versions of Windows from Windows Vista to Windows 10:

  17. Getting the System Version
  18. C++ How to detect Windows 10
  19. this is good post to summarize all kinds of system OS version information.

  20. C++ Check if Windows 10
  21. Get OSVersion in Windows using C++
  22. Getting the Windows OS version information C program example
  23. Determine Windows Version and Edition
  24. This article explains how to determine Windows version and edition. The method is very simple: The Windows API provides two functions, GetVersion/GetVersionEx, that fill the structure OSVERSIONINFO/OSVERSIONINFOEX with information such as major and minor version, product type, suite mask, platform, and so forth. This article, however, and the code provided here, does not list all the operating systems ever released by Microsoft, only the most usual ones.

  25. Getversionex deprecated
  26. DtWinVer v2.45 A comprehensive OS detection Class
  27. PJ Naughter's place
  28. c++ - GetVersionEx弃用-如何从较新的API获取产品类型(VER_NT_DOMAIN_CONTROLLER)

  29. regsvr42: Generate SxS Manifest Files from Native DLLs for Registration-Free COM
  30. This tool will spy on COM registration process and create side by side (SxS) manifest file(s)

    need to download source code and play around with it.

  31. System Information Utility
  32. This project is an attempt to create a utility or tool application that will display all the system information like CPU, OS, Multimedia, etc. The idea behind this application is no different than the one implemented in most of Microsoft’s System Info utility in Office products. But my application takes couple of steps more and displays more info than the available utilities. In this version (V1) of application, following information is displayed.

    the above two posts give me enough techniques to develop my tool to get system information.

  33. Troubleshooting Registration Free COM

  34. Mike Blaszczak's Sample Programs
  35. How To Add ToolTips To Controls On A Windows Form
  36. Register DLL / COM exe without admin rights
  37. Register DLL without admin rights
  38. Register ActiveX/COM Components without Administrator Privileges
  39. The Enigma Protector
  40. Operating System Version
  41. The Version API Helper functions are used to determine the version of the operating system that is currently running. For more information, see Getting the System Version.

  42. Getting the System Version
  43. Verifying the System Version
  44. Detecting a Product Suite
  45. Getting Hardware Information
  46. Using System Information
  47. Getting System Information
  48. TEXT macro
  49. TEXT() macro
  50. A tool for registering OCXs and COM DLLs
  51. Registering any COM component through coding
  52. A COM Registration Spy
  53. RegSvrEx - An Enchanced COM Server Registration Utility
  54. regsvr42: Generate SxS Manifest Files from Native DLLs for Registration-Free COM
  55. This tool will spy on COM registration process and create side by side (SxS) manifest file(s)

    need to download source code and play around with it.

  56. Using COM Without Registration
  57. A small class for using COM DLL modules without registering them

    other way to avoid registering COM DLL, is to define them on the manifest: see detailled explantion: regsvr42: Generate SxS Manifest Files from Native DLLs for Registration-Free COM[^]

  58. ReneNyffenegger / about-Windows-Registry
  59. Registry: HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\n
  60. A Closer Look at HKEY_LOCAL_MACHINE for Windows NT
  61. Troubleshooting Registration Free COM