WinJS 2.0 Repeater Paging - repeater

Does anyone know if the Paging control has Paging functionality.
The sample apps for win 8.1 did not contain such an example.
I can make a custom paging functionality ... but i wanted to know if there is an easier way.

If by "Paging control" you're referring to WinJS.UI.Pages.PageControl, then the answer is no. That control is set up to load a block of HTML into a page using DOM replacement, but doesn't provide anything more dynamic than that. The ListView is the only control that implements incremental loading behavior. So you'll need to do your own work.

Related

How to add support for printing into my C++ application

I have what seems like a simple task. I wrote a Windows application using C++. Now I need to add to it a capability to print forms -- nothing fancy, just plain text, with lines, tables, and simple graphics. Besides printing, a user needs to be able to preview on the screen all forms being printed.
Previously I was able to get away with this task by using an embedded Internet Explorer control and design all forms in HTML (which I like -- the HTML part.) But the problem comes with IE... hmm... I wish I had a nickel every time I heard that phrase :) Anyway, IE can print an HTML page but it does not provide any easy way for users of my software to customize page size, page margins, etc.
I spent a good deal of the last week trying to make IE Print Templates work with what I need ... but eventually failed. That stuff is very poorly documented and what I was able to do seems to randomly crash on me. So at this point I gave up on IE...
So my question to you -- is there a way to incorporate printing into my C++ program for the purposes like I described above?
If I remember correctly, printers have their own HDC, and you can draw on it. That'll work if have something simple. If you want to render HTML page using pure WinAPI, you're in big trouble.
I'd advise to abandon winapi and try GUI framework instead.
Qt 4(and 5, most likely) has text editor that can display rich text, layout engine for rich text, component that can display web pages. Read documentation a bit, and you will most likely find a way to render web page onto printer instead of screen. So far it looks like exactly what you would need.
Using Qt will add dependencies (20+ MB of DLLs for your project), but, IMO< it is a better idea than trying to use IE COM interfaces.
If you don't want to use Qt, you could try something like WebKIT, but I had some bad experiences with it, plus Qt might be just easier to use.
Additional info on printing: Printing with Qt.
Try searching for GDI, if you want to use win32 builtins.
Or use another toolkit like wxWidgets. Or consider writing to PDF with some library. Or let LaTeX do the heavy lifting - writing text files is easy. The LaTeX-way works as long as you don't want to modify your output depending on the layout (one Use-Case that doesn't work with LaTeX is the "balance" at the top/bottom of each page.)
Consider having your program generate XML files and using XSLT to render them into HTML.
By attaching stylesheets you will make it much easier to customize the presentation.

Document Mode menu functionality in Web Browser Control

I'm writing my own MFC app that uses WebBrowser control (uses IE9). I wonder how can I use the API similar for "the document mode menu" in IE Developer tools : http://msdn.microsoft.com/en-us/library/dd565626(en-us,VS.85).aspx#docModeMenu.
Especially I'm interested in the functionality described as:
"This command allows you to modify the chosen document mode of the current page without modifying the DOCTYPE or META tag in the source"
Is it feasible?
10x,
Guy
It's difficult to tell what you're asking for here, but it sounds like you want to programmatically set the Document Mode (Strict or Quisk) at runtime.
If this is correct, you can't! (At least, programmatically.) The closest thing you can get is to add a Windows registry key that specifies the conditions under which you want pages to load with particular Document Modes. Something like this:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl
\FEATURE_NATIVE_DOCUMENT_MODE]
"YourApp.exe"=dword:13880
Then, every time your application loads the WebBrowser control it will get access to this registry key and your control logic can decide what to do from there.
Hope this helps. Good luck!

Look for ways to enable printing from my C++/MFC application

Since time immemorial I've been trying to avoid printing from my Windows-based applications due to the lack of native support for it. Whenever absolutely necessary I was resorting to dynamically making a simple HTML layout and then opening it in a web browser with a short Java Script in it to pop up a printing dialog for a user. Now I need to find something more substantial.
Let me explain. I have a project that deals with medical charts and it has to be able to print into those charts (at specific locations) as well as print on to a Letter/A4 size page in general. It also has to provide a preview of what is being printed in a paged-view environment.
In light of that I was wondering what is available from MFC/C++ environment (not C#) in regarding to printing?
PS. I was thinking to look into the RTF format but that seems like quite a daunting task, so I was also wondering, is there any libraries/already written code that can allow to compose/view/print RTFs? If not, what else is out there that can provide printing support like I explained above?
"lack of native support"? It's been covered by Petzold since forever, and it's integrated straight into GDI. Compared to UNIX, it's a complete breeze. And MFC makes it even easier.
Anyway, here's how you do print preview with MFC, and here's how you subsequently print. Lots of links from there, and it's all straightforward. Printers are just another Device Context on which you can draw.
I always found it very convenient to generate PDF files from my MFC/C++ application, There are many libraries out there which enable easy creation of PDF files, preview functionality and so on (also open source). I'm using this (also handles RTF):
PDF Library
There is no support like you call a framework method with some parameters and the framework prints a document or the content of a window for you. You need to manually draw everything on the printing device context. So as already said, you might find it more convenient to use a PDF generator, but of course that depends on your application requirements.
Please try www.oxetta.com , it's a free report builder solution that easily integrates into a C/C++ application.

Browser Helper Object UI

I am a newbie working towards developing an IE extension that would appear as an overlay in certain webpages. I am getting started by creating a simple BHO in VS2008 (using C++), but I am wondering how UI may be incorporated within the project. Any ideas?
Just to give you an idea, I'm looking for overlays similar to what was developed by stickis
http://www.stickis.com/faq/
Thanks
You have two real options:
1> Inject your UI into the page as HTML.
2> Overlay your UI (using Windows graphics APIs) over top of the page.
Neither of these is super-simple, I'm afraid. Unfortunately, doing UI is usually the hardest part of building IE addons.
The key question is whether you need a BHO at all. Between context-menu extensions and IE8 Accelerators, you may find that you can let IE do all of the heavy lifting. See www.enhanceie.com/ie/dev.asp for more info.
Using CreateWIndowEx() was what I was looking for :)

Detect DOM modification in Internet Explorer

I am writing a Browser Helper Object for ie7, and I need to detect DOM modification (i.e. via AJAX).
So far I couldn't find any feasible solution.
You want to use IMarkupContainer2::CreateChangeLog.
The best thing I could recommend is the Internet Explorer Developer Toolbar which allow you to view changes in the DOM.