Friday, August 28, 2020

MFC software localization- my utility tool preparations

MFC software localization

  1. Introduction to Software Translation for MFC
  2. A Class for Creating a Trace Log
  3. Registry Class
  4. a very neat solution

  5. Add a Help Button to a MessageBox
  6. Welcome to Paul DiLascia's Home Page!
  7. Paul DiLascia — Links to columns and articles Paul DiLascia — Links to columns and articles
  8. Improved Tip-of-the-Day Dialog
  9. Log Wizard - Make your Logs Look Pretty!
  10. Log Wizard - a Log Viewer that is easy and fun to use!
  11. Log Wizard - Viewing Windows Event Logs Can Be Fun!
  12. LogWizard - Talk About your Logs!
  13. LogWizard - Filter your Logs Inside out!
  14. Diff tool
  15. " I was urged to produce this tool since I have to do with configuration files that change over time, and I wanted not only something to show me the diffs over time, I wanted it to be nicely integrated in the automation chain. This requirement in fact excluded third parties, because none were providing both the API I needed and the appropriate rendering format. I also loved the idea that diff algorithms and associated techniques were something new to me."

  16. Remotesoft's Salamander 1.1.6.0 (Native Compiling)
  17. Small Application Wizard This article was released on www.codeproject.com.
  18. Smart TextDiff Utility for Intel® 64 Platform
  19. HTML editor for VC++ 6.0
  20. DHTML Editor with Table Support and Source Editor
  21. Free C++ source code
  22. HTML editi control for VC++ 6.0 equivalent to MFC7 CHtmlEditCtrlBase class. Get the source code.

complete message list of all MFC controls

complete message list of all MFC controls. I will collect all message list of MFC controls. it will be convenient to create MFC applications.

  1. Tree Control Notification Messages
  2. Default List-View Message Processing
  3. List View
  4. Notifications from a Rich Edit Control
  5. Processing Tab Control Notification Messages
  6. Tab:: Macros
  7. This section contains information about the programming elements used with tab controls.

    each macro has a counterpart of message.

  8. TN062: Message Reflection for Windows Controls
  9. This technical note describes message reflection, a new feature in MFC 4.0. It also contains directions for creating a simple reusable control that uses message reflection.

  10. TN061: ON_NOTIFY and WM_NOTIFY Messages
  11. This technical note provides background information on the new WM_NOTIFY message and describes the recommended (and most common) way of handling WM_NOTIFY messages in your MFC application.

  12. List View Messages
  13. List View Notifications
  14. Button Control Notifications
  15. Button Control Messages
  16. How to send a notification that's handled by ON_NOTIFY?
  17. C++ & MFC Part 1: README FIRST
  18. Module 2: Getting Started with Visual C++ 6.0 AppWizard 1
  19. Module 2: Getting Started with Visual C++ 6.0 AppWizard 2
  20. it has good story of stdAfx.h file

  21. Module 3: Basic Event Handling, Mapping Modes, and a Scrolling View 1
  22. https://www.tenouk.com/visualcplusmfc/visualcplusmfc3a.html Module 3a: Basic Event Handling, Mapping Modes, and a Scrolling View 2
  23. Module 3b: Basic Event Handling, Mapping Modes, and a Scrolling View 3
  24. Module 4: The Graphics Device Interface (GDI), Colors, and Fonts 1
  25. Module 4: The Graphics Device Interface (GDI), Colors, and Fonts 2
  26. Module 4: The Graphics Device Interface (GDI), Colors, and Fonts 3

Wednesday, August 26, 2020

MFC class and ClassWizard questions

MFC class and ClassWizard questions

  1. MFC Classes
  2. The classes in the following list are included in the Microsoft Foundation Class (MFC) Library.

    Tip For information about CStringT and other classes that are common to both MFC and ATL programming, see Classes Shared by MFC and ATL.

    Important The MFC classes and their members cannot be used in applications that execute in the Windows Runtime.

  3. Hierarchy Chart
  4. Hierarchy Chart Categories
  5. CDC Class
  6. CDC::Arc
  7. What are the macros in resource.h used for?
  8. TN035: Using Multiple Resource Files and Header Files with Visual C++
  9. TN028: Context-Sensitive Help Support
  10. MFC Technical Notes
  11. A technical note is a document written for programmers by programmers.

    Each technical note describes a problem or feature that is beyond the scope of the rest of the MFC documentation. The technical notes supplied reflect requests for information from users, as well as specialized information that the MFC developers anticipate advanced users will want.

    There are two ways to browse through the technical notes:

    a) Technical Notes By Number b)Technical Notes By Category

Sunday, August 23, 2020

threading

research on "SynchronizationContext ";

