Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateWindowEx #810

Closed
Gavin-Williams opened this issue Nov 29, 2022 · 3 comments · Fixed by #811
Closed

CreateWindowEx #810

Gavin-Williams opened this issue Nov 29, 2022 · 3 comments · Fixed by #811
Assignees
Labels
bug Something isn't working

Comments

@Gavin-Williams
Copy link

Gavin-Williams commented Nov 29, 2022

CreateWindowEx is returning a zero handle with the following output...

An unhandled exception of type 'System.InvalidOperationException'
Failed to create window class. Error: 1401

// error 1401 / 0x579 ERROR_INVALID_MENU_HANDLE

I'm passing default as the menu handle. I don't see a problem with that, it's what I've been using.

Update:
OK :
0.2.63
0.2.104
NOT WORKING:
0.2.138
0.2.158

@Gavin-Williams Gavin-Williams added the bug Something isn't working label Nov 29, 2022
@Gavin-Williams
Copy link
Author

Gavin-Williams commented Nov 30, 2022

I tried replacing default with GetWindowSafeHandle() but no luck

private static SafeHandle GetWindowSafeHandle()
    {
        return null;
    }

Also tried null, which it accepts, but still Error 1401.

@AArnott
Copy link
Member

AArnott commented Nov 30, 2022

I don't know what you mean by replacing default with GetWindowSafeHandle which just returns null. That doesn't sound like a change at all. And where did you make this change?
I'm not familiar with this particular API. If you can provide a compilable repro case (following the issue template we created) I can probably help further.

@AArnott
Copy link
Member

AArnott commented Nov 30, 2022

It looks like #760 probably regressed this by passing in -1 for hMenu instead of 0. I'll look more into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants