CWnd::GetWindowTextLengthで、テキストの長さを取得する。
![エディットコントロールを追加](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20220823/20220823110640.png)
エディットコントロールを追加。
CWndDlg.cppで、
こう書く。
!["ABCDE"と入力して、Button1を押すと、](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20220823/20220823110839.png)
"ABCDE"と入力して、Button1を押すと、
![テキストの長さ"5"が出る。](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20220823/20220823110923.png)
テキストの長さ"5"が出る。
Sample/mfc/CWnd/GetWindowTextLength/src/CWnd at master · bg1bgst333/Sample · GitHub
CWnd::GetWindowTextLengthで、テキストの長さを取得する。
エディットコントロールを追加。
CWndDlg.cppで、
こう書く。
"ABCDE"と入力して、Button1を押すと、
テキストの長さ"5"が出る。
Sample/mfc/CWnd/GetWindowTextLength/src/CWnd at master · bg1bgst333/Sample · GitHub