O
Ups. Habe wieder einmal das Forum verwechselt.
HWND myButton = CreateWindow(
"button",
"Name",
WS_CHILD | WS_VISIBLE,
10,10,100,100,
myParent,
reinterpret_cast<HMENU> (IDC_MYBUTTON),
myInstance,0);
// Später:
DestroyWindow(myButton);
// oder:
DestroyWindow(GetDlgItem(IDC_MYBUTTON));