What is difference between CreateWindow() and CreateWindowEx()?

Started by
5 comments, last by kaktusas2598 13 years, 11 months ago
What's the difference and which function to use?

Deltron Zero and Automator.

Advertisement
CreateWindow versus CreateWindowEx at MSDN. Learning to read documentation and conduct research is a critical component of becoming a programmer.

It is generally a safe bet that if you do not need, or understand, the purpose of the extra or different parameters provided by an "Ex" function in the Win32 API, you don't need to be calling the "Ex" function and the regular one will suffice.
CreateWindow is older. You should use CreateWindowEx but it doesn't really matter. The main difference is you can't set a window's "extended style" with CreateWindow.
As someone pointed out to me a while back, CreateWindow nowadays is even just a macro that maps to CreateWindowEx(0, .....), so CreateWindow as a function doesn't really even exist anymore.

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

Thanks for help, next time I wont be such stupid and will google more...

Deltron Zero and Automator.

Generally google isn't the first choice for questions about Win32 API's. Go directly to MSDN. jpetrie's first link has this right at the top:

Quote:To use extended window styles in addition to the styles supported by CreateWindow, use the CreateWindowEx function.
-Mike
Quote:Original post by Anon Mike
Generally google isn't the first choice for questions about Win32 API's. Go directly to MSDN. jpetrie's first link has this right at the top:

Quote:To use extended window styles in addition to the styles supported by CreateWindow, use the CreateWindowEx function.


Thanks, I already added MSDN to favorites so I shouldn't forget it :)

Deltron Zero and Automator.

This topic is closed to new replies.

Advertisement