No subject


Tue Aug 30 17:20:58 CDT 2005


*pszDisplayName*
    Address of a buffer to receive the display name of the folder
    selected by the user. The size of this buffer is assumed to be
    MAX_PATH characters.

Of course, MAX_PATH might be different from the UNIX max path constant, 
though I am hoping to get away with that :-). When I copy the resulting 
path back into pszDisplayName, I truncate at MAX_PATH, just to be sure.

Another solution would be to let the API indeed allocate the buffer, 
though the user will have to free it, which he might forget more easily, 
since he didn't do the allocation.

>  
>
>>+                    bi->hwndOwner = dialog;
>>+                    bi->pszDisplayName = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
>>+                    bi->lpszTitle = "Please choose a directory"; /*FIXME: Get this multilingual*/
>>    
>>
>
>Oh, I see. This is a rather unintuitive API design, why not simply return
>the path or have a char ** out parameter instead of setting the input
>structure?
>  
>
See above.
Also, in the future, the pszDisplayName could perhaps be use to 
preselect an entry, or, the way it works in win32, define the root of 
the dialog.

Robert



More information about the wine-devel mailing list