Click here to Skip to main content
15,912,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSetRedraw(FALSE) Pin
baerten26-Jan-07 0:09
baerten26-Jan-07 0:09 
AnswerRe: SetRedraw(FALSE) Pin
#realJSOP26-Jan-07 0:14
professional#realJSOP26-Jan-07 0:14 
GeneralRe: SetRedraw(FALSE) Pin
baerten26-Jan-07 0:41
baerten26-Jan-07 0:41 
GeneralRe: SetRedraw(FALSE) Pin
#realJSOP26-Jan-07 2:46
professional#realJSOP26-Jan-07 2:46 
AnswerRe: SetRedraw(FALSE) Pin
Rage26-Jan-07 0:25
professionalRage26-Jan-07 0:25 
GeneralRe: SetRedraw(FALSE) Pin
baerten26-Jan-07 0:47
baerten26-Jan-07 0:47 
AnswerRe: SetRedraw(FALSE) Pin
Jason Henderson26-Jan-07 5:47
Jason Henderson26-Jan-07 5:47 
QuestionGeneric exception classes ? Pin
Mr.Brainley26-Jan-07 0:02
Mr.Brainley26-Jan-07 0:02 
I have a project in wich a want to map many Win32 API Errors to exception classes derived from std::runtime_error. All of these follow one pattern :

class RegCreateKeyExException  : public std::runtime_error
{
public:
	RegCreateKeyExException(const std::string& message, LONG lErrorCode)	
    :   runtime_error(message)
	{
    }

    LONG getErrorCode() { return m_lErrorCode; }
private:
    LONG    m_lErrorCode;
};


Whenever i want to create a new class, i have to copy/paste this and just change the name. I was thinking about a way to create a class-template that generates generic exception-classes, but i found no way that wasn't ugly. Then again i'm no template crack, so maybe someone out there has an elegant solution to that problem (or the clear answer that there is none and i can stop searching).

wbr Brainley
QuestionCoInitializeEx Creates an Error Pin
#realJSOP26-Jan-07 0:00
professional#realJSOP26-Jan-07 0:00 
AnswerRe: CoInitializeEx Creates an Error Pin
Wes Aday26-Jan-07 4:29
professionalWes Aday26-Jan-07 4:29 
AnswerRe: CoInitializeEx Creates an Error Pin
Mark Salsbery26-Jan-07 6:35
Mark Salsbery26-Jan-07 6:35 
QuestionSystem Menu Weirdness, V2.0 [modified] Pin
#realJSOP25-Jan-07 23:39
professional#realJSOP25-Jan-07 23:39 
AnswerRe: System Menu Weirdness, V2.0 Pin
#realJSOP26-Jan-07 2:44
professional#realJSOP26-Jan-07 2:44 
GeneralRe: System Menu Weirdness, V2.0 Pin
Maximilien26-Jan-07 3:14
Maximilien26-Jan-07 3:14 
Questioncalling vb dll Pin
ng4kau125-Jan-07 23:24
ng4kau125-Jan-07 23:24 
AnswerRe: calling vb dll Pin
Cedric Moonen25-Jan-07 23:41
Cedric Moonen25-Jan-07 23:41 
GeneralRe: calling vb dll Pin
ng4kau125-Jan-07 23:48
ng4kau125-Jan-07 23:48 
GeneralRe: calling vb dll Pin
Nemanja Trifunovic26-Jan-07 5:06
Nemanja Trifunovic26-Jan-07 5:06 
Questionusing return statement in "conditional operator (? :) "ternary operator Pin
Mushtaque Nizamani25-Jan-07 22:48
Mushtaque Nizamani25-Jan-07 22:48 
AnswerRe: using return statement in "conditional operator (? :) "ternary operator Pin
Roger Stoltz25-Jan-07 22:57
Roger Stoltz25-Jan-07 22:57 
AnswerRe: using return statement in "conditional operator (? :) "ternary operator Pin
Christian Graus25-Jan-07 22:58
protectorChristian Graus25-Jan-07 22:58 
AnswerRe: using return statement in "conditional operator (? :) "ternary operator Pin
Bill Gates Antimatter Particle25-Jan-07 23:11
Bill Gates Antimatter Particle25-Jan-07 23:11 
GeneralRe: using return statement in "conditional operator (? :) "ternary operator Pin
krmed26-Jan-07 0:43
krmed26-Jan-07 0:43 
QuestionDirect3D window Pin
Waldermort25-Jan-07 20:41
Waldermort25-Jan-07 20:41 
QuestionMy Process Memory? Pin
Peter Weyzen25-Jan-07 19:27
Peter Weyzen25-Jan-07 19:27 

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.