# SetWindowLongPtr function

**URL:** <https://forum.xojo.com/t/setwindowlongptr-function/16855>\
**Category:** Windows\
**Created:** [May 27, 2014, 11:11pm UTC](https://forum.xojo.com/t/setwindowlongptr-function/16855 "2014-05-27T23:11:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Kouraklis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@John\_Kouraklis](https://forum.xojo.com/u/John_Kouraklis)\
**Post date:** [May 27, 2014, 11:11pm UTC](https://forum.xojo.com/t/setwindowlongptr-function/16855/1 "2014-05-27T23:11:06Z")

</div>

Hi,

I am looking for a method that implements this function: SetWindowLongPtr

The link is here: [http://msdn.microsoft.com/en-gb/library/windows/desktop/ms644898(v=vs.85).aspx](http://msdn.microsoft.com/en-gb/library/windows/desktop/ms644898%28v=vs.85%29.aspx)

I’ve just checked the WFS v3.1 and I can only find the SetWindowLong function: [http://msdn.microsoft.com/en-gb/library/windows/desktop/ms633591(v=vs.85).aspx](http://msdn.microsoft.com/en-gb/library/windows/desktop/ms633591%28v=vs.85%29.aspx)

Can you guide me how I can use the Ptr function? The method in the WFS is called ChangeWindowStyle.

Thanks in advance.

Regards,

John

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [May 27, 2014, 11:20pm UTC](https://forum.xojo.com/t/setwindowlongptr-function/16855/2 "2014-05-27T23:20:16Z")

</div>

Since your Xojo app is a 32-bit process, SetWindowLongPtr just maps through to SetWindowLong. You can use the WFS function as is.

---

<div class="post-metadata">

**Author:** ![John\_Kouraklis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@John\_Kouraklis](https://forum.xojo.com/u/John_Kouraklis)\
**Post date:** [May 27, 2014, 11:27pm UTC](https://forum.xojo.com/t/setwindowlongptr-function/16855/3 "2014-05-27T23:27:52Z")

</div>

Thanks for the tip Tim

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:14pm UTC](https://forum.xojo.com/t/setwindowlongptr-function/16855/4 "2020-10-29T17:14:45Z")

</div>


