Disable browser controls in CEF - winapi

Just a quick question.
I saw some pictures of chromium embedded (CEF) implementation in Win32 and there is everywhere those browser buttons "Back" "Forward" "reload" and address bar (http://img300.imageshack.us/img300/6443/acidc.png).
Question is: Is it part of win32 application or part of CEF itself, and before I start to dig in CEF i need to know can I turn off all those buttons and use CEF only to show a window with web page in it, without any controls? (or make adress bar read only and hide all other controls).
Want to use CEF because chromium engine fast and supports all modern technologies.

You need to modify SetNavState inside client handler implementation.
Also, for the context menu, you need to implement menu handler method OnBeforeMenu to enable/disable the Back/forward as well.

Navigation buttons and address bar it is part of cefclient sample application, not of browser itself.

Related

Call indicator bar is not responding for audio and video call

I have implemented Twilio voice kit successfully in the application.
I am not able to move in the application from call indicator. Also, I am not able to see green bar on other application screen when user moves from call screen. I have added custom view in navigation bar, but it's not much responsive.
I have following doubts for the same.
Is there any default property which I need to enable to display
native call indicator in the application?
Do I need to put a custom
view as I have done? If yes then what will be the best approach to do
it?
Is there any alternative to display custom call indicator inside
the application rather than adding view in navigation bar?
Any help will be appreciated.
Thank you.
As far as I know, CallKit framework does not have any API for you to use to display their native UI regarding the calls. The green indicator bar is shown if you have an active VoIP call and your app is running in background.
By tapping on it it will just open your VoIP app.
The best approach is to use a custom-built UIView, placed on a separate UIWindow that has the same level as the system's status bar and add a tap gesture on it to achieve what the native green bar is doing. Also, you can even add the animation that fades in and out a label to create the same experience as the native green bar.

web browser engine to embed in win32 program

I need to put in simple Win32 program kind of ability to view web pages. It must be just window with page in it, no browser adress bars or other elements, just working web page in win32 window without any standart browser elements.
It seems that i need some kind of project, that gives me some way to embed chromium engine (chromium most likely) in to win32 api, and, obviously, give the full controls over the messages and other stuff that going to that "browser" window. I was looking at CEF project http://code.google.com/p/chromiumembedded/ , but will it fit, or any other suggestions?
My (unfortunate) suggestion is to use IWebBrowser2 if you just want to use the Internet Explorer control.
Example can be seen here:
http://www.codeproject.com/Articles/16559/Launch-and-control-MSIE-using-IWebBrowser2

How to disable "Open in external viewer" and "Download" menu automatically showed from webview when a pdf is loaded?

I want disable the "open" end "download" functionality from this menu in cocoa WebView, or alternatively disable entire menu.
(source: federicocappelli.net)
There's a slim chance that if you implement a WebUIDelegate whose implementation of webView:contextMenuItemsForElement:defaultMenuItems: filters out WebMenuItemTagOpenWithDefaultApplication and WebMenuItemTagDownloadImageToDisk then that would prevent the web view from showing those two options in the overlay.
Otherwise, you can try subclassing WebView and overriding -mouseMoved: to swallow those events. That might interfere with normal functioning, though.
Or maybe you can override -addTrackingArea: to prevent the adding of whatever tracking area is used to show the overlay.

How to add an application bar to a user control in wp7

I have built a wizard style user control that lets you add stackpanel based pages and flick between them.
I would like to add an application bar as part of the user control with next and previous buttons that enable/disable based on page displayed etc.
Application bar appears to be an attached property of PhoneApplicationPage. I have tried referencing Microsoft.Phone.Shell but get invalid type.
Any ideas how I can add it to my user control?
Application bar is such a pain in the a**. This control is not a Silverlight one but a native one. Maybe you can be more lucky with this solution:
http://blog.humann.info/post/2010/08/27/How-to-have-binding-on-the-ApplicationBar.aspx
The ApplicationBar is a service that is provided by the operating system, i.e. not part of the Framework, and can only be used at the page-level, not in your UserControl. In addition, the ApplicationBar does not support regular bindings as you've seen. As mentioned above there are a number of solutions that provide workarounds for this problem.
Alternatively, you could use the ApplicationBarButtonCommand and ApplicationBarButtonNavigation behaviors from the Silverlight Windows Phone Toolkit. It's a simple enough task to create your ApplicationBarMenuCommand if you need one.

Custom Painted Controls

We need to automate GUI testing of an application developed in Win32 API. Developer's have created this application by custom painted controls. They have controls which look like Grid, Buttons etc., but they are not basic Windows controls.
What is custom painted controls? and how we can test these controls?
Test it just like any other UI: Not at all. Move all code out of the callbacks into the application layer where your unit tests can execute them just like any other method.
Rationale: There is little point in testing whether "button.activate()" works; you want to know whether the your code behind the button callback works.
If you need to know whether the correct dialogs, etc., are opened, see my blog: Testing the Impossible: User Dialogs
Have the developers added support for accessibility using IAccessible? If they have, you can use active accessibility to navigate through the controls and test them that way.
If they haven't, open a bug that says that their controls can't be use by disabled people (who need a screen reader or other accessibility aid).
Once they fix that bug, you can use whatever mechanism they added to their controls to allow them to be used by screen readers and other accessibility aids to test their UI.

Resources