Reputation: 16091
As far is I learned a HANDLE is just a number referring to some kind of "sytem ressource table". Is this handle const correct? I guess not because it is just used to access a table like an index on an array. An example with bitmaps: Can I change the content of a bitmap althought the HBITMAP is declared const?
Upvotes: 1
Views: 1289
Reputation: 9007
HANDLE is (AFAIR) a typedef of int so const HBITMAP is the same as const int.
In this sense you can change the contents of the bitmap even if handle to the bitmap is const because const refers to the handle not the actual bitmap (think of it as a const pointer to a variable class.)
BUT:
Your question is moot anyway because:
I place "object" in quotes because Handles refer to conceptual objects (software representations of concepts) not actual C++ objects, again because Win32 is a C API.
Upvotes: 3