Note that there are some explanatory texts on larger screens.

plurals
  1. PODisabling Scrollbars in WebKit (flat frame mode)
    primarykey
    data
    text
    <p>I'm embedding WebKit in a Windows C++ Application. I'm using the Cairo port. It works fine.</p> <p>I'd like to disable the scrollbars that appear when there's more data that the client area can display. Like the iPhone, the iPhone does not have scrollbars, scrolling is implemented differently.</p> <p>How can I disable the scrollbars programatically, in C++ (no Javascript hacks)?</p> <hr> <p><strong>Update:</strong></p> <p>I tried to call <code>HRESULT IWebFrame::setAllowsScrolling(BOOL flag)</code>. To get an IWebFrame interface, I called <code>HRESULT IWebView::mainFrame(IWebFrame **frame)</code>. This doesn't seem to work. Scrollbars still appear. What am I doing wrong? Is it not the main frame my main interest here?</p> <hr> <p><strong>Update:</strong></p> <p>I tried enabling flat frame mode like this:</p> <pre><code>IWebPreferences *Preferences; hr = pWebView-&gt;preferences(&amp;Preferences); if (FAILED(hr)) goto exit; IWebPreferencesPrivate *PrivatePreferences = 0; hr = Preferences-&gt;QueryInterface(IID_IWebPreferencesPrivate, (void **)&amp;PrivatePreferences); if (FAILED(hr)) goto exit; hr = PrivatePreferences-&gt;setFrameSetFlatteningEnabled(TRUE); if (FAILED(hr)) goto exit; </code></pre> <p>The code runs fine but nothing seems to happen. What am I doing wrong here?</p> <hr> <p><strong>Update:</strong></p> <p>I've received the suggestion that I might include WS_VSCROLL when creating the main window. This is not the case:</p> <pre><code>MainWindow = CreateWindow( WindowClass, WindowTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, iPhoneXRes + 16 + 20, iPhoneYres + 110, NULL, NULL, hInstance, NULL ); </code></pre> <p>Thanks,</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload