Tuesday, January 5, 2021

Warning C4840 varargs and conversion operators in MFC CString

Warning C4840 non-portable use of class 'ATL::CStringT>>' as an argument to a variadic function Credits

  1. varargs and conversion operators in MFC CString
  2. the soultion is:

    CString str = TEXT("world");
    CString buffer;
    buffer.Format(TEXT("Hello, %s"), static_cast&20 lt;LPCTSTR>(str));
    // alternatively:
    // buffer.Format(TEXT("Hello, %s"), str.GetString());

  3. Transparent Scrolling Credits
  4. when I compiled this project, I got this error message:.

    CString str;
    str.Format(_T("Could not find bitmap resource \"%s\". Be sure to assign the bitmap a QUOTED resource name"), m_arCredits.GetAt(n).Mid(2));
    AfxMessageBox(str);

  5. CString Operations Relating to C-Style Strings
  6. the solution is:

    CString kindOfFruit = _T("bananas");
    int howmany = 25;
    _tprintf_s(_T("You have %d %s\n"), howmany, (LPCTSTR)kindOfFruit);

  7. A Scrolling Credits Dialog
  8. This is a paragraph.

  9. CAboutCtrl - Aboutbox Credits Control
  10. This is a paragraph.

  11. CMatrixCtrl - Matrix Credits Control
  12. This is a paragraph.

  13. my ticket
  14. This is a paragraph.

  15. Resizing Win32 Dialogs with DialogBox() and Dialog Resources
  16. This is a paragraph.

  17. QuickDialogs - A Library for Creating Dialogs Quickly and Elegantly
  18. This is a paragraph.

  19. Dialog Header
  20. Hacking the CPropertySheet
  21. This is a paragraph.

  22. This is a paragraph.

  23. This is a paragraph.

  24. This is a paragraph.

  25. This is a paragraph.

  26. This is a paragraph.

  27. This is a paragraph.

  28. This is a paragraph.

  29. This is a paragraph.

No comments:

Post a Comment