EFanZh
EFanZh

Reputation: 2436

How to create a toolbar from resources?

I Created a toolbar resource (IDR_TOOLBAR) using resource editor, how can I add it to a window using basic Win32 APIs?

Upvotes: 0

Views: 2696

Answers (1)

Emilio Garavaglia
Emilio Garavaglia

Reputation: 20730

There is no "Toolbar resource" thing for WIN32 API.

Toolbar resources are artifacts for MFC classes like CToolbar and the like. It actually consist in a bitmap (contaning the stripe of the images, and having the same ID of the toolbar) and a RT_TOOLBAR (actually MAKEINTRESOURCE(241)) resource type that is a linear vector containing the commands to be mapped to the images. You can read it as such with FindResource / LoadResource.

Upvotes: 5

Related Questions