According to Microsoft's docs, the way to set custom Window data is to pass it through the lpParam argument of CreateWindowEx, retrieve it within the window procedure on WM_CREATE, and then set it using SetWindowLongPtr. I was wondering why you'd do that, instead of just setting it after calling CreateWindowEx, when you already have the window handle. Thanks for any guidance, and sorry if this is a basic question.
Advantage of setting window data on WM_CREATE
447 Views Asked by AudioBubble At
0
There are 0 best solutions below
Related Questions in WINAPI
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Changing the theme of a #32768 (menu) window class at runtime
- Issue with GetOpenFileName while debugging
- How to populate a ListBox with SendMessage?
- Is there a function to end a child process?
- HDR video publishing
- Frameless Qt + WinAPI maximized window size is bigger than the availableGeometry()
- Mount .iso file with python
- What is Win32 x86-64 CONTEXT::VectorRegister for?
- WinAPI - right mouse drag & drop and IContextMenu
- Win32 per-filesystem cache tuning?
- Client connection timeout during Android & Windows PC communication via sockets
- MessageBoxEx sometimes shows as hollow window, border only, and only on Windows 11
- Win32api send message and Pydirectinput and Powertoy (Keyboard Manager ) Not working when open the application
- Would it be possible to run an application right after csrss.exe loads? (Windows)
Related Questions in HWND
- Get toast notification dimensions (size, rect)
- Cannot Draw Bitmap to Window
- WPF: How to merge windows across processes
- get Window Name / PID / hwnd of android emulator with ppadb
- Rust Windows Crate CreateWindowExW
- Getting a WindowId from a window handle (HWND) without Windows App SDK
- Child Window closes application when close button is clicked
- WinUI 3: WinRT.Interop.WindowNative.GetWindowHandle(this) crashes application
- Unable to figure out problem with BitBlt in win32
- Why does the window handle not get stored properly?
- How to init glad without the glfw loader (using windows headers)
- HGLRC OpenGL rendering context - How to indicate the version of the OpenGL
- C# FindWindowsEx unable to get child handle
- Right way to implement SourceInitialized in wpf
- How to get the hWnd of a floating window of an application
Related Questions in CREATEWINDOWEX
- I want to receive messages on a thread other than the ui thread
- Win32 Window Creation - No Edge Cursors, or cursor hit along edges appears to extremely small
- window fails to initiate when specifying a custom class name registered with RegisterClass to CreateWindowEx but only the second time I do it
- Project Project1.exe raised exception class ERangeError with message 'Range check error'
- How to create a window that behaves like taskbar?
- Struggling with the CreatWindow function
- 'BeginDraw' in conjunction with D2D1 causes an error
- Creating static control with WS_EX_COMPOSITED fails
- Win32 API - HWND "{unused = ???} Unable to read memory" error
- Advantage of setting window data on WM_CREATE
- CreateWindowEx creates old (Windows 7) style border on Windows 10
- Button creation invalidating Direct2dFactory pointers Windows C++
- Windows Script Host terminates when closing the created window
- Drawing with SlimDX on window created by CreateWindowEX
- Show taskbar button when using WS_EX_TOOLWINDOW
Related Questions in SETWINDOWLONG
- How to hide close button and disable resizing in WPF window?
- Question about SetParent API, it doesn't work on Windows 11
- C# Unable to remove scroll bars on external RDP process using SetWindowLong
- How can I manage windows of applications opened using Win32 API (Notepad, Word, Outlook, Chrome etc.)
- Advantage of setting window data on WM_CREATE
- Problem to get Scrollbars after a SetParent
- SetWindowLong Clickable Form Elements
- LuaRef Call crash in WNDPROC CALLBACK
- Transparent Form with Visible Clickable Controls in it
- VB6 SetWindowLong Causing Refresh Issue in Windows 7 64-bit
- winapi: removing decoration
- How can I simplify code that modifies Window Styles using SetWindowLong & GetWindowLong?
- How do I call SetWindowLong() in the 64-bit versions of Windows?
- Detect / Hook Window Move/Drag of other external processes
- SetWindowLong & SetLayeredWindowAttributes doesnt work on different user C#
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?