Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: can anyone convert this MFC code to WIN32 code please help PinPopular
Hans Dietrich20-Mar-11 3:14
mentorHans Dietrich20-Mar-11 3:14 
GeneralMessage Removed Pin
20-Mar-11 6:02
goldenrose920-Mar-11 6:02 
GeneralRe: can anyone convert this MFC code to WIN32 code please help PinPopular
Richard MacCutchan20-Mar-11 7:16
mveRichard MacCutchan20-Mar-11 7:16 
GeneralRe: can anyone convert this MFC code to WIN32 code please help Pin
tagopi21-Mar-11 0:29
tagopi21-Mar-11 0:29 
QuestionInstances of an object [modified] Pin
Cyclone_S19-Mar-11 14:01
Cyclone_S19-Mar-11 14:01 
AnswerRe: Instances of an object Pin
Luc Pattyn19-Mar-11 14:49
sitebuilderLuc Pattyn19-Mar-11 14:49 
GeneralRe: Instances of an object Pin
Cyclone_S19-Mar-11 15:58
Cyclone_S19-Mar-11 15:58 
AnswerRe: Instances of an object Pin
Luc Pattyn19-Mar-11 17:20
sitebuilderLuc Pattyn19-Mar-11 17:20 
Not really. This is how it would look in C#; C++/CLI allows similar stuff, I'm less fluent in it:
C#
// declare a list of missiles
List<Missile> missiles=new List<Missile>();   // a List is like an auto-dimensioning array!

// create missiles and load the list
for(int i=0; i<10; i++) {
    Missile m=new Missile();
    m.Location=new Point(100+33*i, 200*10*i);
    m.SetColor(Color.Yellow);
    missiles.Add(m);
}

// do something to those missiles, one by one, by enumerating them
foreach(Missile m in missiles) {
    if (m.IsHit()) m.SetColor(Color.Green);
}


which illustrates you don't need individual variables for collectible items at all.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

GeneralRe: Instances of an object Pin
Cyclone_S21-Mar-11 15:36
Cyclone_S21-Mar-11 15:36 
Questionhow to remove the extra border of a button after enabling xp visual style Pin
goldenrose918-Mar-11 17:38
goldenrose918-Mar-11 17:38 
AnswerRe: how to remove the extra border of a button after enabling xp visual style Pin
Hans Dietrich19-Mar-11 2:32
mentorHans Dietrich19-Mar-11 2:32 
QuestionRe: how to remove the extra border of a button after enabling xp visual style Pin
goldenrose919-Mar-11 8:02
goldenrose919-Mar-11 8:02 
QuestionAccess violation reading location 0x00378004. Pin
so0_lanhlung218-Mar-11 17:06
so0_lanhlung218-Mar-11 17:06 
QuestionRe: Access violation reading location 0x00378004. Pin
CPallini18-Mar-11 23:37
mveCPallini18-Mar-11 23:37 
AnswerRe: Access violation reading location 0x00378004. Pin
so0_lanhlung219-Mar-11 3:31
so0_lanhlung219-Mar-11 3:31 
QuestionRe: Access violation reading location 0x00378004. Pin
Code-o-mat18-Mar-11 23:59
Code-o-mat18-Mar-11 23:59 
AnswerRe: Access violation reading location 0x00378004. Pin
so0_lanhlung219-Mar-11 3:23
so0_lanhlung219-Mar-11 3:23 
GeneralRe: Access violation reading location 0x00378004. Pin
Richard MacCutchan19-Mar-11 3:59
mveRichard MacCutchan19-Mar-11 3:59 
GeneralRe: Access violation reading location 0x00378004. Pin
Code-o-mat19-Mar-11 4:01
Code-o-mat19-Mar-11 4:01 
GeneralRe: Access violation reading location 0x00378004. Pin
so0_lanhlung219-Mar-11 6:22
so0_lanhlung219-Mar-11 6:22 
QuestionRe: Access violation reading location 0x00378004. Pin
CPallini19-Mar-11 4:41
mveCPallini19-Mar-11 4:41 
QuestionMy computer is possessed Pin
Kaaib18-Mar-11 11:30
Kaaib18-Mar-11 11:30 
AnswerRe: My computer is possessed Pin
వేంకటనారాయణ(venkatmakam)18-Mar-11 20:24
వేంకటనారాయణ(venkatmakam)18-Mar-11 20:24 
GeneralRe: My computer is possessed Pin
Kaaib18-Mar-11 21:47
Kaaib18-Mar-11 21:47 
GeneralRe: My computer is possessed Pin
Richard MacCutchan18-Mar-11 23:45
mveRichard MacCutchan18-Mar-11 23:45 

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.