SetWindowLongPtrW(hDlg, DWLP_USER, 0); /* we
don't need it anymore */
SetPropW( hDlg, szColourDialogProp, lpp );
SetPropW( hDlg, szColourDialogProp, lpp ) should be SetPropW( hDlg, szColourDialogProp, NULL ).
That's what I get for writing code at 1am after a couple of beers :/ It probably should be RemovePropW.
Mike