|
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
|
|
|
|
|
I used class CFileDialog in order to open file and save file in my application
But when I select CFileDialog with mode open (flag bOpenFileDialog = TRUE),change size it and close.
I select CFileDialog with mode save as (flag bOpenFileDialog = FALSE).
size of save as dialog exactly the same like size of open dialog when close.
Can I avoid this behaviour?
Please help me!
|
|
|
|
|
The file dialog is a system dialog and the size is saved in the registry for each app that uses it. To change the behaviour you have to subclass the file dialog and do all the saving and restoring of the dialog sizes yourself. There are articles about subclassing the CFileDialog here on CP, do a search.
|
|
|
|
|
Can you tell me more clearly about key of system dialog in registry .
I have tried subclassing the CFileDialog and set size of it in OnDestroy() and on OnInitDialog() but not successed.
|
|
|
|
|
toanmtkh@yahoo.com wrote: I have tried subclassing the CFileDialog and set size of it in OnDestroy() and on OnInitDialog() but not successed.
What didn't work? It works for me.
|
|
|
|
|
I think you could specify a hook, and in that procedure, respond to the WM_INITDIALOG message. In addition, you'll most likely need to use GetOpenFileName() instead of CFileDialog .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Friends,
I've a simple dialog based application and when user right clicks on the dialog window, a menu gets opened.
Now the menu gets closed when user presses escape key or click on the dialog. I want to detect that the menu has been closed.
How can i determine that the menu has been closed ? Is there any such event ?
Imtiaz
|
|
|
|
|
|
Hi,
int id;
const int ********::get_id() const
{
return id;
}
I want to do these operations.
**** gh;
int th = gh.get_id (how is it possibele to type cast)
int th =10;
if (th == gh.get_id) (how is it possible to compare)
COleDateTime& CTableInfo::edit_date()
{
return edit_date;
}
CtableInfo in;
COleDateTime ct;
ct = in.edit_date(); //this is not happening and
//'=' : cannot convert from 'class COleDateTime (__thiscall
CToleranceTableInfo::*)(void)' to 'class COleDateTime *'
give me some solution...
thanks in advance..
bye
kk
kk
|
|
|
|
|
to understand problem easily, can you reword your problem. Are ***** placeholders for something ?
|
|
|
|
|
Hi,
int id;
const int Cinfo::get_id() const
{
return id;
}
I want to do these operations.
CInfo gh; //take obj of the class in some way.
int th = gh.get_id (how is it possibele to type cast)
int th =10;
if (th == gh.get_id) (how is it possible to compare)
COleDateTime CTableInfo::edit_date()
{
return edit_date;
}
COleDateTime ct;
CtableInfo in;
ct = in.edit_date(); //this is not happening and
//'=' : cannot convert from 'class COleDateTime (__thiscall
CToleranceTableInfo::*)(void)' to 'class COleDateTime *'
|
|
|
|
|
Cinfo::get_id() is a member function, so to call it you have to use the parameters at the end to denote the parameter list. If not you are getting the address of the function.
int th = gh.get_id(); kk_mfc wrote: COleDateTime CTableInfo::edit_date()
{
return edit_date;
}
Give your function and member variables different names. Right now the function is trying to return it's own address, cast to a COleDateTime pointer. It can not do that.
|
|
|
|