wtl

What is Microsoft using as the data type for Unicode Strings?

I am in the process of learning C++ and came across an article on the MSDN here: http://msdn.microsoft.com/en-us/magazine/dd861344.aspx In the first code example the one line of code which my question relates to is the following: VERIFY(SetWindowText(L"Direct2D Sample")); More specifically that L prefix. I had a little read up, and...

Visual Studio 2008 c++ conditional template inheritance bug?

I'm in the process of porting a C++/WTL project from Visual Studio 2005 to VS 2008. One of the project configurations is a unit-testing build, which defines the preprocessor symbol UNIT_TEST. In order to get my WTL classes into my test harness, I made a CFakeWindow class that stubs all the CWindow methods. Then in my stdafx.h file, I do...

Why is my owner-drawn combobox shown empty?

I'm subclassing a WTL combobox and I'm owner-drawing the items of the combobox. The control has the attributes CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWVARIABLE and I'm using the mix-in class COwnerDraw to implement DrawItem() and MeasureItem(). When the drop down list is down, the items are drawn correctly. However when the drop...

how to add windows 7 ribbons to a WTL app

Has anybody tried to use the native windows 7 ribbon control in a WTL app? I mean the control behind: #include <UIRibbon.h> or an example for the MFC. (i don't talk about the ribbons from the MFC Feature Pack!) --- Sven ...

Correctly handling custom messages using WTL

I've written a multi-threaded WTL util to stress test an in-house service. Comms threads signal to the main thread that they've quit, so the main thread can delete their corresponding object. They make the signal as so: PostThreadMessage(m_dwParentThreadId, WM_THREADQUIT, 1, m_dwNetThreadId); My problem is how to deal with the custo...

default WM_DESTROY not properly cleaning up child windows

I have a WTL 8.0 SDI application for Windows Mobile 5. In this contrived example below, I create a view, destroy it, then re-create it. But, when it's re-created assertions in the WM_INITDIALOG handler fail because the control's HWND isn't valid. I note that I can fix this by handling WM_DESTROY in CMyView and manually destroying every ...

ComboBoxEx32 (CComboBoxEx) keyboard behaviour

I have a WTL application that uses an extended combobox control (the Win32 class ComboBoxEx32) with the CBS_DROPDOWNLIST style. It works well (I can have images against each item in the box) but the keyboard behaviour is different to a normal combobox - pressing a key will not jump to the first item in the combo that starts with that le...

Calculating a gradient fill's start and end colours given a base colour

I have a WTL C++ application and I want the user to be able to select different colours for some of the UI elements and apply a gradient fill using the GradientFill API call. However, instead of letting the user pick the start and end colours for the gradient, I'd like them to be able to select a 'base' colour and for my application to ...

How can I install WTL 8.0 Project Wizards in VS 2010?

I've downloaded the WTL 8.0 package and come to find the scripts to install App Wizards don't support VS 2010. Does anyone know of updates scripts to support installation in VS 2010? Thank you! ...

WM_POWERBROADCAST handler for CMainDlg in ATL app not invoked

I have an ATL app where I want to handle WM_POWERBROADCAST. I have a CMainDlg (CAxDialogImpl) in whose MSG_MAP I defined the handler. BEGIN_MSG_MAP(CMainDlg) ... MESSAGE_HANDLER(WM_POWERBROADCAST, OnPowerChange) ... END_MSG_MAP() However, the handler isn't invoked when I do things that should invoke it, for instance change...

How to create something like Expander control in WPF using only WinAPI (ATL/WTL)?

Hi! I am newbie in English, sorry :) How to create something like Expander control in WPF using only WinAPI (ATL/WTL)? Are some experince avaliable? Thank for answers! ...

WTL CSplitterWindow cannot create more than 3 instances?

Hello all, I'm using WTL to create a window containing many splitted panes. The following will be the result. --------------------------- | | | | | | | | | | | | | |-------------------- | | | | | | | | --------------------------- T...

Printing on console WIN32/WTL.

I am developing WTL GUI application. I want to print something on console. How to enable console printing in win32/WTL application. ...

WTL Child window event handling

I am developing window application in that I am having 2 child windows on left and right side. I want to handle input events for both windows separately. How to achieve it? My code: class EditorWindow : public DxWindow { public: CSplitterWindow m_vSplit; CPaneContainer m_lPane; CPaneContainer m_rPane; PropertyDialog m...

Embed WTL App in ATL ActiveX control

Is there a way to somehow Embed a WTL destop application in ATL ActiveX (ie extension)? What I'm trying to achieve is to create an ActiveX control with office files Viewer. As a base I have a desktop WTL application (written some time ago) which uses OOo v3 API to display documents. I have created an ActiveX project, linked necessar...

Cannot change the height of a combo box in the VS Dialog Editor

Any combo box I create seems to be stuck at 12 dialog units in height. Microsoft's guidelines for spacing and sizing of controls in dialog boxes state that a combo box should be 14 dialog units high. I have even tried editing the resource file in notepad and recompiling in Visual Studio without opening the resource editor - but the com...

Handling wm_mousewheel message in WTL

I am trying to handle wm_mousewheel for my application. Code: BEGIN_MSG_MAP(DxWindow) MESSAGE_HANDLER(WM_MOUSEWHEEL, KeyHandler) END_MSG_MAP() . . . LRESULT DxWindow::KeyHandler( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { if(uMsg==wm_mousewheel) { //Perform task. } return 0; } But...

library for simple GUI appications

I tried to use WTL, but i couldn't make it to work on VS2008 Express, there is any other option? I would like to test if any, before recur to the plain API :/ need to be small and have no external dependencies Thanks in advance! ...

Is is possible to make a shaped, alpha-blended dialog?

I'm making a non-rectangular dialog, modelled over an image from Photoshop (the image is the background of the dialog, and the user will see trough the transparent part of the image). I'ts like a dashboard-style window for a media-app with a few custom-drawn controls. Most of the background-image is either opaque or 100% transparent - bu...

specify parent window in Windows Resource Script file(*.rc)

Hi, I'm looking for a method to specify parent window in *.rc file. In *.rc file, it contains the layout and controls of a dialog. Any new control added into it, will automatically become a child window of Dialog itself. But I want to add a custom draw window into dialog, and some other controls which has that "custom draw window" as ...