Hello! i have a link on a page to open in new window and the content of the page is centered on an image background with 400x200 pixels. So i want to deactivate the maximize button of the browser.
So do you know how to make a non-resizable window ?
Hello! i have a link on a page to open in new window and the content of the page is centered on an image background with 400x200 pixels. So i want to deactivate the maximize button of the browser.
So do you know how to make a non-resizable window ?
Its not much difficult. Remove the word resizable., ie, remove this: +',resizable' from the script in your page.
winprops = height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
you can also do resizable=no.
Ok, fair enough, even though I do not have that issue with the languages I am using. I guess a configuration parameter (e.g. RESIZE_MODAL_DIALOGS
true/false) would not really help, you may want to fix some pop-up windows but not others depending on the language.
And a parameter for each dialog would be over the top. I guess that users can always add resizable: false
in the source code (or whatever it needs to be, resizable : false does not seem to work).
If you want to work with nonresizable, nonmovable windows, insert this code into your project (SDI or MDI applications).
PHP Code:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (BaseClass::OnCreate(lpCreateStruct) == -1)
return -1;
// Do something
// Remove positions of menu
CMenu* pTopMenu = GetSystemMenu(FALSE);
if(pTopMenu != NULL)
{
pTopMenu -> RemoveMenu(SC_SIZE, MF_BYCOMMAND); //Size
pTopMenu -> RemoveMenu(SC_MOVE, MF_BYCOMMAND); //Move
pTopMenu -> RemoveMenu(SC_MAXIMIZE, MF_BYCOMMAND); //Maximize
}
return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !BaseClass::PreCreateWindow(cs) )
return FALSE;
// Create a window without max button and sizable border
cs.style &= ~(WS_MAXIMIZEBOX|WS_THICKFRAME);
return TRUE;
}
Bookmarks