Andrew Brunner ha scritto:
I would be interested in a reply to this.  Under windows you need this to go
along with createparams();

Otherwise you can try to get along with Get/SetWindowLong right?  But what
about on OSes other than windows?

From a quick look to documentation, RecreateWnd is just a dangerous hack/workaround to overcome some Windows bugs/inadequacies.

In Windows it's impossible to change some properties of a window, such as:
   *  Changing the border style.
* Changing the CharCase, HideSelection or OEMConvert property of an edit control.
   * Changing the Alignment or ScrollBars property of a memo control.
   * Changing the Sorted or Style property of a listbox control.
   * Changing the Sorted or Style property of a listbox control.
   * Changing the Alignment property of a listbox control.
   * Changing the Ctl3D appearance of a checkbox control.

and the only thing that can be done is to destroy it, and then recreate it with new properties. It's just one of the 65000-plus known bugs of Windows. This is not only unneeded, but not even thought of in other OS's. Only in Redmond such a thing can be considered "normal".

The call releases the old handle, and creates a new one. Meaning that if there are other widgets, siblings or descendants, which have registered the old handle (for anchoring, z-order or whatever), they will be left with an invalid handle.

With honest to God OS's you may use the Invalidate method, to force a repaint of the window, but that's usually not required, because the LCL will take care of that automatically.

Giuliano


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

Reply via email to