A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to set control position in outlook property page?



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old January 20th 09, 03:53 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default How to set control position in outlook property page?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 12:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.