Assumed, your structure (a class would be better)
has its constructor(to allocate and set the szText pointer) and destructor(to free the szText pointer) :) :
{
SetWindowLong(hwnd, 0, (LONG) new CYorButtonInfo();
}
{
CYourButtonInfo* pcInfo = (CYourButtonInfo*) GetWindoLong(hwnd, 0);
delete pcInfo;
}