View binding Support in Libraries - view

Will "View binding" be supported at some point? There doesn't seem to be a way of using it with the current libraries.

Related

What is msstdfmt.dll?

The file msstdfmt.dll is I believe supplied with Visual Basic 6 and is sometimes a dependency for deployment.
The copy on my PC includes the helpstring
Microsoft Data Formatting Object Library 6.0 (SP6)
which is not very informative.
What is this DLL for? What are the key functionalities that it provides?
According to Microsoft documentation:
The Microsoft Standard Data Formatting Object Library is required for
controls that implement a DataFormat property. An Application Error
occurs when a control makes an attempt to use the DataFormat property
and the Microsoft Standard Data Formatting Object Library is not
registered. Controls that implement a DataFormat property include, but
are not limited to, the following:
CheckBox, ComboBox, Image, Label, ListBox, PictureBox, TextBox,
ImageCombo, MonthView, DTPicker, Calendar, DataCombo, DataList,
DBCombo, DBList, MaskEdBox, RichTextBox.
It is used pretty extensively for data formatting.
It gets used implicitly with many databound controls and when you create databound UserControls or datasource UserControls and Classes. Instances of the StdDataFormat object it provides can also be used explicitly, either for direct use in code or even assigned to an ADO Field object's DataFormat property.
It is a pretty fundamental library for any VB6 program that is not written in "Let's pretend we are writing QBasic" i.e. Dark World scripting mode. Egad, you may as well be using stone knives and bearskins (a.k.a. Python).

VB6 licensing for controls?

In the components section I selected a IMAGE VIEWER ACTIVEX CONTROL, which is a third party component. I tried to use it in my application, however, whenever I click on the object in the TOOLBOX window and drag it to my form, I get this message...
**License information for this component not found. You do not have an appropriate license to use this functionality in the design environment.**
Now the thing is, i actually do have a license for this component. Its in the folder with all my forms and modules, its titled imageviewer.lic
It seems as though the license is there, it does not get applied to the image viewer control. Not sure how to go about resolving this. Any ideas?

External Object placeholders in Xcode's Interface Builder are missing

If I remember correctly, it use to be possible to add external object placeholders to a NIB in interface builder. This was used to add reference to existing instances of objects that the NIB doesn't create but need to be referenced by other objects in Interface Builder. Similar to "File's owner" and Application objects.
I also found some mention in older SO questions of this technique, for example here
I am using Xcode 5.0.1 on Mavericks and there is no trace of these "External Objects" in interface builder. It seems that it is not possible to add anything to the placeholders anymore. I went through Xcode's release notes since Xcode 4.0 and there is no mention of this being removed (although there are few mentions of dragging placeholder, whatever that means).
So, any idea if this was intentionally removed? A bug? Is there any workaround or replacement for this feature?
Open the project which has already used external object, you will find 'external object' in the interface builder. So I guess the external object may be deprecated and not appear by default.
For an alternative way, you can use 'object' instead.

Binding UserControl unload event to ViewModel

I'm reasonable new to MVVM and have a usercontrol as my View.
I'd like to Bind the "unload" event of that control to a method in my ViewModel.
To clean up stuff when the control is shutting down.
My search so far has only come up with xamples that require you to include some kind of toolkit or libraries from expression blend SDK. I just want to use he generic .net 4.1 libraries.
Can some one show me how to accomplish this ?
I've always used the code shown here to create an AttachedCommandBehavior. It doesn't require any extra libraries and can be used like this:
<local:MyControl
local:CommandBehavior.Event="Unloaded"
local:CommandBehavior.Command="{Binding ViewModelUnloadedCommand}" />

How can I filter by file type in an IExplorerBrowser in Windows 7 Libraries?

I've created an instance of IExplorerBrowser in my code to create a custom I/O view in one of my dialogs. I've implemented the IServiceProvider and ICommDlgBrowser interfaces in my host class. I use the IExplorerBrowser::BrowseToIDList method to fill the view.
I would like to filter the file types displayed (ex. only PNG files). If I call BrowseToIDList with FOLDERID_Pictures (i.e. "My Pictures") I can use the ICommDlgBrowser::IncludeObject method or IFolderFilter::ShouldShow to restrict which files I allow to be displayed. However, if I browse to the Picture Library on Windows 7 (FOLDERID_PicturesLibrary), neither ICommDlgBrowser::IncludeObject nor IFolderFilter::ShouldShow are ever called.
Is there some limitation to filtering files in libraries on Win7 that I'm unaware of? Perhaps I'm missing an interface or maybe I've specified the wrong flag somewhere.
Any ideas would be greatly appreciated.
I've had a chance to research this further, including asking a few questions to some Microsoft developers. It would appear, unfortunately, that filtering does not work with query backed views (i.e. Libraries).
An alternative to my approach would be to use the Common Item Dialog with application added controls (via IFileDialogCustomize).
(http://msdn.microsoft.com/en-us/library/bb776913(VS.85).aspx)
In my specific case, I'm unable to use a Common Item Dialog, but I thought it might be worthwhile to post this information here for future reference.
If in the future I find any way to filter an IExplorerBrowser control, I'll post that back here too.
I encountered this issue myself.
Yet I have investigated it a little bit further. IExplorerBrowser creates (on my Windows 7 x64 machine) window of ExplorerBrowserControl class. Which itself creates a window of DUIViewWndClassName class. And the very same window (DUIViewWndClassName) is used as a control by dialog created by IFileOpenDialog. Even window procedures are same so there is no subclassing (but I haven't checked each and every subwindow of that control).
And file dialogs are able to filter by file type even in the library folders. So I guess the IExplorerBrowser (or the control it uses) does allow that only Microsoft does not share knowledge how to do that. Or if it does then its somewhat hidden knowledge.
But I got it with IFolderFilterSite (interface supported by IExplorerBrowser from CLSID_ExplorerBrowser). IFolderFilter::ShouldShow isn't called in such cases for library folders. I wasn't able to get ICommDlgBrowser::IncludeObject called (even if I didn't set any IFolderFilter).
EDIT: I managed to get ICommDlgBrowser::IncludeObject called. Somehow I forgot that I have to provide ICommDlgBrowser through IServiceProvider::QueryService rather than through IUnknown::QueryInterface. But still ICommDlgBrowser::IncludeObject is not called for library folders.
I tried using IShellFolderViewDual3->FilterView().
But it's search results.
Thank you.
IShellView *pShellView;
IDispatch *pDSFV;
IShellFolderViewDual3 *pSFVD3;
m_pExplorerBrowser->GetCurrentView(IID_PPV_ARGS(&pShellView));
pShellView->GetItemObject(SVGIO_BACKGROUND, IID_PPV_ARGS(&pDSFV));
pDSFV->QueryInterface(IID_PPV_ARGS(&pSFVD3));
pSFVD3->FilterView(bstrVal);

Resources