Paul Ishenin schreef:
Hello, Vincent Snijders.

On 20.04.2007 you wrote:

VS> Paul Ishenin schreef:
Hello, [EMAIL PROTECTED]

There are several request about OnTypeChange event implementation for
TOpenDialog/TSaveDialog (e.g. report 619, 8349).

This patch implements this feature for win32, gtk1 and gtk2
widgetsets.

I ask you to review this patch, especially win32 part. I've made some
restructuring of ShowFileDialog function
(interfaces/win32/win32wsdialogs.pp).
I've splitted it into 3 parts (as it was suggested in TWSCommonDialog):
- CreateHandle - returns pointer to OPENFILENAME struct,
- ShowModal - calls apropriate windows dialog function with OPENFILENAME struct
- DestroyHandle - destroys OPENFILENAME struct

Ofcource, LPOPENFILENAME is not handle, but there is no handle at all
for windows dialogs.

VS> In all implementations a TFileDialogAccess is needed to call 
UpdateFilterIndex. I
VS> think this method is like several IntfXXX methods found in the LCL, for 
example
VS> TApplication.IntfEndSession. They are messages from the widget set to the 
interface,
VS> that could be implemented with LM_XXX message, but recently we chose for 
new methods
VS> starting with IntfXXX, in this change I would choose IntfFileTypeChanged.

Renamed from UpdateFilterIndex to IntfFileTypeChanged.

I think you should make IntfFileTypeChanged public, so that you don't need TFileDialogAccess.


VS> I see that FileNameBuffer is allocated on the stack and assigned to the 
lpStrFile
VS> field. But because of the methods are now split, the stack is cleared. So I 
wonder
VS> if the lpStrFile field contains a valid pointer in ProcessFileDialogResult.

Thanks. I've missed that while changing code. Changed from array to LPTSTR.

Why not PChar? Although they are technically the same, I never saw a LPTSTR declared in the win32 interface, I mean, we never declare a LPTSTR, only use them as they are declared in the windows unit.


VS> Could you test this on windows 98 / ME? Things are a bit different there 
due to the
VS> different size of the OpenFile struct. I did not see any problems at first 
glance.

sorry, I dont have win98/ME.


OK, we will see the bug reports, if there are any problems.

Vincent

P.S. Don't forget to remove the reply headers, so that I don't forget to put Lazarus as recipient and Marc can read this answer too.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to