Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 673
yussuf Avatar asked Jan 11 '12 09:01

yussuf


1 Answers

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 image 147
Cody Gray Avatar answered Oct 06 '22 01:10

Cody Gray