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

Managed C++/CLI

 
QuestionDark GDK Pin
Manfr3d23-Jun-08 2:48
Manfr3d23-Jun-08 2:48 
AnswerRe: Dark GDK Pin
led mike23-Jun-08 4:57
led mike23-Jun-08 4:57 
GeneralRe: Dark GDK Pin
Manfr3d23-Jun-08 5:07
Manfr3d23-Jun-08 5:07 
GeneralRe: Dark GDK Pin
led mike23-Jun-08 5:56
led mike23-Jun-08 5:56 
QuestionI couldn,t able to select Pin
rose19621-Jun-08 1:51
rose19621-Jun-08 1:51 
AnswerRe: I couldn,t able to select Pin
Mark Salsbery24-Jun-08 6:16
Mark Salsbery24-Jun-08 6:16 
QuestionDataGridView in a GroupBox Pin
Oddball19-Jun-08 7:42
Oddball19-Jun-08 7:42 
QuestionCan you suspend the OnPaint function? Pin
BuckBrown18-Jun-08 7:37
BuckBrown18-Jun-08 7:37 
Hi, I'm using Visual Studio 2005 C++/CLI. I have a Paint() function in my Form1 that has code to paint the screen in a block nested in an if statement.

System::Void Form1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e)
{
if(myObject)
{
code to display screen
}
}

This works fine when the constructor for myObject is called and an OpenFileDialog is used to read a file that can finish building the object. Since the Paint() function is called continuously, the code to display the screen is not executed when myObject is undefined, but when myObject is finished being instantiated then the display code executes. My problem is when I select "Cancel" in the OpenFileDialog I can stop building the myObject but the constructor completes (thus becoming NOT undefined) and the code to display the screen executes and tries to paint a bunch of undefined stuff and bombs the app. I've tried using a variable myObject->bValid in the above if statement but then the app bombs because the object reference was not set to an instance of an object. Is there a way to suspend the Paint() function so that I can do all of my preliminary stuff and then say "okay, start painting."?

Thanks
Buck
AnswerRe: Can you suspend the OnPaint function? Pin
Christian Graus23-Jun-08 12:01
protectorChristian Graus23-Jun-08 12:01 
AnswerRe: Can you suspend the OnPaint function? Pin
Luc Pattyn23-Jun-08 14:39
sitebuilderLuc Pattyn23-Jun-08 14:39 
GeneralRe: Can you suspend the OnPaint function? Pin
BuckBrown25-Jun-08 12:14
BuckBrown25-Jun-08 12:14 
QuestionCan you use Forms Designer to index controls? Pin
BuckBrown17-Jun-08 10:54
BuckBrown17-Jun-08 10:54 
AnswerRe: Can you use Forms Designer to index controls? [modified] Pin
Mark Salsbery17-Jun-08 11:38
Mark Salsbery17-Jun-08 11:38 
GeneralRe: Can you use Forms Designer to index controls? Pin
led mike19-Jun-08 6:11
led mike19-Jun-08 6:11 
GeneralRe: Can you use Forms Designer to index controls? Pin
Mark Salsbery19-Jun-08 6:18
Mark Salsbery19-Jun-08 6:18 
GeneralRe: Can you use Forms Designer to index controls? Pin
led mike19-Jun-08 6:23
led mike19-Jun-08 6:23 
GeneralRe: Can you use Forms Designer to index controls? Pin
Mark Salsbery19-Jun-08 6:27
Mark Salsbery19-Jun-08 6:27 
AnswerRe: Can you use Forms Designer to index controls? Pin
led mike18-Jun-08 5:07
led mike18-Jun-08 5:07 
QuestionAdding Files to an empty project w/ Visual Studio 2008 Pin
...---...13-Jun-08 5:05
...---...13-Jun-08 5:05 
AnswerRe: Adding Files to an empty project w/ Visual Studio 2008 Pin
led mike13-Jun-08 5:17
led mike13-Jun-08 5:17 
QuestionTo load CrystallReport report with pameters Pin
mikobi12-Jun-08 1:17
mikobi12-Jun-08 1:17 
AnswerRe: To load CrystallReport report with pameters Pin
leonigah13-Jun-08 0:14
leonigah13-Jun-08 0:14 
Questionwhat is managed c++? Pin
bulg10-Jun-08 12:21
bulg10-Jun-08 12:21 
AnswerRe: what is managed c++? Pin
Christian Graus10-Jun-08 12:39
protectorChristian Graus10-Jun-08 12:39 
GeneralRe: what is managed c++? Pin
led mike11-Jun-08 4:22
led mike11-Jun-08 4:22 

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.