I try to draw text using a dll library which has only interfaces of ANSI version encapsulated windows ANSI apis, but I need to store string data using utf-8. I don't want to convert strings using MultiByte/WideChar functions so I want an approach to change the CP_ACP in my application, so that I can input string data into ANSI apis. thanks.
ps: I don't want to change the system default codepage.
CP_ACP
represents the system Ansi codepage. You cannot change that on a per-process or per-thread basis. It is a system-wide setting. If the DLL really is dependant onCP_ACP
internally, then you have no choice but to convert your from/to UTF-8 whenever you interact with the DLL.