Click here to Skip to main content
15,919,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Simple C++ Error... Please Help Pin
Dr Dan22-Jan-06 10:02
Dr Dan22-Jan-06 10:02 
QuestionDatabase connection in .NET Pin
Jordan C. Atlas20-Jan-06 15:41
Jordan C. Atlas20-Jan-06 15:41 
AnswerRe: Database connection in .NET Pin
Ed K21-Jan-06 13:01
Ed K21-Jan-06 13:01 
GeneralRe: Database connection in .NET Pin
Jordan C. Atlas21-Jan-06 13:36
Jordan C. Atlas21-Jan-06 13:36 
QuestionHow to use code coverage in VC 2005? Pin
Azbok20-Jan-06 15:25
Azbok20-Jan-06 15:25 
QuestionNewbie question - data storage Pin
ruzu20-Jan-06 14:57
ruzu20-Jan-06 14:57 
AnswerRe: Newbie question - data storage Pin
Stephen Hewitt20-Jan-06 15:07
Stephen Hewitt20-Jan-06 15:07 
GeneralRe: Newbie question - data storage Pin
ruzu21-Jan-06 3:13
ruzu21-Jan-06 3:13 
I have a plain Form class in which I have a function "timer1_Tick" which is executed on each tick event. In this function I use this line in order to call up a panel1_Paint function, which is also part of the Form class:
[code]
panel1->Paint += gcnew System::Windows::Forms::PaintEventHandler( this, &Form1::panel1_Paint );[/code]

And that's it. I just need a place where to initialize data. Obviously I can't initialize the data inside my timer1_Tick or inside the panel1_Paint function because it'd be initialized again and again.

I tried initializing some values in the constructor Form1():
[code]
int a;
Bitmap^ bitmap;
Form1() {
InitializeComponent();
int a = 20;
Bitmap^ bitmap = gcnew Bitmap("test.gif");
}
[/code]
But when I try to use them in my panel1_Paint function further down I see that they, while they have been initialized, they have not been assigned values yet. This is a variable scope problem I guess.
AnswerRe: Newbie question - data storage Pin
Lilith.C21-Jan-06 4:19
Lilith.C21-Jan-06 4:19 
GeneralRe: Newbie question - data storage Pin
ruzu21-Jan-06 5:21
ruzu21-Jan-06 5:21 
GeneralRe: Newbie question - data storage Pin
Stephen Hewitt21-Jan-06 17:36
Stephen Hewitt21-Jan-06 17:36 
QuestionRe: Newbie question - data storage Pin
Lilith.C20-Jan-06 16:59
Lilith.C20-Jan-06 16:59 
AnswerRe: Newbie question - data storage Pin
Stephen Hewitt20-Jan-06 19:32
Stephen Hewitt20-Jan-06 19:32 
QuestionDetermine if running during logon process. Pin
ShawnTassie20-Jan-06 7:51
ShawnTassie20-Jan-06 7:51 
AnswerRe: Determine if running during logon process. Pin
Toby Opferman20-Jan-06 8:02
Toby Opferman20-Jan-06 8:02 
GeneralRe: Determine if running during logon process. Pin
ShawnTassie20-Jan-06 8:12
ShawnTassie20-Jan-06 8:12 
AnswerRe: Determine if running during logon process. Pin
Rama Krishna Vavilala20-Jan-06 8:54
Rama Krishna Vavilala20-Jan-06 8:54 
GeneralRe: Determine if running during logon process. Pin
ShawnTassie20-Jan-06 9:30
ShawnTassie20-Jan-06 9:30 
GeneralRe: Determine if running during logon process. Pin
Rama Krishna Vavilala20-Jan-06 9:46
Rama Krishna Vavilala20-Jan-06 9:46 
GeneralRe: Determine if running during logon process. Pin
Toby Opferman20-Jan-06 9:41
Toby Opferman20-Jan-06 9:41 
GeneralRe: Determine if running during logon process. Pin
Rama Krishna Vavilala20-Jan-06 9:50
Rama Krishna Vavilala20-Jan-06 9:50 
GeneralRe: Determine if running during logon process. Pin
ShawnTassie20-Jan-06 9:52
ShawnTassie20-Jan-06 9:52 
GeneralRe: Determine if running during logon process. Pin
Toby Opferman20-Jan-06 10:24
Toby Opferman20-Jan-06 10:24 
GeneralRe: Determine if running during logon process. Pin
ShawnTassie20-Jan-06 15:01
ShawnTassie20-Jan-06 15:01 
GeneralRe: Determine if running during logon process. Pin
Toby Opferman20-Jan-06 19:11
Toby Opferman20-Jan-06 19:11 

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.