OrchardSoftware / 4D-Win32API

Win32API is a plugin for 4th Dimension that lets your Windows applications take advantage of Windows-specific features that are not exposed by native 4th Dimension commands. Win32API lets you set a custom icon for any window, change the name of your 4D application in the title bar and task bar, customize file open and save dialogs, get information from the Regional Settings control panel, and much more.
MIT License
13 stars 9 forks source link

gui_GetWindowEx not working for main 4D window in v16R2 64 bit #24

Open foregroundDev opened 7 years ago

foregroundDev commented 7 years ago

In 4D v16 R2, gui_GetWindowEx returns -3 for the main 4D window, ie when you pass an empty string.

$WinRef:=gui_GetWindowEx ("") //$WinRef is always -3

Tested on; Win32API v8.1.2 4D v16 R2 64 bit Windows 10, 1607

sleeper86 commented 7 years ago

Issue is related to FindWindowEx(NULL, NULL, pathName, NULL). The 64bit, V16 client does not use the 4D.exe pathname as the class name. This appears to work fine with 32bit, V16 client. I am in the process of researching a fix.

sleeper86 commented 7 years ago

Workaround provided by 4D as they have not officially released the V16 plugin sdk.

HWND PA_GetMainWindowHWND() { HWND result = NULL; EngineBlock pb = {0}; Call4D( -719, &pb ); if(pb.fError==0) result = (HWND)pb.fParam1; return result; }

foregroundDev commented 6 years ago

Hi. I was just wondering how you're getting on with this. Was the above work around added to v8.2.2 because it's still not working. Have 4D released a new SDK yet?

I'm not hassling you. I know it's a freebie, and I'm very grateful for it. I'm just wondering where you're at.

Thanks. Pete Hay

kipp76 commented 6 years ago

We had so many problems with the R version that we dropped back to 16.2, then went to 16.3. I haven't seen any issues with 16.3 and Win32API yet. Sorry, I know that doesn't really answer your question.

Kipp Hollingsworth About.Me http://about.me/KippH Twitter https://twitter.com/Kipp76

On Tue, May 1, 2018 at 9:17 PM, Pete Hay notifications@github.com wrote:

Hi. I was just wondering how you're getting on with this. Was the above work around added to v8.2.2 because it's still not working. Have 4D released a new SDK yet?

I'm not hassling you. I know it's a freebie, and I'm very grateful for it. I'm just wondering where you're at.

Thanks. Pete Hay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OrchardSoftware/4D-Win32API/issues/24#issuecomment-385836565, or mute the thread https://github.com/notifications/unsubscribe-auth/AClSYDVjAr6WMaezYgF5wt1l3ytNuZHBks5tuQkPgaJpZM4MtpuQ .

foregroundDev commented 6 years ago

Hi Kipp,

Thanks for the reply. No problem. It’s your guys plugin, and as I said, I’m very grateful to be able to use it.

It’s not so much a 16R6 issue, it’s a 64 bit issue. So, across all version that run 64 bit really.

Thanks. Pete Hay

foregroundDev commented 6 years ago

Hi,

I'm just wondering how you are getting on with this issue. Once again, no pressure, I'm just asking, so that I can do some planning.

Are you able to fix it? And if so, do you have any plans on when that might be?

Thanks, Pete Hay

kipp76 commented 6 years ago

We stopped using the R2 line entirely. We were going to 16.4, but never could get past the plugin issues and honestly haven't tried it again due to time.

On Thu, Nov 29, 2018 at 6:00 PM Pete Hay notifications@github.com wrote:

Hi,

I'm just wondering how you are getting on with this issue. Once again, no pressure, I'm just asking, so that I can do some planning.

Are you able to fix it? And if so, do you have any plans on when that might be?

Thanks, Pete Hay

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OrchardSoftware/4D-Win32API/issues/24#issuecomment-443026087, or mute the thread https://github.com/notifications/unsubscribe-auth/AClSYBAOcc_GVHMt-VqnbRvhzXaWm0evks5u0GcMgaJpZM4MtpuQ .

fridok commented 4 years ago

Since there is no current 4D version anymore not using 64 bit clients I would like to ask if you guys are now migrating to V18 as well and if while doing this this issue could be fixed. I know that WIN32API as its name suggests is entirely not made für 64 bit so you might as well drop it as a whole...? What are your plans?

OrchardSoftware commented 4 years ago

Our tentative plan is to create a new Win64API project and convert/move all the commands that we use in our application and publish it here. It will more than likely not be a 1:1 conversion but as always we are going to welcome any contributions from the community.

We are incredibly busy at the moment and even though this is on our road map and important for us the timeline is still very much to be determined. We are hoping by the end of the year.