Possible copy paste error in FlatTabCtrl

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Pothead
Posts: 223
Joined: 2005-01-15 06:55

Possible copy paste error in FlatTabCtrl

Post by Pothead » 2006-02-01 09:56

In FlatTabCtrl.h:
DECLARE_FRAME_WND_CLASS_EX(GetWndClassName(), IDR_QUEUE, 0, COLOR_3DFACE);

this line looks very similar to

QueueFrame.h
DECLARE_FRAME_WND_CLASS_EX(_T("QueueFrame"), IDR_QUEUE, 0, COLOR_3DFACE);

While this looks like a copy paste oversight, (the dual usage of IDR_QUEUE), it maybe intentional. I just thought that FlatTabCtrl should have it's own IDR control. :?:

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-02-01 11:50

You can drill down to the WTL macro to see what that parameter ends up doing. Your intuition is probably right that it should have its own.

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-02-02 08:40

GargoyleMT wrote:You can drill down to the WTL macro to see what that parameter ends up doing.
Sorry for the stupid question. But how do i do that, and what to look for ?

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2006-02-02 11:56

Pothead wrote:But how do i do that, and what to look for ?
It's hit and miss, but the "Go to definition" context menu in VS usually takes you to the proper place. Not this time, though, for me. The macro is defined twice in atlframe.h - it looks like that parameter ends up in m_uCommonResourceID, which is used for automatically loading resources for a given window. Since we don't use resources for much, it doesn't look like it will has had an effect being wrong all this time. However, if we used them more, it looks like it would've been noticed much sooner (instantly, since the wrong resources would have been loaded).

Locked