IonicWind Software

IWBasic => General Questions => Topic started by: Brian on March 16, 2007, 03:35:28 PM

Title: Adjusting Window size for themes
Post by: Brian on March 16, 2007, 03:35:28 PM
Hi,

Does anyone know a foolproof way of adjusting the program window to cater for Windows themes?

That is, one user may have Windows Classic running, and another may have the new Toytown
theme running

Also, I have a date/time field in my database, and it insists on showing both the date and time,
when I want it show only the date. It also shows it as year-month-day, and I would like it to
show day-month-year. Any ideas?

Many thanks,

Brian

PS: Getting on well with the database now, but I have had to work three nights this week,
so I will post my code again to show how far I have got this weekend
Title: Re: Adjusting Window size for themes
Post by: Parker on March 16, 2007, 06:46:44 PM
The AdjustWindowRect function can be used. You should create a RECT structure that contains the desired client area, and use AdjustWindowRect to get the window area that you need. Then you can use SetSize to resize the window.

AdjustWindowRect (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getclientrect.asp)
Title: Re: Adjusting Window size for themes
Post by: Brian on March 17, 2007, 03:51:02 AM
Righto, I'll try that one! Don't think I've used that call before

Thanks a lot,

Brian