Click here to Skip to main content
15,896,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Saving DC Bitmap Pin
Hans Dietrich11-May-07 3:32
mentorHans Dietrich11-May-07 3:32 
Questionsimple error with printing Pin
ldsdbomber11-May-07 2:47
ldsdbomber11-May-07 2:47 
AnswerRe: simple error with printing Pin
David Crow11-May-07 2:57
David Crow11-May-07 2:57 
GeneralRe: simple error with printing Pin
ldsdbomber11-May-07 3:11
ldsdbomber11-May-07 3:11 
GeneralRe: simple error with printing Pin
Hans Dietrich11-May-07 3:19
mentorHans Dietrich11-May-07 3:19 
GeneralRe: simple error with printing Pin
ldsdbomber11-May-07 3:24
ldsdbomber11-May-07 3:24 
GeneralRe: simple error with printing Pin
Hans Dietrich11-May-07 3:28
mentorHans Dietrich11-May-07 3:28 
GeneralRe: simple error with printing Pin
David Crow11-May-07 3:40
David Crow11-May-07 3:40 
ldsdbomber wrote:
If I take out the "this" and construct without parameters then the next line unit.Print(); does not work
error C2228: left of '.Print' must have class/struct/union type


Then you've got something else wrong, or have made a change elsewhere that you've not shown. The MyPrintUnit object can be constructed with no arguments.

I put the following in an existing project and it compiled fine:

#include "gfx_printunit.h"
 
class MyPrintUnit : public GPrintUnit
{
    public:
    MyPrintUnit() {;}
    virtual ~MyPrintUnit() {;}
 
    virtual void DefineColHeadings(){}
    virtual void CreatePrintFonts(){}
    void InitPrintMetrics() {}
    virtual BOOL Print(){return 1;}
 
    CFont m_fontHeading;
    CFont m_fontBody;
    CFont m_fontHeader;
    CFont m_fontFooter;
};
...
MyPrintUnit unit;
unit.Print();



"A good athlete is the result of a good and worthy opponent." - David Crow

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


QuestionHow can I stop the program that run by DLL. Pin
Max++11-May-07 2:31
Max++11-May-07 2:31 
AnswerRe: How can I stop the program that run by DLL. Pin
Christian Graus11-May-07 2:45
protectorChristian Graus11-May-07 2:45 
GeneralRe: How can I stop the program that run by DLL. Pin
Max++11-May-07 3:16
Max++11-May-07 3:16 
GeneralRe: How can I stop the program that run by DLL. Pin
prasad_som11-May-07 4:02
prasad_som11-May-07 4:02 
QuestionException handling in Constructor Pin
ragavan11-May-07 1:55
ragavan11-May-07 1:55 
AnswerRe: Exception handling in Constructor Pin
CPallini11-May-07 2:02
mveCPallini11-May-07 2:02 
AnswerRe: Exception handling in Constructor Pin
shiraztk11-May-07 2:35
shiraztk11-May-07 2:35 
AnswerRe: Exception handling in Constructor Pin
#realJSOP11-May-07 2:47
professional#realJSOP11-May-07 2:47 
AnswerRe: Exception handling in Constructor Pin
Nemanja Trifunovic11-May-07 4:33
Nemanja Trifunovic11-May-07 4:33 
QuestionUser name/Password authentication Pin
TariqZ11-May-07 1:46
TariqZ11-May-07 1:46 
AnswerRe: User name/Password authentication Pin
Christian Graus11-May-07 1:53
protectorChristian Graus11-May-07 1:53 
GeneralRe: User name/Password authentication Pin
Nelek13-May-07 20:16
protectorNelek13-May-07 20:16 
AnswerRe: User name/Password authentication Pin
CPallini11-May-07 1:59
mveCPallini11-May-07 1:59 
Questionplz send the program Pin
gnanabhaskar11-May-07 1:43
gnanabhaskar11-May-07 1:43 
AnswerRe: plz send the program Pin
Dominik Reichl11-May-07 1:50
Dominik Reichl11-May-07 1:50 
AnswerRe: plz send the program Pin
Christian Graus11-May-07 1:51
protectorChristian Graus11-May-07 1:51 
AnswerRe: plz send the program Pin
ThatsAlok17-May-07 5:00
ThatsAlok17-May-07 5:00 

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.