|
If you're still hung up on accessing the command line, use argc and argv (or if it's a GUI app, __argc and __argv )
|
|
|
|
|
thank you all for tying to help, but was just haveing a brain meltdown last night.
bool run = FALSE;
if(strcmp(lpCmdLine, "string")==0)
run = TRUE
if(!run)
{
return 0;
}
i guess it i just couldn't see what was stairing me in the face.
|
|
|
|
|
Let say if I have one combox, I want to change its propety using comparation.
BOOL CASE1;
if (CASE1==TRUE)
XXXXX; //ComboBox change to Comboedit box
How can I write the code to change its properties?
|
|
|
|
|
feiutm9898 wrote: How can I write the code to change its properties?
Use ModifyStyle .
|
|
|
|
|
You can use for example of ModifyStyle(0,CBS_AUTOHSCROLL);
|
|
|
|
|
Hi All
I have made one console application in VC++.Now i want to add different colors for stdout and stdin.
I have used the following code.
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hStdOut , &ConsoleScreenBufferInfoOutPut);
//Setting color for stdout
ConsoleScreenBufferInfoOutPut.wAttributes = FOREGROUND_GREEN;
FillConsoleOutputAttribute(hStdOut , ConsoleScreenBufferInfoOutPut.wAttributes , ConsoleScreenBufferInfoOutPut.dwSize.X*ConsoleScreenBufferInfoOutPut.dwSize.Y,
origin,&dwrite );
SetConsoleTextAttribute(hStdOut ,ConsoleScreenBufferInfoOutPut.wAttributes);
//Setting color for stderr
hStdErr = GetStdHandle(STD_ERROR_HANDLE);
GetConsoleScreenBufferInfo(hStdErr , &ConsoleScreenBufferInfo);
ConsoleScreenBufferInfo.wAttributes = FOREGROUND_RED;
FillConsoleOutputAttribute(hStdErr , ConsoleScreenBufferInfo.wAttributes , ConsoleScreenBufferInfo.dwSize.X*ConsoleScreenBufferInfo.dwSize.Y,
origin,&dwrite );
Using this code I am getting the color for stdout as red.
But I have chosen green color for stdout.
Can anybody help me in this regard?
SetConsoleTextAttribute(hStdErr ,ConsoleScreenBufferInfo.wAttributes);
|
|
|
|
|
|
Thanks for your reply.
But I want to use win32 API and does not want to include console.h
Can it be done with the code that I have mentioned.
|
|
|
|
|
i am developing an application in vc++ that can get complete system information hardware and software both..now i want to fatch all system files information in vc++.But i don't have any clue.Can anyone help me??
Any help would be appreciated.
thanking you.
|
|
|
|
|
|
tyjjrtruy4teqye7nyue7qay wrote: ...i want to fatch all system files information in vc++.
This is a very broad request. Can you be a bit more specific?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hello David,
Sorry for late reply, i actually want to get names,extention,creation date,last accessed
date,path of the file etc. about all system related files.these file can be os related.
waiting for reply.
thanking you.
|
|
|
|
|
vankadia_n wrote: ...system related files...
Which are?
To get information for any file, just use GetFileAttributes() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
hello,
Sorry for late reply, i actually want to get names,extention,creation date,last accessed date,path of the file etc. about all system related files.these file can be os related.these files can be dlls,exe,or any else files.
waiting for reply.
thanking you.
|
|
|
|
|
|
Hi everybody,
is it not standard in MFC that a MDI Child keeps the focus on a (for example)textbox if the user switch
to another window (for example from the application to the Explorer) and re-opens the application ?
I use a SetActiveView(this); ... than the focus is still at the control where i left the application.
At the Destructor i make a SetActiveView(NULL); before the Window closes
Thanks
|
|
|
|
|
i want to write and read the text from txt file from VC++? any recomendation
|
|
|
|
|
Don't post twice your message. Once is enough.
ng4kau1 wrote: i want to write and read the text from txt file from VC++? any recomendation
You can use fstream for that. Here[^] is a tutorial.
|
|
|
|
|
Hi to write and read a txt file use the following code.
FILE *fp;
fp = fopen("C:\\log.txt","w");
if(fp == NULL)
printf("File cannot be opened");
fwrite("THis is my first file handling program",sizeof(char),38,fp);
fclose(fp);
See MSDN for further help on fwrite and fread.
|
|
|
|
|
sachin ahuja wrote: fwrite("THis is my first file handling program",sizeof(char),38,fp);
If it really is the first file handling program, I would suggest to use:
fputs("THis is my first file handling program",fp);
instead.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Just out of curiosity, why would you attempt to write to the file if fp is NULL .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dont need to send same question
|
|
|
|
|
We have an application written in visual c++ that sends e-mails using crystal reports. The application works with Crystal Reports using the Crystal Reports Runtime. Then, Crystal Reports connects to Outlook and this is how the mail is sent.(we use some functions in c++ to deal with the report and export the report the same way crystal does it. we use craxdrt9.dll library).
But now we are trying to send the e-mail in the same way but not using Outlook, using Lotus Notes.
Crystal says that it offers support for lotus.
I installed Lotus, I modified the application so that it set for lotus (DestinationType == crEDTLotusDomino), but when I try to export it breaks down. I can't debug it because the craxdrt9.dll fails.
Does anyone know how code should look like ? Does anyone know about this kind of stuff? (some other connection method...)
Thank you.
|
|
|
|
|
i want to write and read the text from txt file from VC++? any recomendation
|
|
|
|