简体   繁体   中英

What does the acronym IDC mean?

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

eg 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)?

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.

"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

IDentifier Control

List of Technology Acronyms

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM