CUserControlに独自のウィンドウクラス名を付ける。
といっても、ウィンドウクラス名の登録はCWindow::RegisterClassで行う。
で、CUserControl::Createでそのウィンドウクラス名を指定するカタチ。
UserControl.hで、
lpctszClassNameを指定するバージョンを追加。
UserControl.cppで、
CWindow::Createで、lpctszClassNameを指定。
MainApplication.cppは、
CWindow::RegisterClassで、仮に"UC1"というウィンドウクラス名を登録。
MainWindow.cppで、
m_pUserControl->Createで、ウィンドウクラス名は"UC1"とする。
![起動時](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20220206/20220206165619.png)
起動時。
!["UC1"にしてもCUserControl表示出来てる](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20220206/20220206165712.png)
"UC1"にしてもCUserControl表示出来てる。
![終了時](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20220206/20220206165850.png)
終了時。
Test/winapi/CUserControl/Create/src/CUserControl at master · bg1bgst333/Test · GitHub