I have a program, where I use DialogBoxParam.
If you make a shortcut from this program, it's
possible to MAXIMIZE it, so it looks terrible.
So my question:
Is there a way to avoid this behaviour, so it
can't be MAXIMIZED :confused:
Posted on 2004-05-12 17:09:19 by The SharK
Make sure WS_MAXIMIZEBOX isn't set in the style.
Posted on 2004-05-12 17:15:49 by stormix
Also maybe check this, if not posible in that way:

The WM_ENTERSIZEMOVE message is sent once to a window when it enters the moving or sizing mode.

And The WM_EXITSIZEMOVE message is sent once to a window after it has exited the moving or sizing mode.

The WM_SIZE message is sent to a window after its size has changed.

The WM_SIZING message is sent to a window that the user is resizing. By processing this message, an application can monitor the size and position of the drag rectangle and, if needed, change its size or position.


Have a nice day or night.
Posted on 2004-05-12 17:24:30 by rea
By default, the MAXIMIZE icon is disabled, but
it's possible to maximize it, if you make a shortcut first....

I have attached the program :)
Posted on 2004-05-12 17:31:22 by The SharK
Remove DS_MODALFRAME

akyprian
Posted on 2004-05-13 04:20:31 by akyprian
Hi akyprian


Nope, that didn't work :(


I made the shortcut and choose the maximize,
and the whole screen was ONE BIG DIALOG :(
Posted on 2004-05-13 09:18:59 by The SharK
Probably not an ideal solution but if you put



invoke AnimateWindow,hDlg, 1, AW_BLEND


at the end of WM_INITDIALOG then it won't be maximized.
Posted on 2004-05-13 10:04:33 by stormix
Sorry, I misunderstood what your problem was.

Why don't you handle WM_GETMINMAXINFO ?

akyprian
Posted on 2004-05-13 10:29:09 by akyprian
Make it WS_POPUP instead of WS_OVERLAPPED.
In any case I think there should be a way to do this only by setting the correct styles, no need to have special message handling.
Posted on 2004-05-13 10:34:25 by QvasiModo
Make it WS_POPUP instead of WS_OVERLAPPED


Hi QvasiModo

It didn't work to replace WS_OVERLAPPED, with WS_POPUP
thanks anyway.



Why don't you handle WM_GETMINMAXINFO ?


Hi akyprian

You're right, it works to handle the WM_GETMINMAXINFO.

Thanks :alright: :alright:
Posted on 2004-05-13 12:03:50 by The SharK
Hi The SharK,

Don't mention. I would recommend to remove DS_MODALFRAME too, otherwise on Win98SE machines, the maximize option in system menu is not disabled.

regards,

akyprian
Posted on 2004-05-13 14:22:37 by akyprian
I would recommend to remove DS_MODALFRAME too



Yeah, I'll remove that too ;-)
Posted on 2004-05-13 14:33:59 by The SharK
Try something like this:

In WM_INITDIALOG:
invoke ShowWindow,hWin,SW_RESTORE

This worked for me testing it (Win98), but since I don't know your code or your system maybe this won't work for you.

It's weird, tho...I tried SW_SHOWNORMAL as well and that didn't work...but going by the SDK it should...
Posted on 2004-05-13 23:25:54 by sirchess
invoke ShowWindow,hWin,SW_RESTORE


Hi sirchess


That worked too, thanks :alright:
Posted on 2004-05-14 00:41:00 by The SharK