• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

How to use a resource?

Hi... I have a Tab control resource which I can use it in my program.... suppose the ID of the control is IDC_OPTIONS. I have seen the help for TabCtrl and nothing gives me a hint on how I can do that. The constructor is called with no parameters, and the Create( ) method works only if I pass the RECT structure as a parameter, but if the resource is already created with that ID number, how can I do that?

Thanks in advance
1 Solution
If the control is already created, use CWnd::GetDlgItem  to get the pointer.

CTabCtrl *pt = (CTabCtrl *)this->GetDlgItem(IDC_OPTIONS);

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now