Код: Выделить всё
auto* data = new BackupStatusMsg{ pct, st, e1, e2, msg };
::PostMessage(m_hWnd, WM_BACKUP_STATUS, 0, reinterpret_cast(data));
< /code>
и в методе обработчика: < /p>
LRESULT DialogClass::OnSomething(WPARAM, LPARAM lp)
{
std::unique_ptr p(reinterpret_cast(lp));
// .....
return 0;
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... the-memory
Мобильная версия