If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
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.

Minimize question????

I am trying to incorporate functionality into an application so that the user can hit the Minimize button on a window and the window will minimize to a particular size. I am trying to do this with the Minimize, Maximize, and Close buttons on the top right of the window (standard window functions). My problem is I am not sure how to do it. If the user resizes the window, I am preventing the window from going below a specific size. But is there any way to do the same thing when the minimize button is hit or I am forced to allow the window to be fully minimized? This is not C++ or MFC, I am having to do this in an application that is written in C. Any suggestions?

"Have you ever danced with the devil in the pale moonlight" - Jack Nicholson as Joker, Batman

Wow I didn't know you could make an application with minimize, maximize and close buttons using C only. Make it easy on yourself use MFC.......Unless of course you are referring to the buttons on the DOS console window.

I do realize this is not the normal behavior for windows and I agree I shouldn't be doing this. The problem is that those who are in charge think we should be doing it and I have been labored with the task of trying to figure out how. I cannot use MFC or C++, the application is written entirely in C and the file that I am modifying is written in C. So I am left with no choice but to use C. Also, I cannot use a menu, it was explicitly asked that it be when they hit the Minimize button. If all else fails, I will just let windows do what it is currently doing.

"Have you ever danced with the devil in the pale moonlight" - Jack Nicholson as Joker, Batman

Hi man,
if u r doing windows programming than it is easy. i cant say anything if it is related to DOS. hey for windows all u have to do is to override the window minimize message. and in that set the size of window using SetWindowPos() API.
nd for handling the minimize operation u have to override WM_PAINT.
For eg

case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);

// Determine whether the window is minimized.

if (IsIconic(hwnd))
{
SetWindowPos(/*Here specify the size of the window and other parameters*/);
}
Maybe this works.
Regards Bandit