Click here to Skip to main content
16,006,355 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: On the fly changing the form of a CFormView Pin
Iain Clarke, Warrior Programmer27-Sep-08 12:04
Iain Clarke, Warrior Programmer27-Sep-08 12:04 
QuestionWhats the best way to simplyfy this function? Pin
monsieur_jj25-Sep-08 23:59
monsieur_jj25-Sep-08 23:59 
QuestionRe: Whats the best way to simplyfy this function? Pin
CPallini26-Sep-08 0:20
mveCPallini26-Sep-08 0:20 
AnswerRe: Whats the best way to simplyfy this function? Pin
monsieur_jj26-Sep-08 0:53
monsieur_jj26-Sep-08 0:53 
AnswerRe: Whats the best way to simplyfy this function? Pin
SandipG 26-Sep-08 0:54
SandipG 26-Sep-08 0:54 
GeneralRe: Whats the best way to simplyfy this function? Pin
Rajesh R Subramanian26-Sep-08 0:58
professionalRajesh R Subramanian26-Sep-08 0:58 
GeneralRe: Whats the best way to simplyfy this function? Pin
SandipG 26-Sep-08 1:00
SandipG 26-Sep-08 1:00 
AnswerRe: Whats the best way to simplyfy this function? Pin
Ahmed Charfeddine26-Sep-08 1:16
Ahmed Charfeddine26-Sep-08 1:16 
If the code is OK, and you tested it, that you are sure it is with no bug,etc
then you can simplify it this way :


1-create a new function (you can put it in a separate file) and move your code there :
LRESULT doBigThings(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
or may be :
LRESULT doBigThings(CMainDlg* pDlg,WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
if the code access some members of the Dlg, something I do not want to verify by myself by looking at that source code.

2-change CMainDlg::OnInstall to :

LRESULT CMainDlg::OnInstall(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
return doBigThings(wNotifyCode,wID,hWndCtl,bHandled);
}

Thus try to forget what is inside doBigThings, just look at maindlg.cpp then conclude to yourself :
OK I have good, fucntionning and very simple simplified code, now I have to move forward.

Of course unless the given source code is not yours, and that only you would like to confirm some personal opinion when you first looked at that someon'else code, by seeing our own reaction at it.
Because that case I can show you what is worse.

Our Philosophy, Mohammed Baqir Al Sadr

QuestionRunning MFC7 (2003) project in Windows Vista problem? Pin
Hadi Dayvary25-Sep-08 23:40
professionalHadi Dayvary25-Sep-08 23:40 
AnswerRe: Running MFC7 (2003) project in Windows Vista problem? Pin
Rajesh R Subramanian26-Sep-08 0:48
professionalRajesh R Subramanian26-Sep-08 0:48 
GeneralRe: Running MFC7 (2003) project in Windows Vista problem? Pin
Hadi Dayvary26-Sep-08 10:07
professionalHadi Dayvary26-Sep-08 10:07 
Questioninclude file for a COM client (consumer) Pin
George_George25-Sep-08 23:30
George_George25-Sep-08 23:30 
AnswerRe: include file for a COM client (consumer) Pin
santhoshv8425-Sep-08 23:53
santhoshv8425-Sep-08 23:53 
QuestionT-SQL type application? Pin
George_George25-Sep-08 23:21
George_George25-Sep-08 23:21 
QuestionC++ and ADO Pin
roguecode25-Sep-08 23:14
roguecode25-Sep-08 23:14 
QuestionNo source code for debugger Pin
Ahmed Charfeddine25-Sep-08 22:04
Ahmed Charfeddine25-Sep-08 22:04 
QuestionGet the language identifier of a window Pin
Joseph Marzbani25-Sep-08 21:34
Joseph Marzbani25-Sep-08 21:34 
AnswerRe: Get the language identifier of a window Pin
Ahmed Charfeddine25-Sep-08 22:37
Ahmed Charfeddine25-Sep-08 22:37 
GeneralRe: Get the language identifier of a window Pin
Joseph Marzbani26-Sep-08 0:34
Joseph Marzbani26-Sep-08 0:34 
GeneralRe: Get the language identifier of a window Pin
Ahmed Charfeddine26-Sep-08 0:53
Ahmed Charfeddine26-Sep-08 0:53 
QuestionHow can use a string to set the registry value? Pin
Le@rner25-Sep-08 21:17
Le@rner25-Sep-08 21:17 
AnswerRe: How can use a string to set the registry value? Pin
Cedric Moonen25-Sep-08 21:22
Cedric Moonen25-Sep-08 21:22 
GeneralRe: How can use a string to set the registry value? Pin
Le@rner25-Sep-08 21:25
Le@rner25-Sep-08 21:25 
GeneralRe: How can use a string to set the registry value? Pin
Rajesh R Subramanian25-Sep-08 21:29
professionalRajesh R Subramanian25-Sep-08 21:29 
GeneralRe: How can use a string to set the registry value? Pin
Cedric Moonen25-Sep-08 21:34
Cedric Moonen25-Sep-08 21:34 

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.