|
'Person Name Smart Tags' are available with To/From/Cc/Bcc e-mail addresses of Outlook. If you move the mouse pointer to e-mail ids in these fields, a 'Windows Messenger' icon will appear and you can get a context menu by clicking on that icon. This Smart Tag of Outlook provides the functionality to call or send mail to that person using smart tag menus by leveraging the functionality of 'Windows Messenger'.I want to do some preprocessing (like providing default message body or displaying a message box before placing call) on the click of these menu items using outlook automation or plug in or any other possible way. Is there any way to modify the name of these smart tag menu items and hooking or capturing the click event of these menu items?How Microsoft Outlook integrated with Windows messenger to provide call facility? Which DLL is responsible for it? Can I hook into that DLL to trap the click of Call menu?Please help me if you have any ideas in this regard. Let me know if I am not clear with my points.
NB : I don’t want to do this activity via adding ‘Additional Actions’ in the smart tag menu, but I want to use the existing ‘Call Work..’ menu click event.
|
|
|
|
|
Can anybody tell me, how i can add a link or hyperlink to a messagebox?
I guess it's not that difficult, but i've never done it and could not find any documents how to do so.
|
|
|
|
|
Create your own dialog.
Subclass CStatic, putting in the functionality of a link by handling such messages and functions as DrawItem(), WM_MOUSEHOVER, WM_MOUSELEAVE.
Use it in your dialog.
this is this.
|
|
|
|
|
With the message box that comes from MessageBox() , you can't. There are plenty of examples here, however, on making your own.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Try Here[^] instead...
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I've added a bar chart (MSChart OCX component) to my application and I don't know how to add a label with the column value over each bar. How can I do that?
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
|
Ups, I can't find the answer there I don't want to change the column label (used when showing the legend), I want to insert the value f the column over the drawn bar or above it. Do you know how to do that?
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Sorry, but I didn't find any function which can solve the purpose. In case you find the solution,plz tell me.
all the best
Ritu Kwatra
|
|
|
|
|
I don't understand why MSChart is not document as other components are ...
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I am using textout function to display time (in minutes/seconds)...problem arises when after each minute seconds are reset...first 10 seconds are displayed 10,20,30.... instead of 1,2,3 and so on
what should be done
thanks
|
|
|
|
|
Before drawing your text, use FillSolidRect() to fill the background area for the text.
this is this.
|
|
|
|
|
I want to know how can I exchange data between property pages. For example, suppose I have two property pages. I need to use an edit box named m_edit1 in property page1 to store the value, and read and show it in property page2
How can I tackle the problem?
Thanks~
|
|
|
|
|
You'd have to access to property pages parent (PorpertySheet) to get and set information from the pages. The property pages would have public methods to get and set the data you need and call them by using the CPropertySheet::GetPage.
From within the page you need to get/set information:
CPropertySheet* pSheet = (CPropertySheet*) GetParent();
CPropertyPage* pPage = pSheet->GetPage(1);
pPage->GetSetText(...); // call the public method you've defined.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi,Thank u for ur help.I have tried it but i cannot get the wanted result.Please read my code:
BOOL CReinforce::OnInitDialog()
{
CPropertyPage::OnInitDialog();
CPropertySheet* pSheet =
(CPropertySheet*)GetParent();
CComputer* pComputer = (CComputer*)pSheet->GetPage(1);
//double shearforce,moment;defined in the CComputer;
reinforceshearforce=pComputer->shearforce;
reinforcemoment=pComputer->moment;
}
The class CComputer is dereived of CPropertyPage and the frist PropertyPage.The class class CReinforce is second PropertyPage.And parameter( shearforce and moment) is defined in the CComputer.
Is it right?
Thank u .
|
|
|
|
|
What kind of problem are you having?
greenwyx wrote:
CComputer* pComputer = (CComputer*)pSheet->GetPage(1);
If CComputer is the first page added it would be GetPage(0) instead of 1.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
marcdev:
Thank u for help.
My Application runs well.
|
|
|
|
|
greenwyx wrote:
I want to know how can I exchange data between property pages. For example, suppose I have two property pages. I need to use an edit box named m_edit1 in property page1 to store the value, and read and show it in property page2
How can I tackle the problem?
The best way to make one page access a control in another page is not do it at all.
Pages which are loaded in the same sheet are normally used to display/edit different aspects or parts of a common object. But sometimes one of the pages needs to read or modify something in the object which is shown or edited in another. In my opinion, the best approach in terms of good design is the following:
Suppose you have an instance of some class MyObj with the following public members:
class MyObj
{
public:
CString m_sA;
CString m_sB;
CString m_sC;
[...]
};
Suppose you have the following classes, each derived from CPropertyPage, named PageA , PageB and PageC , each displaying/editing m_sA , m_sB , and m_sC , respectively. But at some points, PageB needs to read the data in m_sA and PageC needs to modify the data in m_sB .
The solution consists of the following:
In each page:
- The constructor receives a pointer to the instance of MyObj it's being edited and stores it in a member variable of its own (say m_Obj) for later use.
class PageA : public CPropertyPage
{
protected:
MyObj* m_pObj;
CString m_sA;
public:
PageA(MyObj* pObj);
[...]
};
PageA::PageA(MyObj* pObj)
: m_pObj(pObj), CPropertyPage(PageA::IDD)
{
}
[...].
- OnInitDialog() makes those initializations needed only the first time the page is activated (e.g.: loading options in combos). It doesn't need to set any data into its variables or controls. In this example, in which only a string will be edited through a edit box, there's no need to even override OnInitDialog().
- OnSetActive() loads data from MyObj into the page member variables and controls as needed
BOOL PageA::OnSetActive()
{
m_sA = m_pObj->m_sA;
return CPropertyPage::OnSetActive();
}
- OnKillActive() stores the data edited through the page to the object, thus making it available to all other pages:
BOOL PageA::OnKillActive()
{
if (!CPropertyPage::OnKillActive())
return FALSE;
m_pObj->m_sA = m_sA;
}
- If at some point one of the pages needs to read or modify data that is displayed/edited in another page, it just uses the object pointer.
void PageB::OnSomeButtonClicked()
{
if (!m_pObj->m_sA.IsEmpty())
{
m_sB = m_pObj->m_sA;
m_sB += "(came from m_sA)";
}
}
void PageC::OnSomeButtonClicked()
{
m_pObj->m_sB = "Modified at PageC";
}
As you can see, all the pages have access to all the data (the pointer to the object, which is the same for all the pages) at any point, and are free to read and modiy it as much as they want. Also, since every page reloads its variables and controls each time its activated, and updates the common object with any change that might have occurred in the page each time it gets deactivated, all page are able to keep in sync.
Now, to edit an instance of MyObj you just need something like this (the example shows that you might omit some page[s] based on some condition):
void EditObj(MyObj& obj, BOOL bEditB, BOOL bEditC)
{
MyObj objCopy = obj;
PageA(&objCopy);
PageB(&objCopy);
PageC(&objCopy);
CPropertySheet sheet(AfxGetMainWnd());
sheet.AddPage(&PageA);
if (bEditB)
sheet.AddPage(&PageB);
if (bEditC)
sheet.AddPage(&PageC);
if (sheet.DoModal() == IDOK)
{
obj = objCopy;
}
}
Of course, this can be done in many other ways (e.g.: deriving CPropertySheet and making the pages access its variables or functions, sending or posting messages, etc.), but keep in mind that the approach I'm suggesting offers the following beneficial characteristics:
- You don't need to create a specialized property sheet.
- Your pages don't need to know about any specialized property sheet, and don't depend on the property sheet being of any specific class (they can be used with any sheet.)
- Your pages don't need to know about any of the other pages, and they don't depend on the other pages being present or being of any specific class.
- You can modify any page without affecting anything else.
- You can incorporate more pages without affecting anything else.
- The pattern is simple to understand and easy to maintain.
This pattern can be used in any situation involving property pages, even if you don't need to read or modify data being edited in other pages. However, if that weren't the case, I'd suggest each page received exactly what it needs to access and nothing else. For example, PageA could just receive a pointer or reference to the string it's intended to edit, instead of a pointer to a complete object. This would only affect the creation of that page but you wouldn't need to modify the other pages or the way they are used:
void EditObj(MyObj& obj, BOOL bEditB, BOOL bEditC)
{
MyObj objCopy = obj;
PageA(&objCopy.m_sA);
PageB(&objCopy);
PageC(&objCopy);
CPropertySheet sheet(AfxGetMainWnd());
sheet.AddPage(&PageA);
if (bEditB)
sheet.AddPage(&PageB);
if (bEditC)
sheet.AddPage(&PageC);
if (sheet.DoModal() == IDOK)
{
obj = objCopy;
}
In fact, once you've done that, your PageA, which was designed to edit some kind of string (say a filepath, a telephone number, an e-mail address, or whatever m_sA in the example represented), can be used anywhere you need that kind of page for any object, with any CPropertySheet, and in conjunction with any other property page. That's what a loosely-coupled design means.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Jose Lamas Rios:
Thank you for your help.
You are so patient and careful that I think I have learned the data exchange between pages very well.
Best Wishes.
|
|
|
|
|
|
Hi folks i need a little help about hiding maximize button.
I have created an app wizard MFC application..
I wanted to set the window (show when application starts execution) dimension which i did in Function
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
setting cs width and height.
The problem is now i want to make sure this windowsize is unchaged;
for this i want the user is only able to minimize and open the window to the size i fixed in "PreCreateWindow"..
i.e. maximize and restor button are disabled plz tell me how to do it...
Reagrds, Jinbaba
|
|
|
|
|
Is it checked the "Minimize box" and unchecked the "Maximize box" in the Dialog properties/Styles tab ?
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
|
How to show CBitmap in VC++ 7.0 picture control, I assign it
CBitmap *bmp;
bmp->CreateBitmap(w,h,1,24,pdata);
m_static.SetBitmap(HBITMAP(hbmp));
but it does not appear in picture control?
9ine
|
|
|
|
|
Hello
Did you use SS_BITMAP style for your static control ?
Here is sample from MSDN:
CStatic myStatic;
myStatic.Create(_T("my static"),
WS_CHILD|WS_VISIBLE|SS_BITMAP|SS_CENTERIMAGE, CRect(10,10,150,50),
pParentWnd);
myStatic.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)) );
Andrew
|
|
|
|
|