msi: Add an initial implementation of the PathEdit control
Mike McCormack
mike at codeweavers.com
Wed Aug 23 20:42:39 CDT 2006
James Hawkins wrote:
> @@ -65,6 +65,7 @@ struct msi_control_tag
> float progress_current;
> float progress_max;
> WCHAR name[1];
> + DWORD attributes;
You shouldn't add members after name[1], as the string in name[] will
overwrite them.
> + sz = 0x20;
> + buf = msi_alloc( sz*sizeof(WCHAR) );
> + while( buf )
> + {
> + r = GetWindowTextW( control->hwnd, buf, sz );
> + if( r < (sz-1) )
> + break;
> + sz *= 2;
> + buf = msi_realloc( buf, sz*sizeof(WCHAR) );
> + }
There's already code to get the window text in
msi_dialog_edit_handler(), so please factor it out into a new function
rather than copying it. (maybe LPWSTR msi_get_window_text(HWND)?)
> + LPCWSTR prop;
> + prop = (LPWSTR)MSI_RecordGetString( rec, 9 );
You shouldn't need a cast here...
Mike
More information about the wine-devel
mailing list