Reputation: 438
Until now I have done console programming with C++ so I'm new to window programming and, it may sound like a stupid question but how do I use multiple window styles or extended window styles in a C++ Win32 App.? Let's say i want to use WS_EX_CONTEXTHELP, WS_EX_LEFTSCROLLBAR and WS_HSCROLL all in the same window.
Sorry if I haven't made myself clear or bad grammar.
Upvotes: 0
Views: 923
Reputation: 51395
If you want to use extended window styles you need to call CreateWindowEx
(vs. CreateWindow
). Window styles - like all other flags - can be combined using the Bitwise Inclusive OR Operator: |
HWND hWnd = CreateWindowEx(WS_EX_CONTEXTHELP | WS_EX_LEFTSCROLLBAR,
...,
WS_HSCROLL,
...);
Upvotes: 1
Reputation: 13984
This flags can be combined by using the binary-or operator like this (if that is what you mean):
WS_EX_TOPMOST | WS_EX_LEFTSCROLLBAR
etc.
Upvotes: 4