Beginner Questions where everybody knows the answer :) 
Author Message
 Beginner Questions where everybody knows the answer :)

Hello to all... I have these two problems...

1. I can't declare constant below:-
        const double DX = 0.003;
    inside a header file, in public section of CDialog, saying ' illegal
pure syntax, must be '= 0' ' when compiled. What didi I do wrong?

2.    I know how to draw on the dialog, but how do I draw inside a picture
control on the dialog window? And also, can I set the drawing area to scale,
say -1 at the bottom up to 1 on top, as we can do in VB?

Thanks...

--

[ICQ# 54972548 ]

=========================



Tue, 26 Nov 2002 03:00:00 GMT  
 Beginner Questions where everybody knows the answer :)
Greets,

    This is a known issue with initializing (static) members in the class
declaration.  One needs to declare and initialize your variable as such:

class CMyClass {
public:
    static const double DX;

Quote:
};

const double CMyClass::DX=0.003;

Regards,

Joe


Quote:
> Hello to all... I have these two problems...

> 1. I can't declare constant below:-
>         const double DX = 0.003;
>     inside a header file, in public section of CDialog, saying ' illegal
> pure syntax, must be '= 0' ' when compiled. What didi I do wrong?

> 2.    I know how to draw on the dialog, but how do I draw inside a picture
> control on the dialog window? And also, can I set the drawing area to
scale,
> say -1 at the bottom up to 1 on top, as we can do in VB?

> Thanks...

> --

> [ICQ# 54972548 ]

> =========================



Tue, 26 Nov 2002 03:00:00 GMT  
 Beginner Questions where everybody knows the answer :)



Quote:
> Hello to all... I have these two problems...

> 1. I can't declare constant below:-
>         const double DX = 0.003;
>     inside a header file, in public section of CDialog, saying ' illegal
> pure syntax, must be '= 0' ' when compiled. What didi I do wrong?

I think you need to make it static.
Or declare it outside the class.

Quote:
> 2.    I know how to draw on the dialog, but how do I draw inside a picture
> control on the dialog window? And also, can I set the drawing area to
scale,
> say -1 at the bottom up to 1 on top, as we can do in VB?

> Thanks...

> --

> [ICQ# 54972548 ]

> =========================



Tue, 03 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. EventLog question (nobody knows the answer)

2. Simple question ( for those how knows the answer )

3. Easy ftp question (if you know the answer)

4. Beginner question: How can I know a DISPATCH_PROPERTYGET function also supports DISPATCH_PROPERTYPUT

5. Beginner need answer with EOF

6. Beginner please answer...

7. Trivial answer but very important to me from beginner of VCpp5

8. ADMI - which group will know the answer??

9. Do you know the answer?

10. Nobody knows the answer!

11. ADMI - which group will know the answer??

12. I know the answer is simple, but...

 

 
Powered by phpBB® Forum Software