flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > Windows 7 not create window WS_EX_NOREDIRECTIONBITMAP

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 497
I try CreateWindowEx with WS_EX_NOREDIRECTIONBITMAP
But get GetLastError() = 87 (ERROR_INVALID_PARAMETER)

WS_EX_NOREDIRECTIONBITMAP = 0x00200000

Code:
    wc.cbSize        = sizeof(WNDCLASSEX);
    wc.style         = CS_HREDRAW | CS_VREDRAW ;
    wc.lpfnWndProc   = WndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = 0;
    wc.hInstance     = GetModuleHandle(NULL);
    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    wc.lpszMenuName  = NULL;
    wc.lpszClassName = g_szClassName;
    wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

    if(!RegisterClassEx(&wc))
    {
        MessageBox(NULL, "Window Registration Failed!", "Error!",
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }
HWND const window = CreateWindowEx(WS_EX_NOREDIRECTIONBITMAP,
                                   wc.lpszClassName, "Sample",
                                   WS_OVERLAPPEDWINDOW | WS_VISIBLE,
                                   CW_USEDEFAULT, CW_USEDEFAULT,
                                   CW_USEDEFAULT, CW_USEDEFAULT,
                                   nullptr, nullptr, module, nullptr);
    

But without WS_EX_NOREDIRECTIONBITMAP CreateWindowEx work fine and not get any errors.
And i see on monitor created window.
Post 15 Feb 2019, 08:10
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2795
Location: dank orb
https://msdn.microsoft.com/magazine/dn745861.aspx

I don't know for certain, but support for that flag might have started with Windows 8?

_________________
¯\(°_o)/¯ unlicense.org
Post 15 Feb 2019, 16:58
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 497
I look tutorials about DirectComposition. In tutorial create window WS_EX_NOREDIRECTIONBITMAP

How WNDCLASS and RegisterClass diferent compare with WNDCLASSEX and RegisterClassEx ?
Or this not help me create WS_EX_NOREDIRECTIONBITMAP ?
Post 16 Feb 2019, 06:38
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 497
Strange msdn write WS_EX_NOREDIRECTIONBITMAP support on Windows 2000
https://docs.microsoft.com/en-us/windows/desktop/winmsg/extended-window-styles
Post 16 Feb 2019, 09:02
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2795
Location: dank orb
MSDN is definitely in error here.

_________________
¯\(°_o)/¯ unlicense.org
Post 16 Feb 2019, 15:18
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 688
Location: Adelaide
From the MS Windows 10 SDK winuser.h
Code:
#if(WINVER >= 0x0602)
#define WS_EX_NOREDIRECTIONBITMAP 0x00200000L
#endif /* WINVER >= 0x0602 */
    

0x0602 is _WIN32_WINNT_WIN8
Post 16 Feb 2019, 20:50
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 497
Sadness.
Thanks all for help.
Post 17 Feb 2019, 09:47
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 222
Roman wrote:
Sadness.
Thanks all for help.

hey, you can always use a transparent bitmap to load (custom stuff and drawing), that would be nearly same effect.
just dont lose hope.

_________________
Asm For Wise Humans
Post 18 Feb 2019, 05:56
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.