I have a C++ Visual Studio 2008 Windows Mobile 6.5 application that uses a tab control. I've noticed that depending on how careful you are with the stylus, when using the tab control you can accidentally re-order the tabs. It's difficult to do deliberately, but it's very easy to do when you're not trying. I assume this is a new "feature" of Windows Mobile 6.5 as it doesn't happen in Windows Mobile 6.1 with the same code.
Is there a window style or something I can set that will lock the tab order such that people don't accidentally re-arrange them?
Also, is there an MSDN page that describes this behavior and how it is supposed to work? I've looked, but have come up empty.
Thanks,
PaulH
Turns out it is a feature of the WTL tab class I was using. I ended up subclassing it and removing the tab reordering feature.
-PaulH
Related
I developed app in mFC using vs2008 and MFC Feature pack 2008. its look and feel is like 2007 office style. Now i want app look and feel like office 2010.
Will you explain me how to do it?
The easiest way is to upgrade to Visual Studio 2010, which provides a "Windows 7" style for the ribbon control. This style is supposed to simulate that native ribbon control that is used in Windows 7 applications like Paint and Wordpad. (Note that a slight modification to the wizard-generated code is currently necessary, as described here on Microsoft Connect.) Presumably, this style also looks like the one used in Office 2010, although I can't say for sure as I haven't given Microsoft all of my money yet.
Decide for yourself:
Alternatively, you could just use the native ribbon control yourself. There's a sample project here:
Windows 7 Ribbon: The Time Has Come, Your Win32 Application Will Change. But if you've already done a lot of work laying out the ribbon in VS 2008, this probably isn't a very compelling option.
Lesson: There's a hefty price to be paid for being on the bleeding edge. If this isn't exactly the same look that you're hoping to emulate, you may very well be out of luck. If your design goals amount to copying what the Office team does, you're going to be quite a busy little bee: toolbars are their absolute favorite thing to reinvent.
EDIT: Looks like you might not be completely out of luck after all. BCGSoft (the company that Microsoft bought the ribbon control from in the first place for the MFC Feature Pack) has released a library that attempts to simulate the Office 2010 experience in several different ways. Throw money at them here.
My team has spent a long time developing a nice UI using the ribbon included in the VS2008 MFC Feature Pack.
Now that Windows 7 is out and the look and feel of the ribbon has changed, my application looks out of date already, and it hasn't even been released yet :/
I want the look and feel of the Windows 7 ribbon ("scenic ribbon") ideally without changing anything - does anyone know whether there will be an update to the feature pack which will solve this?
I can't move to using the Windows 7 SDK ribbon, because I need to support XP, and the 7 SDK only supports 7 and Vista.
The only alternative I can think of is to go for a 3rd party library such as BCGControlBar Pro or Prof-UIS Elegant Ribbon, both of which I don't mind paying for but it's the amount of rework that's the issue (presumably the BCG one would be the easiest to migrate to, as the MFC Feature Pack ribbon is based on that one).
This blog shows that in VS2010 the MFC ribbon will have a "Windows 7" style.
So I guess I just need to wait for VS2010. Result!
I have a derived CMFCListCtrl which I can used group by and sort by fine via a contect menu.
However when group by is being used and I select a column to sort by (by clicking on the coloumn header) the arrow changes but the items are not sorted, I don't get my 'onsortby' message triggered either, any ideas?
I'm on XP is that the problem.
Thanks
I had exactly the same problem when I was using Windows XP on my old computer.
Switching to a new computer with Windows 7 solved this issue. So I can cofirm that it's related to XP.
I think XP may be the problem and that list control grouping requires Vista or higher. How do you have _WIN32_WINNT defined?
There is limited list control grouping available in XP: Codeproject
See Windows Vista Control Enhancements from MSDN Magazine.
What experience have you had with introducing a Ribbon style control to legacy MFC applications?
I know it exists in the new VC2008 Feature Pack, but changing compilers from VC2005 is a big deal for our source base and integration to our environment, Intel FORTRAN, ClearCase, many 3rd libraries.
There are quiet a few different commerical implementations, most focusing on C#/VB .NET, and only a few for native C++ MFC.
I have read all the usual reviews found by Google most are quiet old now, so I am interested to here from people who have actually done it, been through the pain barrier, released a legacy application with VC2005 and a Ribbon UI.
We currently use a very old version of Stingray Objective Toolkit to provide our MFC extensions like customizable toolbars and docking windows etc.
Any one used Prof-UIS, compared to the other commercial ones its relatively cheap, unlimited developer licensing is a 10th the cost of the others.
Are there any free, open source or L-GPL'd ones available?
In my projects I'm using the MFC Feature Pack in Visual Studio 2008, which is based on code from BCGSoft. Their BCGControlBar Library Professional Edition includes a ribbon control and is compatible with Visual Studio 2005.
I'm not aware of any open source ribbon control libraries for C++, though.
We use Codejock. It's not cheap, but I guess I've come to find that good controls usually are :-). They are fairly responsive in the tech support department (although we haven't had need to use that recently). We are buidling a whole suite of tools using these controls and have always had what we've needed, including the ability build the office 2007 style ribbon.
Please be aware that you need a license from Microsoft to use the ribbon control in your application. They give it for free as long as you don't write a software to compete with Word or other Office software.
Take a look at this link: Office UI Licensing.
People are generally not happy with Microsoft for this: The evil of the Office UI ribbon license.
We implemented a ribbon in our app due to pressure to have the latest/flashiest looking UI. It looks good, but the usability isn't good compared to using a plain toolbar!
To adhere to Microsoft's License to use the ribbon, you have to stick to their guidlines on how it should be used. Eg.. only the user can change ribbon tabs, you can't do it programatically except when switching to a context tab. All these limitations mean that the ribbon only applies to applications that are definitely document-centric. If you're app isn't document-centric, don't think you can just drop a ribbon in to replace a menu/toolbar driven system without giving it a lot of thought about how everything is going to fit together.
I see many user interface control libraries for .NET, but where can I get similar stuff for win32 using simply C/C++?
Things like prettier buttons, dials, listviews, graphs, etc.
Seems every Win32 programmers' right of passage is to end up writing his own collection. :/
No MFC controls please. I only do pure C/C++. And with that said, I also don't feel like adding a multi-megabyte framework to my application just so that I can have a prettier button.
I apologize for leaving out one tiny detail, and that is that my development is for Windows Mobile.
So manifest files are out.
I just notice how many developer companies have gone crazy with making pretty looking .NET components and wondered where the equivalent C/C++ Win32 components have gone?
I read about how many people ended up writing their own gradient button class, etc. So you would think that there would be some commercial classes for this stuff. It's just weird.
I'll take a closer look at QT and investigate its GUI support for such things. This is the challenge when you're the one man in your own uISV. No other developers to help you "get things done".
I've used Trolltech's Qt framework in the past and had great success with it:
In addition, it's also cross-platform, so in theory you can target Win, Mac, & Linux (provided you don't do anything platform-specific in the rest of your code, of course ;) )
Edit: I notice that you're targeting Windows Mobile; that definitely adds to Qt's strength, as its cross-platform support extends to WinCE and Embedded Linux as well.
The Code Project has lots of UI controls for C/C++
Most of them are focussed on MFC or WTL but there are some that are pure Win32.
As an aside if you're not using a framework, you really should consider WTL over pure Win32. It's low overhead and about a million times more productive.
For prettier buttons, etc., if you aren't already doing it, embed an application manifest so that your program is linked to version 6 of the common controls library. Doing so will get you the Windows XP- or Vista-styled versions of the standard Windows controls.
If you want types of controls beyond what Windows offers natively, you'll likely have to either write it yourself or be more specific about what kind of control you are looking for.
I you don't mind using the MFC libraries you should try the Visual C++ 2008 Feature Pack
Stingray
CodeJock - Toolkit Pro for MFC/ C++
The MFC feature pack is derived from BCGSoft components.
Using winAPI's you can do almost anything you want and really fast too. It takes some time to figure it out but it works. Go to MSDN, lookup MessageBox(), check out DialogBox() and go from there.
I personally do not care for MFC by the way. If you want to use an MFC like approach I'd recommend Borland's C++ Builder. Pretty old but still very usefull I think.