|
This code is for the WM_ERASEBKGND, not for the WM_PAINT message. So, probably there is something also for the WM_PAINT message.
|
|
|
|
|
I want to catch the stream which is being sent to the console when an exe file is run on the commandline. Is it possible.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: catching ouput stream
Hello,
You can that by typing like this
cmd > file.name
regards,
Divyang Mithaiwala
System Engineer & Software Engineer
|
|
|
|
|
Thank you. But i dont want it to be redirected into a file. I want to copy it directly to the buffer in the program at runtime.
Is it possible?
KIRAN PINJARLA
|
|
|
|
|
Search for "reading IO stream or buffer"
redindian
|
|
|
|
|
Sorry for posting an incomplete question.
My question is...
I want to run another exe from my application as console and want to catch the output into a buffer of this application without redirecting into another file.
KIRAN PINJARLA
|
|
|
|
|
Well , whether you launch another application or not , whatever in output buffer can be read if you read the IO stream .
Note :
Use CreateProcess() (if you want to posses the handle of child exe and destory it ) or ShellExecute() to launch another exe
redindian
|
|
|
|
|
Thanks for clarifying. See here and here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
What are the registry names for document files,Picture files and music files.Can any one let me know about them.
Thanks.
|
|
|
|
|
elobrate your real time behavior then I could give you more inputs
redindian
|
|
|
|
|
I want to add menu item (copy to application) when i right click the mouse over document files,picture files and music files.My aim is if we select the menu item that particular file will be added to the application(i.e,the place where the current application exists.For that i want Registry names.Also i have one doubt.I want to display the menu item in the menu when my application runs and that menu item should not exist after i close the application.Any ideas regarding this.
Thanks.
|
|
|
|
|
radhika28 wrote: I want to add menu item (copy to application) when i right click the mouse over document files,picture files and music files.My aim is if we select the menu item that particular file will be added to the application
hope the links help...
http://www.jfitz.com/tips/rclick_custom.html
http://www.codeguru.com/forum/archive/index.php/t-166431.html
radhika28 wrote: I want to display the menu item in the menu when my application runs and that menu item should not exist after i close the application.Any ideas regarding this.
You have to implement registry modifications needed for enabling the sub menu item in your InitInstance or whatever is the init function and when the exe exits remove the modifcations aas before ...
redindian
|
|
|
|
|
Thanks dharani for ur reply.Can you briefly explain how we can add registry modifications to our application.Is there any article for doing this.I have been following Michael Dunn's Shell extensions in code project.My application is a single document application.How can i add them to my application.
Thanks.
|
|
|
|
|
radhika28 wrote: What are the registry names for document files...
If you are referring to files with a .doc extension, see the following registry key:
HKEY_CLASSES_ROOT\.doc
Picture files and music files have various extensions. They are also located in the HKCR hive.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I can use IStoreFolder::DeleteMessages to delete mail,but how can i get the MESSAGEIDLIST.prgdwMsgId?
|
|
|
|
|
I have an edit control in a dialog. This dialog has bitmap image over it. I have handled the OnCtlColor in the dialog class. I have set the background mode as TRANSPARENT for the edit control.
When i scroll the bitmap image on the dialog is also getting scrolled. I need to avoid this. The scrolling show happen without moving the bitmap on the dialog. How do i achieve this???
Sunil
|
|
|
|
|
I'm not exatcly sure what you mean.... But I've used this method to stop my dialog from scrolling from non window scrollbars.
if you have a OnHScroll or OnVScroll for your dialog ...
try returning from the function if pScrollBar is not NULL before doing any of the switch statements.
void CEdrumMonDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
if(pScrollBar != NULL){return;}
switch (nSBCode).........
.......
}
|
|
|
|
|
hi
How to handle exception generated from CFile::Write() function?
try
{
f2.Write(buf,length);
}
catch(CFileException *e)
{
e->Delete();
}
In the above piece of code wen there is an exception due to disk full it does not come to catch part rather the OS handles....I need to handle thru the application....
Thanx in advance..
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Try using CException instead. The exception might not be from CFile.
<font=arial>Weiye Chen
Give me the Death Note, and I'll cleanse the world...
|
|
|
|
|
CException also not working...actually m working in eVC++,is there may b some different method...can u plz help...
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Check this article[^]. Try using TRY and CATCH macros see if it helps.
Or have you used catch(...)?
<font=arial>Weiye Chen
Give me the Death Note, and I'll cleanse the world...
|
|
|
|
|
Check out SetErrorMode()
I think you can use this:
<br />
SetErrorMode(SEM_FAILCRITICALERRORS);<br />
...... Do stuff, such as filling up the disk and get the errorcode.<br />
SetErrorMode(0);<br />
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Win CE doesnot support SetErrorMode().
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Hello,
Either u can write
try
{
}
catch(...)
{
}
or u can write
<code>__try
{
}
__except(1)
{
CString str;
str.Format(_T("%x"),GetExceptionCode());
AfxMessageBox(str);
}</code> .
regards,
Divyang Mithaiwala
System Engineer & Software Engineer
|
|
|
|
|
For MFC, use TRY /CATCH instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|