flat assembler
Message board for the users of flat assembler.

Index > Windows > Windows 7 not create window WS_EX_NOREDIRECTIONBITMAP

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1701
Roman 15 Feb 2019, 08:10
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: 3944
Location: vpcmipstrm
bitRAKE 15 Feb 2019, 16:58
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)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
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: 1701
Roman 16 Feb 2019, 06:38
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: 1701
Roman 16 Feb 2019, 09:02
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: 3944
Location: vpcmipstrm
bitRAKE 16 Feb 2019, 15:18
MSDN is definitely in error here.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
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: 789
Location: Adelaide
sinsi 16 Feb 2019, 20:50
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: 1701
Roman 17 Feb 2019, 09:47
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: 647
Ali.Z 18 Feb 2019, 05:56
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.