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

No comments:

Post a Comment