On Fri, 21 Apr 2006 00:35:08 +0330, Marc Weustink <[EMAIL PROTECTED]> wrote:
I've had a look and I've 2 questions.

     WM_CLOSE:
     Begin
-      if (Window = TWinCEWidgetSet(WidgetSet).AppHandle) and
-        (Application.MainForm <> nil) then
+//      if (Window = TWinCEWidgetSet(WidgetSet).AppHandle) and
+//        (Application.MainForm <> nil) then
       begin
+ Windows.SendMessage(Application.MainForm.Handle, WM_CLOSE, 0, 0);

Why do you resend the WM_Close to the application ? It just recived one.
And why if the LM_closequery commented out ?

Well no reason for that....actually i dont care for that,the only thing i noticed is Window = TWinCEWidgetSet(WidgetSet).AppHandle is never true so i commented it and a application.terminate is added,to terminate the program.
also becouse of that lm_closequery is not important....
overall its a quick and dirty fix for now to make program exit,and still in the way of exiting we encounter a missaligned datatatype.
(i noticed some bugs within compiler,maybe that is related to that)

+//roozbeh:this thing belong to windows unit...someone should move them there! +function GetTextExtentPoint(DC: HDC; Str: PWideChar; Count: Integer; var Size: TSize): BOOL; +function GetTextExtentPoint32(DC: HDC; Str: PWideChar; Count: Integer; var Size: TSize): BOOL;

Why add those and not call Windows.GetTextExtentExPoint ?


Well these definitions are in windows.h that comes with sdk also in sdk help you see these functions are available(although nothing is said that these are just macros). So i think as far as these are in windows.h they should be in our windows too. And beside that these definitions are used a lot in lcl units so,if dont want these definitions we have to change some lcl units,and some codes copy-pasted from win32 interface. Overall as far as they are in windows.h and sdk help i dont think adding them will do any harm!

apart from these the patch also makes button caption changing work,tstatictext work too.

roozbeh


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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

Reply via email to