473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with window size (NCCALCSIZE) when restore

Hi,

I'm building a skin for my form in c# and I have a little problem.
I'm using NCCALCSIZE to resize my client size and give painting space
for my custom borders.

For some reason, the form is getting smaller every time I restoring it
from minimize / maximize states.

This is the code for my NCCALCSIZE:

NativeMethods.NCCALCSIZE_PARAMS ncParams =
(NativeMethods.NCCALCSIZE_PARAMS)m.GetLParam(typeo f(NativeMethods.NCCALCSIZE_PARAMS));
Rectangle proposed = ncParams.rectProposed.Rect;

proposed = Rectangle.FromLTRB(
proposed.Left + BorderLeft.Width,
proposed.Top + BorderTop.Height,
proposed.Right - BorderRight.Width,
proposed.Bottom - BorderBottom.Height );

ncParams.rectProposed =
NativeMethods.RECT.FromRectangle(proposed);

Marshal.StructureToPtr(ncParams, m.LParam, false);

Should I handle another winproc to save my form size?

Thanks in advance,
Mayan

Apr 18 '06 #1
0 1320

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dave Hammond | last post by:
You'd think this would be a basic part of the window object (and perhaps it is and I'm just being dense), but I can't find any reference in the IE window object documentation to a property which...
9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
1
by: deko | last post by:
When a user opens my Access database application, I would like the application window to be a certain size (but not maximized). Currently, when my app is first opened, the application window...
1
by: Bill Borg | last post by:
I have a simple chat application. "Host" program has a timer and listens for new requests for chat. The host user will typically minimize that window when there's nothing happening, but I'd like to...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
11
by: Chippy | last post by:
This is driving me NUTZ. All of my forms are keeping the size of the window I design them in, even when I have the AutoResize option set to Yes. The actual form (grey, gridded area) is the size...
1
by: Bharathi kumar | last post by:
Hi, Iam working on VS.NET 2005. My scenario is as follows: I opened a window by clicking a menu item in the MDI form and then I maximized that child window. I have not yet closed this...
4
by: arajunk | last post by:
In Firefox this opens a full size window (maximized) . In IE it opens the partial window requiring user to click restore (upper right) to maximize. What am I missing ? var...
2
by: =?Utf-8?B?VGVycnk=?= | last post by:
Hope someone has some ideas - this is driving me nuts, I am using VS2008 and have a tightly layed out form at 8 pts. The form has a font dialog and when the user changes the font size, everything...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.