728x90 반응형 프로그래밍108 MFC 멀티바이트 To 유니코드 멀티바이트를 유니코드로 변환하는 방법 void CStringToWideChar(CString cstr, wchar_t* pwchar, int size) { int cstrLen = cstr.GetLength(); ASSERT( cstrLen < MAX_LENGTH ); MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, cstr.GetBuffer(cstrLen), cstrLen, pwchar, size); cstr.ReleaseBuffer(); } 2020. 11. 2. MFC 타입 변환(Hex to ASCII) //Hex 값을 입력하면 ASCII 값으로출력 CString outbuf="6372"; CString temp,output; temp = outbuf; int len=temp.GetLength(); for(int i=0; iReceive(data,length); data[length]='\0'; CString temp=""; for(int i = 0;i 2020. 11. 2. c# 다중언어 지역화(Localization) 및 다중 언어(Multi-Language) 지원을 위한 강력한 기능을 제공합니다. 우선 다중으로 지원할 문자열을 기록할 리소스를 프로젝트에 추가합니다. 이 파일을 '기준 리소스'라고 부르겠습니다. 그리고 지역화할 문자열을 기록할 리소스도 추가합니다. 여기서 파일 이름이 중요합니다. 앞서 생성한 기준 리소스 파일명에 .(온점) 그리고 문화 문자열을 넣습니다. 문화 문자열은 특정 문화권을 지칭하는, 알파벳 소문자 2개 -(하이픈) 알파벳 대문자 2개로 이루어진 문자열입니다. 한국, 한국어는 ko-KR로 표현됩니다. 문화 문자열에 대한 정보들은 아래 링크를 참고하십시오. http://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).as.. 2020. 11. 2. C# 윈폼(Windows Forms) Thread 사용 using System; using System.Windows; using System.Threading.Tasks; namespace WpfApp { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { // 작업쓰레드 생성 Task.Factory.StartNew(Run); } private void Run() { // 해당 쓰레드가 UI쓰레드인가? if (textBox1.Dispatcher.Che.. 2020. 11. 2. 이전 1 ··· 12 13 14 15 16 17 18 ··· 27 다음 728x90