Questions tagged [wtl]

The Windows Template Library (WTL) is an open source, object-oriented C++ template library for Win32 development. It is a lightweight alternative to the Microsoft Foundation Classes (MFC).

Sourceforge site - this is where to get the latest WTL download

MSDN Articles - February 2013 - a series of articles using WTL with . WIC Explorer

Codeproject - Particularly Michael Dunn's Series of articles

Developmentor One Two - documentation

Bjarke Viskoe - WTL applications with source code

Yahoo mailing list - (requires login) official WTL community, replicated on Gmane*

WTL works with & including Community Edition and previous professional and above versions, on all windows versions

*The Gmane link is currently unavailable, see http://gmane.org/about/

237 questions
3
votes
2 answers

Should I be using SendDlgItemMessage or is there a wrapper for this in WTL?

I added a Listbox control to a dialog resource called IDC_LIST1. Should I be interacting with this control using SendDlgItemMessage(), or is there a better way with WTL? Here are my event handlers. It is nothing fancy yet! LRESULT OnAddItem(WORD…
WTLNewbie
  • 193
  • 5
3
votes
1 answer

What is the proper use of WTL CIdleHandler?

I'm trying to learn WTL / Win32 programming, and I don't quite understand the design of the CIdleHandler mixin class. For WTL 9.1, The CMessageLoop code is as follows (from atlapp.h): for(;;) { while(bDoIdle && !::PeekMessage(&m_msg,…
Dragontamer5788
  • 1,957
  • 1
  • 12
  • 20
3
votes
3 answers

flicker free tab control with WS_EX_COMPOSITED

I have a VS2008 C++ application for Windows XP SP3 developed using WTL 8.1. My application contains a tab control that flickers when the application border is resized. My window hierarchy looks like this: CFrameWindowImpl …
PaulH
  • 7,759
  • 8
  • 66
  • 143
3
votes
1 answer

Getting alpha blending to work with CImageList

There are several other questions that are very similar to this that I have come across: Is it possible to create a CImageList with alpha blending transparency? Transparent images in ImageLists for ListViews ImageList Transparency on Listviews? I…
Murrgon
  • 375
  • 4
  • 13
3
votes
1 answer

Mirrored text when changing a combobox RTL style

I'm trying to create a dynamic dialog, which can be made RTL depending on the language. But I have the following issue: whenever I change the RTL style of the combo box, the text comes up reversed. I tried using functions such as InvalidateRect,…
Paul
  • 6,061
  • 6
  • 39
  • 70
3
votes
3 answers

How to diagnose Access Violation on application exit

I have an application that I'm trying to debug a crash in. However, it is difficult to detect the problem for a few reasons: The crash happens at shutdown, meaning the offending code isn't on the stack The crash only happens in release builds,…
FryGuy
  • 8,614
  • 3
  • 33
  • 47
3
votes
1 answer

How do I add a menubar to my WTL dialog window?

I am trying to add a menubar I created in my resource to a dialog from my resource, but I can't quite figure out how to. I searched a lot of guides on that, but they all seem to be working only with _Module which seems to be a very old relic…
Sossenbinder
  • 4,852
  • 5
  • 35
  • 78
3
votes
1 answer

How do I use WTL::CHyperLink?

I am trying to use WTL::CHyperLink in order to display a clickable link on my application. According to this article, I need to attach it to a Static Text control. So, in my GUI, I have now created a static text control with an ID of IDC_LINK In my…
Sossenbinder
  • 4,852
  • 5
  • 35
  • 78
3
votes
1 answer

Where do I put the code to initialize my controls?

I have now tried several times to find a place where I can insert a code part which basically only adds a column to a control I have in my dialog: void MusicPlayerDialog::InitList() { m_trackList.InsertColumn(0, "Tracks"); …
Sossenbinder
  • 4,852
  • 5
  • 35
  • 78
3
votes
1 answer

Is COM a requirement for WTL?

In every WTL example, CoInitialize is called as the first function of WinMain. I know that WTL is based on ATL, which is closely related to COM, but as I see it, a WTL program can easily not use any COM code (can't it?). What adds to the confusion…
Paul
  • 6,061
  • 6
  • 39
  • 70
3
votes
1 answer

How do I make a window that automatically resizes with its parent

I'm trying to create a child window that always fills its parent client area and is always the same size and position. My temptation is to call GetWindowLongPtr on the parent, hook its window proc and intercept the WM_SIZE and WM_MOVE messages and…
cppguy
  • 3,611
  • 2
  • 21
  • 36
3
votes
2 answers

PtInRect vs child windows

I've seen cases where people use DrawFrameControl along with PtInRect (where the mouse position is tested to the rectangle of the frame control), to simulate the effect of having a control (like a button). Why would you want to do this, rather than…
Midas
  • 7,012
  • 5
  • 34
  • 52
3
votes
1 answer

WTL how to use 2 custom-draw CListViewCtr in the same window

How can be CHAIN_MSG_MAP_MEMBERused for two members ? The example below works fine with a single listview and a single CHAIN_MSG_MAP_MEMBER. With both I have a crash. class CMainFrame : public CFrameWindowImpl, public…
cprogrammer
  • 5,503
  • 3
  • 36
  • 56
3
votes
2 answers

TreeView with items that have nodes icons and without icons

I have a TreeView control in a Windows C++ application that has an ImageList set. I am trying to insert an node that does not have icon (without TVIF_IMAGE flag) but the icon is still displayed. TVINSERTSTRUCT tvis = { 0 }; tvis.hParent =…
vlg789
  • 751
  • 6
  • 20
3
votes
2 answers

IWebBrowser2 Ctrl + C and other shortcuts support

It seems I've got not a trivial problem. I hook my own window into IE main window. My window is derived from WTL's CWindowImpl and hosts IWebBrowers2 control, which shows some content. IWebBrowser2 shows html with editbox where…
nicolausYes
  • 633
  • 8
  • 33
1 2
3
15 16