to use CSemaphore class, we need to include "<"afxmt.h">" header file.

  1. CMutex Class
  2. Represents a "mutex" — a synchronization object that allows one thread mutually exclusive access to a resource.

  3. CEvent Class
  4. Represents an event, which is a synchronization object that enables one thread to notify another that an event has occurred.

    Events are useful when a thread must know when to perform its task. For example, a thread that copies data to a data archive must be notified when new data is available. By using a CEvent object to notify the copy thread when new data is available, the thread can perform its task as soon as possible.

    CEvent objects have two types: manual and automatic.

  5. CCriticalSection Class
  6. Represents a "critical section" — a synchronization object that allows one thread at a time to access a resource or section of code.

    the example is clear. it is good for my file list item retrieval and store it into memory for quick drawing.

  7. CSemaphore Class
  8. An object of class CSemaphore represents a "semaphore" — a synchronization object that allows a limited number of threads in one or more processes to access a Maintains a count of the number of threads currently accessing a specified resource.

  9. SynchronizationContext Class
  10. The .NET Framework's New SynchronizationContext Class
  11. Beginners Guide to Threading in .NET: Part 5 of n
  12. Understanding SynchronizationContext (Part I)
  13. Understanding SynchronizationContext: Part II
  14. Understanding SynchronizationContext: Part III
  15. Understanding the SynchronizationContext in .NET with C#
  16. CRuntimeClass Structure
  17. Each class derived from CObject is associated with a CRuntimeClass structure that you can use to obtain information about an object or its base class at run time.

    the header file is "afx.h"

  18. Logging Using the Composite Pattern
  19. Allow flexiable logging using the Composite design pattern.

  20. Synchronization in Multithreaded Applications with MFC
  21. Introduces synchronization concepts and practices in multithreaded applications

state machine design in C/C++/C#

research "state machine" in cp.com. focus on the first 4 pages. come back later..

  1. State Machine Design in C
  2. State Machine Design in C++
  3. State Machines, in C++
  4. Controlling Multiple Forms with a Finite State Machine gggustafson
  5. A C# Turing Machine
  6. Every computer is equivalent to a Turing Machine, and conversely any Turing Machine can compute anything any other computer can. Perhaps this is one of the more astonishing facts about them: being a really simple machine, a Turing Machine can theoretically, given enough time and resources, run anything you can run on a computer, any algorithm. A small mechanical Turing Machine, such as the one further described, can totally emulate the computer where you are reading this article right now, all the software, operational system etc down to the functionality of the silicon chips. To be more precise, usually Turing Machines are used as basic computational device to which other systems/machines are compare to, so if we say the former is compatible to a Turing Machine, then we mean it has the power to calculate or execute any computable function.

  7. Generic Finite State Machine Revisited
  8. Finite State Machine and Multithreading using .NET
  9. Generic DFA State Machine for .NET
  10. Configuring Simple State Machines
  11. A Simple State Machine
  12. Create loose coupled States using a Finite State Automation (FSM) model.

  13. The State Design Pattern vs. State Machine
  14. How to use the State Design Pattern when compared to State Machines, Switch statements, or If statements.

  15. Configuring Simple State Machines
  16. C++ State Machine with Threads
  17. A .NET State Machine Toolkit - Part I
  18. A .NET State Machine Toolkit - Part II
  19. A .NET State Machine Toolkit - Part III

Saturday, August 22, 2020

Resizable dialog, form, view and document

Resizable dialog, form, view and document

  1. EasySize - Dialog resizing in no time!
  2. Creating a Desktop Application for Converting Audio Files from Each Other
  3. CResizableDialog
  4. ResizableLib
  5. ResizableFormView
  6. CResizableSheet and CResizablePage
  7. CCreditsCtrl - An advanced About Box
  8. A Flat Splitter Window
  9. EasySize - Dialog resizing in no time!
  10. Visual Studio error D8016: '/ZI' and '/Gy' command-line options are incompatible
  11. Visual Studio error D8016: '/ZI' and '/O2' command-line options are incompatible
  12. Visual Studio error D8016: '/ZI' and '/Gy' command-line options are incompatible
  13. /Gy (Enable Function-Level Linking)
  14. Function-Level Linking (/Gy switch in VC++) - What is it good for?
  15. The Most Underused Compiler Switches in Visual C++: /G and /Gw
  16. Compiler Settings for Microsoft Visual C++ 2005 - 2015
  17. Compiler Settings for Microsoft Visual C++ 2017
  18. Compiler Settings for Microsoft Visual C++ 6.0

