yussuf
yussuf

Reputation: 635

What does the acronym IDC mean?

Does anybody know the meaning of the acronym IDC as it is used when programming windows?

e.g. in the context of a CDialog application:

void CMyDialog::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_STATIC_FRAME, m_StaticFrame);
}

Is it generally the ID of a not further specified Control (ID Control), as a Dialog would have the prefix IDD (ID Dialog)?

Upvotes: 16

Views: 13059

Answers (2)

Cody Gray
Cody Gray

Reputation: 244981

Is it generally the ID of a not further specified Control (ID Control), as a Dialog would have the prefix IDD (ID Dialog)?

Yes, that's precisely correct.

By convention, Win32 resource scripts use special prefixes to identify the type of an identifier.
A partial list looks something like this:

  • IDA = An accelerator table resource
  • IDB = A bitmap resource
  • IDC = A command identifier
  • IDD = A dialog box resource
  • IDI = An icon resource
  • IDM = A menu command identifier
  • IDR = Multiple resource types, perhaps those common to an entire application or window
  • IDS = A string resource
  • ID = An unknown or custom resource

Sometimes, you'll see IDC used for cursors, rather than command identifiers. It's hard to say without looking at the usage whether that's the case.

But note that using these is completely optional. It doesn't mean anything to the compiler or the computer, it's only designed to remind the programmer of what the identifier refers to.

Upvotes: 32

Kristofer
Kristofer

Reputation: 3279

"Like every Windows control, a button is recognized by its IDentifier. Because a button is a control, by convention, its identifier's name starts with IDC (the C stands for Control)." - http://www.functionx.com/visualc/controls/button.htm

Upvotes: 3

Related Questions