1. appeon pb
  2. PowerBuilder
  3. Sunday, 10 December 2023 17:29 PM UTC

I use SetWindowLongA external function to resizeable PB response window,but when i applytheme, the Response window cant be resized any more.

withour ApplyTheme, SetWindowLongA works ok.

 

Bruce Armstrong Accepted Answer Pending Moderation
  1. Monday, 11 December 2023 17:33 PM UTC
  2. PowerBuilder
  3. # 1

I've got a resizeable response window in an app with themes in use and I'm not seeing any issues.  The code I'm using is at: https://community.appeon.com/index.php/codeexchange/powerbuilder/101-resizable-response-windows-example#97

 

Comment
  1. Bruce Armstrong
  2. Tuesday, 12 December 2023 20:55 PM UTC
Sigh....



The code sample I referred to was written in 2015. No surprises that it would need to be adjusted to work under 64 bit when 64 bit wasn't an option then.



My point still is that modifying the code to convert the function calls from ANSI to Unicode is not the modifications that are needed to make it work under 64 bit. That's a red herring.





  1. Helpful
  1. Bruce Armstrong
  2. Tuesday, 12 December 2023 21:14 PM UTC
Well, 2015 is when it was uploaded to the Appeon site, The code sample itself dates back at least to 2012

  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 12 December 2023 21:25 PM UTC
My Framework has a bit different implementation. For example, you can also set a MAX size (not just a MIN) as well and it uses the pbm_getminmaxinfo mapped user event where the argument for that must be a LongPTR. ;-)
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 11 December 2023 01:45 AM UTC
  2. PowerBuilder
  3. # 2

Making a PB response window resizable via a Windows API call may work under standard conditions, but you cannot reasonably expect the skinning functionality of PB themes to work flawlessly when the window's normal characteristics and behavior have been altered in this manner. If you are committed to using themes, it would appear that hacking a response window to make it resizable isn't going to work, so I suggest you not do this.

You may certainly submit an enhancement request to optionally make the standard response window resizable, but I doubt if that will happen anytime soon.

Comment
  1. Miguel Leeuwe
  2. Monday, 11 December 2023 03:42 AM UTC
Hi,

Already requested by me in March: https://www.appeon.com/standardsupport/track/view?id=9881

  1. Helpful 1
There are no comments made yet.
appeon pb Accepted Answer Pending Moderation
  1. Monday, 11 December 2023 01:10 AM UTC
  2. PowerBuilder
  3. # 3

It's Theme fault , not api ,both SetwindowLongW or SetwindowA or SetWindowLongPtr is same result.

 

@Rolands Rolands ResizeRespons example  is also abnormal after Apply theme

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 10 December 2023 18:08 PM UTC
  2. PowerBuilder
  3. # 4

Hi APB;

  Since W10,  you should not be using any old ANSI SDK calls from your PB App's. In your case, you should be using the SetWindowLongW method instead.

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlongw

HTH

Regards... Chris 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.