|To create "a button or checkbox dynamically on MFC ... window" you do the following steps:
1. create a variable of the CButton class
2. Call CButton::Create method to create a button or checkbox window.
You only need to read the Microsoft Docs and know the exact size and position of your button within the parent (dialog or form view or some other) window.