Jack
Jack

Reputation: 16724

What's the proper place to call InitCommonControlsEx()?

I'm learning WINAPI, so I'm dealing with tab control, which requires to call InitCommonControlsEx() but where's the proper place to call it? when WM_CREATE message is received in the windows callback procedure? or before the main loop while(GetMessage(&msg, NULL, 0, 0)) or somewhere else? I've seen all those approches I mentioned being used, I'm not quite sure which one is correct.

Upvotes: 0

Views: 292

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 597941

The best place to call it is once at program startup, such as in WinMain(), before you start creating your UI Windows.

Upvotes: 1

Related Questions