It does not work.
Casting to HDC gives me an undifined value.
In this project i had some other weird problems like a stack overflow when a
specific constructor was invoked. I'm almost sure it is a problem with the
default directives for the .net compliance.
manuel
"ismailp" <pa*******@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
See below:
HWND hwnd = (HWND)textBox1->Handle.ToPointer();
HDC hdc = GetDC(hwnd);
IntPtr dc = hdc;
HDC hdc_ = (HDC)dc.ToPointer();
ReleaseDC(hwnd, hdc_);
XXXPtr value types have a "ToPointer()" method, which give you a
"void*". You can convert void* to HWND, or HDC, which are actually
void*.
Ismail