https://stackoverflow.com/questions/379 ... rce-h-fileIt's used when you don't need to assign a specific ID to a control because you don't ever want to refer to it programmatically; most often, a static label that never changes and the user doesn't interact with.
There is no STATIC TEXT control. There is a STATIC control which can display text or images. As Jonathan says, when you don't need to interact with the control at runtime, don't need to receive notifications, the ID is not important. Hence the convention is that -1 is assigned to any controls where runtime interaction is not needed.
It is declared in WinRes.h. A pretty obscure SDK header file, just about nobody thinks of #including it. So, roughly, to reduce the number of support calls they had the resource editor generate it if it isn't defined yet.
Nobody includes winres.h because it isn't strictly part of the Windows SDK. First line reads: "// This is a part of the Microsoft Foundation Classes C++ library." It ships as part of the Windows SDK to reduce the number of support calls. Neither including it nor defining a preprocessor symbol called IDC_STATIC are mandatory (while the latter is at least useful).
Cada controle Windows recebe um número, pra tratamento pelo programa.
Se não interessa tratar, é onde entra o IDC_STATIC, e o -1 seria algo como "sem número".
Como exemplo citam o texto (label), onde apenas mostra e não tem clique e nem nada de especial pra ser controlado.
