user852830
user852830

Reputation:

Making a "panel" in WINapi

I need to make a Panel (borderless Window?) with WinAPI for wxWidgets since I need one with CS_OWNDC to always have the same DC.

What styles should I use?

I do not program winapi very often, so I beg you to help me out :-).

Upvotes: 3

Views: 6175

Answers (1)

CoreyStup
CoreyStup

Reputation: 1488

CreateWindow() / CreateWindowEx() with WS_CHILD would create a borderless/menubarless window (aka panel).

You'll have to register a custom window class (RegisterClass()) for your custom window panel if you want an alternate class style than one that is already provided by the common controls ("static" for instance).

Are you sure you want to use the CS_OWNDC class style? See the class styles to make sure you're not thinking of CS_CLASSDC.

Upvotes: 7

Related Questions