记录下
如果不知道这个方法
说实话,我又得一番折腾了
//ip-info-button //std::string str = command_line->GetSwitchValueASCII("ip-info"); //std::wstring ipInfoData = command_line->GetSwitchValueNative("ip-info"); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch("ip-info")){ // std::string str = command_line->GetSwitchValueASCII("lang"); // wchar_t tmp[1000] = L" "; // std::wstring wstr; // setlocale(LC_ALL, "chs"); // MultiByteToWideChar(CP_ACP, 0, str.c_str(), str.length(), tmp, str.length()); // wstr.assign(tmp); std::wstring ipInfoData = command_line->GetSwitchValueNative("ip-info"); ip_info_button_ = AddChildView(std::make_unique<IpInfoButton>(ipInfoData)); } //ip-info-button