Changes in MFC Classes Notation

Applies to TestComplete 14.93, last modified on October 12, 2021

Since TestComplete is an OLE server, all variable and method names in Visual C++ applications must follow OLE naming rules. Some function names in C++ may include characters not supported by OLE standard, for example, “operator +”, since operators are functions too.

TestComplete modifies all variable and method names of MFC objects in the following way:

  1. The class name and an underscore are added before the method or variable name. For example --
    Visual C++ code Script Code
    CWnd::GetHandle  CWnd_GetHandle
    CFrameWnd.m_bAutoMenuEnable CFrameWnd_m_bAutoMenuEnable
  2. Characters that are not supported by the IDL convention are replaced with token strings. This typically occurs for C++ operators.
    Visual C++ code Script Code
    Space _
    :: _
    ~ Tilde
    * Pointer
    == Equal
    != NotEqual
    = Assignment
    [] Indexing
    + Plus
    - Minus
    ! Exclamation
    < Less
    > Greater
    & AND
    | OR
    / Slash

    For instance, CClassA::operator = (...) is converted to CClassA_operator_Assignment(...).

See Also

Testing Visual C++ Applications - Overview

Highlight search results