Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: File Exists Pin
Sameerkumar Namdeo4-Jan-09 21:04
Sameerkumar Namdeo4-Jan-09 21:04 
GeneralRe: File Exists Pin
ThatsAlok5-Jan-09 0:20
ThatsAlok5-Jan-09 0:20 
QuestionHow to create a custom list control in MFC ? Pin
shah1864-Jan-09 18:08
shah1864-Jan-09 18:08 
AnswerRe: How to create a custom list control in MFC ? Pin
Hamid_RT4-Jan-09 18:36
Hamid_RT4-Jan-09 18:36 
AnswerRe: How to create a custom list control in MFC ? Pin
Maximilien5-Jan-09 2:55
Maximilien5-Jan-09 2:55 
Questionusing CRichEditCtrl DisplayBand() function. Pin
Prasann Mayekar4-Jan-09 17:55
Prasann Mayekar4-Jan-09 17:55 
AnswerRe: using CRichEditCtrl DisplayBand() function. Pin
Hamid_RT4-Jan-09 18:39
Hamid_RT4-Jan-09 18:39 
QuestionRemoving else in this statements How? Pin
monsieur_jj4-Jan-09 15:14
monsieur_jj4-Jan-09 15:14 
Hi all,

I had my code reviewed and I had a comment that its best to remove the else in this statements:
LRESULT CMainDlg::OnInstall(WORD, WORD wID, HWND, BOOL& )
{	
	string LaunchInstaller;
	string InstallFolder;
	InstallClass installclass;

	TCHAR tcItemText[MAXBYTES];

	if(UpdateList.GetItemText(Select, tcItemText, MAXBYTES))
	{
	InstallFolder = tcItemText;
	LaunchInstaller = installclass.ConstructInstallerKey(IDS_MANAGEKEY, InstallFolder);
		if (installclass.InstallUpdate(LaunchInstaller.c_str())) 
		{
			return 0;
		}
		else 
		{
			LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITEKEY, InstallFolder);
			if (installclass.InstallUpdate(LaunchInstaller.c_str())) 
			{
				return 0;
			}
			else
			{
				LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITEASIANKEY, InstallFolder);
				if (installclass.InstallUpdate(LaunchInstaller.c_str())) 
				{
					return 0;
				}
				else
				{
				LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITECHINAKEY, InstallFolder);
					if (installclass.InstallUpdate(LaunchInstaller.c_str())) 
					{
						return 0;
					}
				}
			}
		}
	}
	else
	{
    MessageBox ( _T("Please choose an item to install"), _T("Redmap Update Manager"), MB_ICONWARNING );
	}
	return 0;
}


Any suggestions on how the code should look like?

Thanks,
Jayjay
AnswerRe: Removing else in this statements How? Pin
David Crow4-Jan-09 15:59
David Crow4-Jan-09 15:59 
QuestionMS‘s BUG? why can't get value from excel? Pin
ZhiLiangLin4-Jan-09 14:51
ZhiLiangLin4-Jan-09 14:51 
QuestionRe: MS‘s BUG? why can't get value from excel? Pin
David Crow4-Jan-09 16:06
David Crow4-Jan-09 16:06 
AnswerRe: MS‘s BUG? why can't get value from excel? Pin
ZhiLiangLin4-Jan-09 18:21
ZhiLiangLin4-Jan-09 18:21 
QuestionRe: MS‘s BUG? why can't get value from excel? Pin
David Crow5-Jan-09 3:56
David Crow5-Jan-09 3:56 
QuestionJust-In-Time Debugger Pin
Larry Mills Sr4-Jan-09 14:51
Larry Mills Sr4-Jan-09 14:51 
AnswerRe: Just-In-Time Debugger Pin
ThatsAlok5-Jan-09 0:24
ThatsAlok5-Jan-09 0:24 
QuestionAdobe GIL - any experience to share? Pin
islobodan4-Jan-09 13:05
islobodan4-Jan-09 13:05 
QuestionHow to make the cursor move to the next ctrol of EDIT automatic? Pin
titan_sky_king4-Jan-09 12:55
titan_sky_king4-Jan-09 12:55 
AnswerRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
Richard Andrew x644-Jan-09 14:08
professionalRichard Andrew x644-Jan-09 14:08 
JokeRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
titan_sky_king5-Jan-09 17:45
titan_sky_king5-Jan-09 17:45 
AnswerRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
Mark Salsbery4-Jan-09 15:17
Mark Salsbery4-Jan-09 15:17 
JokeRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
titan_sky_king5-Jan-09 17:46
titan_sky_king5-Jan-09 17:46 
QuestionMenus Pin
BobInNJ4-Jan-09 5:59
BobInNJ4-Jan-09 5:59 
AnswerRe: Menus Pin
Mark Salsbery4-Jan-09 6:38
Mark Salsbery4-Jan-09 6:38 
GeneralRe: Menus Pin
BobInNJ4-Jan-09 11:38
BobInNJ4-Jan-09 11:38 
GeneralRe: Menus Pin
Richard Andrew x644-Jan-09 12:17
professionalRichard Andrew x644-Jan-09 12:17 

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.