Click here to Skip to main content
15,920,217 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: How can i intercept Escape button in dialog form? Pin
Mike Dimmick15-Oct-07 4:14
Mike Dimmick15-Oct-07 4:14 
AnswerRe: How can i intercept Escape button in dialog form? Pin
wolfgangpuelm15-Oct-07 4:39
professionalwolfgangpuelm15-Oct-07 4:39 
Questioncreating new shell for windows Pin
sresth14-Oct-07 17:52
sresth14-Oct-07 17:52 
AnswerRe: creating new shell for windows Pin
Pete O'Hanlon15-Oct-07 1:13
mvePete O'Hanlon15-Oct-07 1:13 
AnswerRe: creating new shell for windows Pin
TyrionTheImp15-Oct-07 21:00
TyrionTheImp15-Oct-07 21:00 
QuestionHow to highlight an item in the ListBox control Pin
Mike Borozdin14-Oct-07 5:19
Mike Borozdin14-Oct-07 5:19 
AnswerRe: How to highlight an item in the ListBox control Pin
Mike Borozdin14-Oct-07 7:20
Mike Borozdin14-Oct-07 7:20 
QuestionHow to get HWND from System::Windows::Forms::Panel^ panel [modified] Pin
Newbie0014-Oct-07 0:05
Newbie0014-Oct-07 0:05 
Hi
VC++ 2005 EE

I'm writing an app 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) <br />

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:52 Sunday 14th October, 2007
QuestionText in label is mangled Pin
sudhirkamath9-Oct-07 9:40
sudhirkamath9-Oct-07 9:40 
AnswerRe: Text in label is mangled Pin
Paul Conrad27-Oct-07 13:37
professionalPaul Conrad27-Oct-07 13:37 
QuestionBackup Database Using Threads Pin
jikubhai9-Oct-07 4:25
jikubhai9-Oct-07 4:25 
AnswerRe: Backup Database Using Threads Pin
Koltz11-Oct-07 20:57
Koltz11-Oct-07 20:57 
QuestionLock Menus/Toolbars on Window Scroll Pin
Elizma9-Oct-07 0:57
Elizma9-Oct-07 0:57 
AnswerRe: Lock Menus/Toolbars on Window Scroll Pin
Dave Kreskowiak9-Oct-07 6:41
mveDave Kreskowiak9-Oct-07 6:41 
QuestionAppBars & the ShowDesktop command Pin
TyrionTheImp8-Oct-07 19:33
TyrionTheImp8-Oct-07 19:33 
QuestionPass handle to form Pin
mjanssen6-Oct-07 9:02
mjanssen6-Oct-07 9:02 
AnswerRe: Pass handle to form Pin
Kristian Sixhøj6-Oct-07 9:13
Kristian Sixhøj6-Oct-07 9:13 
GeneralRe: Pass handle to form Pin
mjanssen6-Oct-07 9:34
mjanssen6-Oct-07 9:34 
GeneralRe: Pass handle to form Pin
Eduard Keilholz8-Oct-07 2:23
Eduard Keilholz8-Oct-07 2:23 
QuestionHelp needed with Exceptions! Pin
alesh_nitre5-Oct-07 2:35
alesh_nitre5-Oct-07 2:35 
AnswerRe: Help needed with Exceptions! Pin
Scott Dorman5-Oct-07 12:06
professionalScott Dorman5-Oct-07 12:06 
GeneralRe: Help needed with Exceptions! Pin
alesh_nitre7-Oct-07 20:25
alesh_nitre7-Oct-07 20:25 
GeneralRe: Help needed with Exceptions! Pin
Scott Dorman8-Oct-07 3:52
professionalScott Dorman8-Oct-07 3:52 
GeneralRe: Help needed with Exceptions! Pin
alesh_nitre8-Oct-07 5:16
alesh_nitre8-Oct-07 5:16 
GeneralRe: Help needed with Exceptions! Pin
Scott Dorman8-Oct-07 5:34
professionalScott Dorman8-Oct-07 5:34 

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.