Click here to Skip to main content
15,880,972 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to hide DOS prompt?? Pin
David Crow6-Jan-04 2:44
David Crow6-Jan-04 2:44 
AnswerRe: How to hide DOS prompt?? Pin
Selvam R6-Jan-04 2:58
professionalSelvam R6-Jan-04 2:58 
GeneralRe: How to hide DOS prompt?? Pin
Hauptman(n)6-Jan-04 4:04
Hauptman(n)6-Jan-04 4:04 
AnswerRe: How to hide DOS prompt?? Pin
valikac6-Jan-04 6:33
valikac6-Jan-04 6:33 
AnswerRe: How to hide DOS prompt?? Pin
shultas6-Jan-04 15:30
shultas6-Jan-04 15:30 
GeneralRe: How to hide DOS prompt?? Pin
Danny Chan6-Jan-04 16:49
Danny Chan6-Jan-04 16:49 
GeneralRe: How to hide DOS prompt?? Pin
shultas6-Jan-04 17:52
shultas6-Jan-04 17:52 
GeneralRe: How to hide DOS prompt?? Pin
Danny Chan7-Jan-04 2:45
Danny Chan7-Jan-04 2:45 
Hi shultas

Thank you so much for your help. But i still got a small problem to trouble u again. Hope u dont mind. Cause after inserting what you had given to me, I got this error on the <shellexecuteinfo shexecinfo="{0};"> line. This is because the shellexecute is carried out in a few case function and i think this is why it give me these errors. Hence, is it possible for u to guide me for the one last time to solve this problem. Below is the portion of my program tat I insert the codes. Thank you so much for you help. Really appreciated.Smile | :)

switch(*selection)
{

case'1':

//AfxMessageBox(_T("Executing Case 1"));

SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c:\\jpegtran.exe";
ShExecInfo.lpParameters = "-greyscale JPEG.jpg greyscale.jpg"; // --- THIS IS YOUR PARAMS!
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_HIDE;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);

//AfxMessageBox(_T("Opening greyscale images"));
imageFile2.Open( _T("C:\\FYP Test Folder\\best.jpg"), CFile::modeRead|CFile::typeBinary);
imageFile2.Read(image1, size.uintVal);
imageFile2.Close();

//AfxMessageBox(_T("Sending greyscale images"));
send(clientsock, (const char*) image1, size.uintVal, 0);
break;

The error message
error C2360: initialization of 'ShExecInfo' is skipped by 'case' label

cheers
Danny Chan
GeneralRe: How to hide DOS prompt?? Pin
shultas7-Jan-04 6:09
shultas7-Jan-04 6:09 
GeneralRe: How to hide DOS prompt?? Pin
Danny Chan7-Jan-04 15:22
Danny Chan7-Jan-04 15:22 
GeneralRe: How to hide DOS prompt?? Pin
Danny Chan7-Jan-04 16:42
Danny Chan7-Jan-04 16:42 
GeneralRe: How to hide DOS prompt?? Pin
shultas7-Jan-04 21:30
shultas7-Jan-04 21:30 
GeneralRe: How to hide DOS prompt?? Pin
Danny Chan12-Jan-04 2:37
Danny Chan12-Jan-04 2:37 
GeneralRe: How to hide DOS prompt?? Pin
shultas12-Jan-04 15:21
shultas12-Jan-04 15:21 
QuestionExact memory allocated by my system ?? Pin
Anonymous6-Jan-04 2:16
Anonymous6-Jan-04 2:16 
AnswerRe: Exact memory allocated by my system ?? Pin
David Crow6-Jan-04 2:43
David Crow6-Jan-04 2:43 
AnswerRe: Exact memory allocated by my system ?? Pin
John M. Drescher6-Jan-04 4:27
John M. Drescher6-Jan-04 4:27 
GeneralRe: Exact memory allocated by my system ?? Pin
forjer6-Jan-04 5:12
forjer6-Jan-04 5:12 
GeneralRe: Exact memory allocated by my system ?? Pin
John M. Drescher6-Jan-04 5:25
John M. Drescher6-Jan-04 5:25 
GeneralRe: Exact memory allocated by my system ?? Pin
Rickard Andersson206-Jan-04 21:00
Rickard Andersson206-Jan-04 21:00 
GeneralAccess Another Thread's String Stream Pin
Anonymous6-Jan-04 2:11
Anonymous6-Jan-04 2:11 
GeneralRe: Access Another Thread's String Stream Pin
David Crow6-Jan-04 2:41
David Crow6-Jan-04 2:41 
GeneralRe: Access Another Thread's String Stream Pin
Mike Dimmick6-Jan-04 3:56
Mike Dimmick6-Jan-04 3:56 
GeneralRe: Access Another Thread's String Stream Pin
John M. Drescher6-Jan-04 4:07
John M. Drescher6-Jan-04 4:07 
GeneralMFC 7.0 and 98 Pin
Anonymous6-Jan-04 1:49
Anonymous6-Jan-04 1:49 

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.