Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8832157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:28:00+00:00 2026-06-14T08:28:00+00:00

Is there a known issue with calling CreateWindowExA on Windows 8 (64-bit) for a

  • 0

Is there a known issue with calling CreateWindowExA on Windows 8 (64-bit) for a 64-bit application?

Context: I’m using the FOX Toolkit (FOX STABLE 1.6.46). When compling and running the most trivial Hello World sample (“hello”), the call to CreateWindowExA in file FXWindow.cpp:1345 returns a zero HWND handle (but GetLastError() doesn’t report an error). This only happens in one specific configuration:

OS        | OS Platform | App compiled for | CreateWindowExA succeeds? |
Windows 7 |    32-bit   |      32-bit      |         YES               |
Windows 7 |    64-bit   |      32-bit      |         YES               |
Windows 7 |    64-bit   |      64-bit      |         YES               |
Windows 8 |    64-bit   |      32-bit      |         YES               |
Windows 8 |    64-bit   |      64-bit      | NO! (returns NULL)        |

Is there anything different about CreateWindowExA with the last configuration. Please note that the window procedure is the same in all cases, and that the messages it receives are the following, in that order:

  • WM_GETMINMAXINFO (forwarded to DefWindowProc)
  • WM_NCCREATE (forwarded to DefWindowProc)

In the last configuration, it goes on with WM_NCDESTROY and then CreateWindowExA returns NULL.

In all other configurations, WM_NCCALCSIZE is sent and finally WM_CREATE.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:28:01+00:00Added an answer on June 14, 2026 at 8:28 am

    I’ve found the source problem: FOX incorrectly defines the function signature of the window procedure as

    long CALLBACK wndproc(FXID hwnd,unsigned iMsg,unsigned int wParam,long lParam);
    

    (with FXID typedef’d to void*), so on 64-bit Windows, wParam and lParam are only 32-bit wide, whereas they should be 64-bit. The correct function signature (using FOX types) is:

    FXival CALLBACK wndproc(FXID hwnd,unsigned int iMsg,FXuval wParam,FXival lParam); 
    

    So why did it work in 64-bit Windows up to Windows 7? As MSDN says:

    The lParam of WM_NCCREATE contains a pointer to the CREATESTRUCT
    structure that contains information about the window being created.
    The members of CREATESTRUCT are identical to the parameters of the
    CreateWindowEx function.

    It so happens that on Windows 7 (64-bit) and below, that structure was always allocated in memory below 4GB, and even though the pointer value was truncated to 32-bit, it still pointed to the correct location. As of Windows 8, that structure is allocated anywhere in the 64-bit memory range, and truncating it is likely to produce an incorrect pointer.

    There is just one thing I’m unsure about: CALLBACK being __stdcall, arguments are pushed onto the stack from right to left. So, given the incorrect declaration of the windproc, is it still retrieving the correct iMsg and hwnd parameters?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a well known issue when it comes to using .NET value types
Are there any known issues with ASP.Net Ajax and IE6 in Windows 2000 machines
Are there known issues with storing user defined types within index organized tables in
I know there are tons of threads regarding this issue but I have not
I know there are several threads and posts regarding this issue in the internet
I know there are dozens of questions on different sites about this issue. I
I know this issue being mentioned before, but resolutions there didn't apply. I'm having
I know that there are some threads have a similar issue with this thread.
I would like to know if there exist algorithms that solves this issue. It
I've come across an issue with using a third party library, and am not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.