Results 1 to 4 of 4

Thread: Popup a non-resizable window

  1. #1
    Join Date
    Feb 2009
    Posts
    233

    Popup 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 ?

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Popup a non-resizeble 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.

  3. #3
    Join Date
    Feb 2009
    Posts
    266

    Re: Popup a non-resizeble window

    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).

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Popup a non-resizeble window

    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
      
    CMenupTopMenu GetSystemMenu(FALSE);
      if(
    pTopMenu != NULL)
      {
      
    pTopMenu -> RemoveMenu(SC_SIZEMF_BYCOMMAND);      //Size
      
    pTopMenu -> RemoveMenu(SC_MOVEMF_BYCOMMAND);      //Move
      
    pTopMenu -> RemoveMenu(SC_MAXIMIZEMF_BYCOMMAND);  //Maximize
      
    }

      return 
    0;
    }

    BOOL CMainFrame::PreCreateWindow(CREATESTRUCTcs)
    {
      if( !
    BaseClass::PreCreateWindow(cs) )
        return 
    FALSE;

      
    // Create a window without max button and sizable border
      
    cs.style &= ~(WS_MAXIMIZEBOX|WS_THICKFRAME);

      return 
    TRUE;


Similar Threads

  1. TWebBrowser popup window Problem (Delphi)
    By lucky3664 in forum Software Development
    Replies: 2
    Last Post: 06-03-2012, 11:25 AM
  2. How to Open Popup Window in Javascript?
    By Soumen in forum Software Development
    Replies: 4
    Last Post: 07-02-2010, 04:02 AM
  3. How to open Gmail account in a popup Window?
    By roodiii in forum Technology & Internet
    Replies: 5
    Last Post: 01-02-2010, 01:02 PM
  4. To open a popup window with no toolbar.
    By Zidaan in forum Software Development
    Replies: 2
    Last Post: 06-07-2009, 10:20 PM
  5. How to get a popup window using ajax?
    By khabi in forum Software Development
    Replies: 2
    Last Post: 29-06-2009, 06:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,925,713.54065 seconds with 16 queries