MVC pattern in WinForm(C#)

research on MVC pattern in WinForm.

  1. A Practical Use of the MVC Pattern
  2. Introduction to Model View Control (MVC) Pattern using C#
  3. MvC with winform
  4. The Model-View-Controller(MVC) Pattern with C#/WinForms
  5. Understanding Model-View-Controller
  6. Selecting a MVC/MVP Implementation for a Winforms Project
  7. How would you implement MVC in a Windows Forms application?
  8. shane-lab / winforms-mvc

Saturday, August 15, 2020

MFC: Visual Studio Resource Editor Class Wizard doesn't have all control IDs under Member Variables

MFC: Visual Studio Resource Editor Class Wizard doesn't have all control IDs under Member Variables. this post talked about one issue related with my previous note. a control ID is not substantiated. so I can not add any class variable.

  1. MFC: Visual Studio Resource Editor Class Wizard doesn't have all control IDs under Member Variables
  2. Control variable in add member variable wizard is disabled. Why?
  3. Unable to add variable to Edit Control, Error: “object reference not set to an instance of object”
  4. this post confirmed my understanding: need to double click the control to add some default event handler, then add other class memembers.

  5. MFC development in vs2017
  6. Unable to add variable to Edit Control, Error: “object reference not set to an instance of object”
  7. the following answer confirmed my understanding: it is DDE function to be added first..

    Please check whether you have DoDataExchange function added to your dialog class. Once I added this function, I am able to add variable using wizard.

  8. MFC Class Wizard can't add control member variables
  9. TN026: DDX and DDV Routines
  10. TN024: MFC-Defined Messages and Resources
  11. TN025: Document, View, and Frame Creation
  12. TN028: Context-Sensitive Help Support
  13. How to set Company Name and other properties for my DLL file built from Visual Studio 2010 project?
  14. VERSIONINFO resource
  15. What are the various “Build action” settings in Visual Studio project properties and what do they do?
  16. The Clarion Insider
  17. Version resources, part 1: Adding version information to an application
  18. 'Comments' part of VERSIONINFO not displayed
  19. How To Get the Company Name from DLLs or EXE Files
  20. How to set Company Name and other properties for my DLL file built from Visual Studio 2010 project?
  21. Message Compiler (MC.exe)
  22. Using RC (The RC Command Line)
  23. Resource Compiler
  24. Menus and Other Resources::For programming guidance for this technology
  25. Menus and Other Resources
  26. Using the Windows Headers
  27. What is _WIN32_WINNT and how does it work?
  28. Update WINVER and _WIN32_WINNT
  29. When you use the Windows SDK, you can specify which versions of Windows your code can run on. The preprocessor macros WINVER and _WIN32_WINNT specify the minimum operating system version your code supports. Visual Studio and the Microsoft C++ compiler support targeting Windows 7 SP1 and later. Older toolsets include support for Windows XP SP2, Windows Server 2003 SP1, Vista, and Windows Server 2008. Windows 95, Windows 98, Windows ME, Windows NT, and Windows 2000 are unsupported.

    When you upgrade an older project, you may need to update your WINVER or _WIN32_WINNT macros. If they're assigned values for an unsupported version of Windows, you may see compilation errors related to these macros.

  30. This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended
  31. fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting
  32. Modify WINVER, _WIN32_WINNT, and _MSC_VER
  33. Windows中一些宏的含义
  34. 修改WINVER、_WIN32_WINNT和_MSC_VER

Saturday, August 8, 2020

Error: catastrophic failure (exception from HRESULT:0x8000FFFF(E_UNEXPECTED))

when I am using Visual Studio 2017 on xps 17 laptop, I am using Class Wizard to add member variable into a MFC SDI demo, I got this error message:

catastrophic failure (exception from HRESULT:0x8000FFFF(E_UNEXPECTED))

I searched internet and I find these links. it gave me some thoughts to fix this error message.

  1. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
  2. Cycle Clipboard Ring Exception
  3. the solution is one of them: start Visual Stuio as adminstrator. I will try this way and validate it.

    "I am facing exactly the same issue. I have VS 2017 15.5.0 on windows 10."

    I had this error come up fixed it buy running visual studio 2017 as administrator

    the way I started class wizard is from class view in solution folder. then select the form view class->class wizard->cick tab: add memeber variable. this way will cause this error message to throw out.

    my workaroun is to start from resource view->IDD_MYMFC15_FORM class( a class you are interested:). a form is opened. select the edit control I am interested-> right click->select add variable. a new variable will be added into this selected class, as this edit control in this example.

  4. How to: Create a Dialog Box (C++)
  5. Dialog Editor (C++)
  6. Dialog Box Controls (C++)
  7. Menu Editor (C++)
  8. Menu Commands (C++)
  9. String Editor (C++)
  10. Toolbar Editor (C++)
  11. Version Information Editor (C++)
  12. Resource Files (C++)
  13. How to: Create Resources (C++)
  14. How to: Manage Resources (C++)
  15. How to: Include Resources at Compile Time (C++)