Click here to Skip to main content
15,919,931 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
Mark Salsbery16-Oct-07 9:26
Mark Salsbery16-Oct-07 9:26 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
BuckBrown16-Oct-07 10:11
BuckBrown16-Oct-07 10:11 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
Mark Salsbery16-Oct-07 10:29
Mark Salsbery16-Oct-07 10:29 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
BuckBrown16-Oct-07 11:12
BuckBrown16-Oct-07 11:12 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
Mark Salsbery16-Oct-07 11:27
Mark Salsbery16-Oct-07 11:27 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
BuckBrown16-Oct-07 11:30
BuckBrown16-Oct-07 11:30 
GeneralRe: StreamReader, StreamWriter and File Position? Pin
Mark Salsbery16-Oct-07 11:51
Mark Salsbery16-Oct-07 11:51 
QuestionHow to get HWND from System::Windows::Forms::Panel^ panel [modified] Pin
Newbie0014-Oct-07 0:35
Newbie0014-Oct-07 0:35 
Hi, i'm not sure if i've chosen correct place for my post, but

I'm writing an app in VC++ 2005 EE which is going to display some 3D figures on System::Windows::Forms::Panel^ panel

The problem:

I've written my own class which handles all OpenGL stuff. So all I have to do is:
Create new 3D figure object, and draw it with panel's Paint method.
Constructor needs panel's HWND, so i did something like this:

TFigure *Figure; //pointer to my base class objects<br />
Figure = new TCuboid( (HWND)panel->Handle.ToPointer() , panel->Width, panel->Height, 3, 3, 7 );

But this solution doesn't work properly. When i'm trying to initialize OpenGl machine
with this code (inside TCuboid construcor):
m_gHDC = GetDC( hwnd ); //identifier (window HWND) <br />
SetupPixelFormat();<br />
m_hRC = wglCreateContext( m_gHDC ); //identifier (OpenGL graphic context)


the variable: m_hRC is NULL and it shouldn't be.
I've tried my class code with other IDE and all was fine. So i think the problem is with getting panel's HWND.

Can somebody help me please?



-- modified at 9:53 Sunday 14th October, 2007
AnswerRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery14-Oct-07 5:53
Mark Salsbery14-Oct-07 5:53 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Newbie0014-Oct-07 7:02
Newbie0014-Oct-07 7:02 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery14-Oct-07 7:19
Mark Salsbery14-Oct-07 7:19 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Newbie0014-Oct-07 7:29
Newbie0014-Oct-07 7:29 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery14-Oct-07 8:00
Mark Salsbery14-Oct-07 8:00 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Newbie0014-Oct-07 8:02
Newbie0014-Oct-07 8:02 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery14-Oct-07 8:22
Mark Salsbery14-Oct-07 8:22 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Newbie0014-Oct-07 10:04
Newbie0014-Oct-07 10:04 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery14-Oct-07 10:24
Mark Salsbery14-Oct-07 10:24 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Newbie0014-Oct-07 10:32
Newbie0014-Oct-07 10:32 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery14-Oct-07 11:02
Mark Salsbery14-Oct-07 11:02 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
led mike15-Oct-07 4:36
led mike15-Oct-07 4:36 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel Pin
Mark Salsbery15-Oct-07 5:54
Mark Salsbery15-Oct-07 5:54 
GeneralRe: How to get HWND from System::Windows::Forms::Panel^ panel [modified] Pin
Newbie0015-Oct-07 7:00
Newbie0015-Oct-07 7:00 
QuestionSTL map = Hashtable, what about STL multimap? Pin
devvvy13-Oct-07 16:44
devvvy13-Oct-07 16:44 
AnswerRe: STL map = Hashtable, what about STL multimap? Pin
Christian Graus13-Oct-07 17:15
protectorChristian Graus13-Oct-07 17:15 
GeneralRe: STL map = Hashtable, what about STL multimap? Pin
devvvy13-Oct-07 17:18
devvvy13-Oct-07 17:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.