![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
My environment is VC++2005/ATL/OLK2003&2007. I added Outlook::
ApplicationEvents successfully and all are ok. But the size of propertypage for outlook2003 and 2007 is different, so i want to adjust the controls' position to the middle of the propertypage. But it is no use to call SetWindowPos or MoveWindow in OnInitDialog function, what should i do? I have a lot of controls on the propertypage. LRESULT CPropPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { // TODO : Add Code for message handler. Call DefWindowProc if necessary. GetDlgItem(IDC_STATIC_PROPAGE).SetFont(HFONT(boldF ont_)); SetTimer(FreshGUI, 1000, NULL); //set the window position, can't take effort, why?? m_Control = GetParent(); CRect ParentRc, CurRc; int xCord = 0, yCord = 0; m_Control.GetClientRect(ParentRc); GetWindowRect(CurRc); xCord = (ParentRc.Width()-CurRc.Width())/2; yCord = (ParentRc.Height()-CurRc.Height())/2; SetWindowPos(HWND_TOP, xCord, yCord, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); return 0; } -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...ddins/200901/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook View Control Folder property | Nency | Add-ins for Outlook | 2 | October 6th 08 12:34 PM |
Get the Position of Outlook 2007 Control relative to screen | n777krish | Outlook and VBA | 3 | November 27th 07 02:02 PM |
Changing property of control to all caps | Russ | Outlook - Using Forms | 10 | June 29th 06 04:21 PM |
Background Color for Outlook Property Page | paulmcd | Add-ins for Outlook | 2 | February 15th 06 07:38 AM |
why can't you add a page to a form just like you can add a page to the property page | donald | Outlook - Using Forms | 2 | January 25th 06 10:50 AM |