Fix: Correction to Zafirs article on CListView

840 byte By Cyril ZEKSER at 2007-11-15 22:05:08
The MFC tip of zafir Anjum on how to select an entire row works only,as describe, with CListCtrl derived classes.I found a astonishing sample in MSDEV Samples book which allow to useonly (!!) a CListView derived class (called CListViewEx) to do so,without any CListCtrl-derived class (or just in orde...

Visual Studio/Office 97 style Dockable Menu bar

397 byte By Jerry Tucker at 2007-11-15 22:05:09
I have created an MDI project and incorporated the classes supplied in the article "Visual Studio/Office 97 style Flat Toolbar and Dockable Menu bar" and the main menu does not appear. The popup menues are accessable via the keyboard shortcuts but the menu is gone. I believe I have made all the pr...

BUG: TransparentBlt doesnt work on printers

440 byte By Petr Novotny at 2007-11-15 22:05:10
Hi,please help me - I need some kind of fix to this problem.I have taken TransparentBlt source from this site; it works like charm when blitting to the display; however blitting to a printer (HP LJ 4, Postscript) does not work; the parts that should be transparent are printed out black instead!What...

bugs

476 byte By Chieu Luu at 2007-11-15 22:05:11
I am using CSizingTabCtrlBar from Dirk Clemens. first I click on the treeview, and then double click to make the bar floating or drag it to make it floating, click on the x button to close the window, the application window stops responding to mouse clicks. when the application close, get GPF. Is an...

CStringEX (leaks and bugs)

152 byte By Subrosa at 2007-11-15 22:05:12
The author of CStringEX should run Purify(memory checker) on CStringEx. It particularly complains about writing out of bounds in the Delete() function.

CListCtrl.GetItemData()

249 byte By Cagan at 2007-11-15 22:05:13
For a report-style CListCtrl, I use SetItemData() method to store some values, when I use GetItemData() I get 0 (zero) especially for the first item in the control whereas the real value has nothing to do with it.<br/>Any ideas?<br/>Thanks

BUG? TransparentBlt and DIBSections

486 byte By Petr Novotny at 2007-11-15 22:05:14
Hi,I went on testing TransparentBlt code from this site and I have found something quite strange:If the source bitmap going to TransparentBlt function is a DIBSection, the result is funny. It seems that the blt of source DC and mask DC (that one with SRCAND ROP) fucks up the colors of the DIBsection...

Auto Resizing Columns

266 byte By Martin at 2007-11-15 22:05:15
List column headings - When you double click the heading resize cursor the column auto resizes to the width of longest data item. However this doesn't work properly if any of the data item are in Bold type. Any ideas?<br/>Thanks in advance.<br/>Martin

Owner Drawn Menu with Icon

148 byte By M.Ezhil at 2007-11-15 22:05:16
In "Owner Drawn Menu with Icon",how to derive a class from CMenu.<br/>I was not able to create using ClassWizard.Should i create my own class?.

Visual Studio/Office 97 style Dockable Menu bar

90 byte By lee at 2007-11-15 22:05:17
TBN_HOTITEMCHANGE, TBDDRET_DEFAULT, LPNMTBHOTITEM : undeclared identifier<br/>Thanks.

CCoolMenuManager - Memory Leak

928 byte By Simon Clark at 2007-11-15 22:05:18
I have found that the CCoolMenuManager class leaks memory in an application with a standard MFC MRU on the "File" menu. The "ConvertMenu" function continually allocates memory at the "pmd = new CMyItemData;" statement for the MRU items in the list everytime the menu drops down.My guess is that when...

BUG: Resizing Property Pages

847 byte By Petr Novotny at 2007-11-15 22:05:19
Hi,after testing Zafir's code for resizing property pages, I came to this conclusion: For new versions of comctl32.dll it works like charm. However, for outdated versions of comctl32.dll (the one which is distributed with original Win95 installation - or the one which is distributed with Win32s...

BUG of DevStudio Example

194 byte By Alan at 2007-11-15 22:05:20
The propertysheet's member CTabControl seems not to support TCS_BOTTOM.<br/>The tab is on the top.<br/>What's wrong? Or I must update any files?<br/>Thanks<br/>Alan

BUG: MFCs support for Print Preview

655 byte By Abhijit A B at 2007-11-15 22:05:21
BUG in MFC's support for print preview =======================================We have created SDI application with support for print & printpreview, we are facing the following problem.When the print preview mode is invoked, set the focus on the close button on the dialog bar. Now press the spa...

BUG: Jakawan Ratiwanichs Multicolumn Combo

214 byte By Leow at 2007-11-15 22:05:22
The CJCombo::SetCurSel(int) seems to have a bug in it.<br/>I have a 2-column combo, when i do<br/>for (i= 0, i SetCurSel(i);<br/>some of the text in the 2nd column wasn't display.<br/>leow

MFC new() doesnt throw Exception in 2nd thread

583 byte By Mirko at 2007-11-15 22:05:23
Hi to All!We have problem concerning operator new in MFC application: If we use it in the main thread it correctly throws exception CMemoryException (if not enough mem available). But if we use it in a secondary thread, it simply returns zero.The second thread will be created inside a MFC DLL. When...

FIX: CFlatToolbar Bugs on Vertical drawing and Float/Dock change

1604 byte By Thierry SUPPLISSON at 2007-11-15 22:05:24
I experienced two little problems with the CFlatToolBar code when positioning vertically the toolbar. - the toolbar does not seem to take account of the separator width - the position of the first button next to the grip is incorrect when you moce the toolbar in the following position consecut...

BUG: Zafir->ListCtrl Sorting does not copy all data

194 byte By Craig at 2007-11-15 22:05:25
The listctrl sorting algo on this site seems to only move the text around, not the entire LV_ITEM. This is very noticable when you are using the lParam for each item. Is it possible to fix this?

Another MFC Print Preview bug?

750 byte By Andrew Phillips at 2007-11-15 22:05:26
In MFC print preview the scroll bar allows you to easily scroll through the pages to be printed. If you zoom in on part of the displayed page the scrollbars change to allow you to scroll the zoomed area around the page.When you zoom out again the scroll bars do not return to their former state. Yo...

BUG: CListCtrl: repaint missing

1325 byte By Udo Liess at 2007-11-15 22:05:27
Some days ago I posted a note about a problem with CListCtrl. But no reactions. Now I found out a little bit more about it.Here is the BUG:(I use WinNT 4.0, VC5)Create a MFC application as dialog based (MainDialog).Create a dialog resource (ChildDialog).Set dialog style to CHILD.Place a list control...

BUG?: CSplitterWnd Mouse Wheel

1859 byte By Dave Wilson at 2007-11-15 22:05:28
The function CSplitterWnd::OnMouseWheel asserts if _any_ pane in the splitteris not handled by a CScrollView-derived class. This looks like a bug to me;CSplitterWnd is meant to handle any CView class. Also, CScrollView itself assumes that if it is part of a splitter, then the splitter will handle t...

Owner drawn CListCtrl & DrawItem

151 byte By Ronan at 2007-11-15 22:05:29
I have followed the sample on creating an ownerdrawn CListCtrl but DrawItem is never called, lots of people on usenet have the same problem, any Ideas?

MFC Grid control with ComboBox

199 byte By Alan Copeland at 2007-11-15 22:05:30
I downloaded the sample project using the ComboBox in the MFC Grid Control. When I try to unzip it, Winzip gives the message "Cannot open file: does not appear to be a valid archive".<br/>Thanks

Tip : Updating Toolbar buttons on Modal Dialog

805 byte By Cyril ZEKSER at 2007-11-15 22:05:31
If you want to have the ON_UPDATE_CMD_UI called, just do the two following things :1. Derive you toolbar from CToolBar, to add the hanfdler for WM_IDLEUPDATECMDUI (as shown in MFC code for CFrameWnd) but, before calling the parent's function, cast the this pointer to CFrameWnd*,2. Override the...

BUG: Flat Owner Draw Buttons

566 byte By Paul Reynolds at 2007-11-15 22:05:32
The code for the flat owner drawn buttons does not work properly when using a bitmap. When the bitmap button is in a disabled state, no draw action isundertaken at all. A quick solution to this is to move the actual draw code contained in DrawItem (i.e. the else part of the if(!hBitmap)), and put it...

Q or BUG:Owner draw list control and CreateDragImage()

468 byte By Vytukas at 2007-11-15 22:05:33
I took src from dev-archive with owner draw list. Decided to add drag and drop feature and noticed that CreateDragImage() doesnt create correct image (Im getting empty image) if no image list attached to control. If there is image list CreateDragImage() creates only bitmap part and no text label pa...

BUG: Fake DevStudio Workspace Windows

509 byte By Imanol Crespo at 2007-11-15 22:05:34
I took src from dev-archive with resizable docking window by Mark Conway. Decided to add items to the fake DevStudio style Workspace window and notice that, if I expand a branch that contains strings not completely visible (because of the sizable window right margin), then select the string and try...

Missing Info: article on toolbars is incomplete

329 byte By Scott Finley at 2007-11-15 22:05:35
The article on this link http://www.dev-archive.com/toolbar/ctrls_in_tb.shtmlis incomplete. It cuts off right on the code that explains how to add checkboxes to the tool bar. If any one has sample code that does this, please passalong to my email address.thanks,Scott...

BUGS on CGridCtrl

173 byte By Mark Cheng at 2007-11-15 22:05:36
When delete row(rows) or col(cols) , there has memory leaks.<br/>The row and col cell object should be delete at first and then update<br/>the m_nRows and m_nCols.

Bug & Fix: CLongOperation class change text in panes

1351 byte By Marian Walter at 2007-11-15 22:05:37
I have found a little bug in CLongOperation class created by Klaus Gutter. When CLongOperation class is created, text in StatusBar's panes is moved to the left and text in left most pane is lost, till CLongOperation class exists.I have made this changes to fix tis problem in Visual C++ 5.0:1. i...

Fix Bug : IE4.0 Class for MFC

707 byte By Eric Hu at 2007-11-15 22:05:38
>>There are several bugs and omissions on the code I send to the MFC Programmer's Sourcebook. When> you try to compile any code that uses these classes you get a few errors. Some are my fault, some not. I >have already send an updated version of the code to zafir, but as far as I kn...

BUG: Owner Drawn Menu with Icons(4) (automatically uses toolbar res)

351 byte By Paul Reynolds at 2007-11-15 22:05:39
I have come across two small draw bugs with this otherwise excellent class:1. If a menu item is a pop-up menu, then the space to the left of the text is different to the space for non-popup menu items.2. I seem to have an eratic display of checks...some of my apps are fine...some of them do not disp...

Triangular Buttons works on NT Only

617 byte By Liam Murray at 2007-11-15 22:05:40
The triangular button demo by Janus Kjempff has an NT-only API that results in the code not working on Windows 95:In CTriangleButton::DrawItem() a pen is created like this:CPen FocusPen(PS_COSMETIC | PS_ALTERNATE, 1, &logbrush);According to the documentation for ExtCreatePen(), PS_ALTERNATE is not s...

BUGs & partial FIXes: CListCtrl row highlighting and editable subitems

1279 byte By Petr Novotny at 2007-11-15 22:05:41
Hi,in adition to recent fix found here, I have found a few more bugs with row highlighting (and editable subitems) and I could fix only some of them.1. (NOT FIXED) In HIGHLIGHT_ALLCOLUMNS mode, after manual adjusting the column widths, the contents of listview becomes messy. It seems the whole contr...

Q: Visual Studio/Office 97 style Dockable Menu bar

129 byte By Igor Rikalo at 2007-11-15 22:05:42
I could not get pop-up menus to work (none were displayed in main menubar).<br/>Any comments?<br/>Thanks.<br/>Igor

FIX: Owner Drawn Menu with Icons(4) (automatically uses toolbar res)

1242 byte By Frederic J.F. Estrampes at 2007-11-15 22:05:43
I have noticed a small problem with the 3D display of disabled accelerator keys. The 3D look of the text after the tab (accelerator key) has a wrong offset.This can be easily fixed by adding one line of code to the DrawItem function (see below).bool CMenuSpawn::DrawItem(LPDRAWITEMSTRUCT lp){...........

BUG : Open File with Bitmap Preview

552 byte By Sascha at 2007-11-15 22:05:44
Problem : Using the sample "Open File with Bitmap Preview" causes repaints of the whole desktop all the times. Fix : I fixed it with adding the follwing line :#define IDC_BMP (5001)and by replacing the follwing two lines case WM_NOTIFY : ... HWND wnd = GetDlgItem(hdlg, IDC_PREVIEW);...

cj60lib

411 byte By Alex Evans at 2007-11-15 22:05:45
Hello there,I have downloaded the library earlier today (28th January 99) and I am using Microsoft Visual C++ 5.0 with the latest platform SDK as suggested but I get a fatal error from KERNEL32.LIB LNK1106 invalid file or disk full...My KERNEL32.LIB is 181,876 bytes dated 8/8/98Any one can help me w...

ATL bug

1315 byte By Robert Bielik at 2007-11-15 22:05:46
Hi Chris and everyone,Hope this one doesn't qualify as off topic ;) I found a bug, or what I think is a bug, in atlhost.h in the AtlAxWindowProc function. In response to the WM_CREATE message, the dialogbox (derived from CAxDialogImpl) will be created with it's controls. Now, as long as th...

BUG? HTMLHelp in modeless property sheet

256 byte By Andreas Jger at 2007-11-15 22:05:47
I used HTML help in a property page of a modeless property sheet. When closing the application, a GPF occurs (read in memory 0x0000000). When not clicking on the help page (ie OnInitDialog is not called), everything wents OK. What goes wrong in my project?

Office 97 style menu/customizable toolbar sample

714 byte By Bozo at 2007-11-15 22:05:48
When using the precompiled DLL file and sample,I get 2 bad behaviours:1)MenuThe menu DOES NOT APPEAR AT ALL if the window is NOT maximized !That means the menu appears (and works well) only if the windowis maximized.2)ToolbarThe toolbar works in all cases, but: a)When you customize the toolbar and t...

FIX: CStringEx::GetDelimitedField

326 byte By John Crane at 2007-11-15 22:05:49
If you try the example given where the string is "(415) 555-7777", and you call GetDelimitedField("(", ")", 0 ), the method should return "415". However, all I ever got was "". There is a fix. Change the line which reads:lpszRemainder = lpsz + lenDelimEnd;tolpszRemainder = lpszEnd + lenDelimEnd;...

Fix: CListCtrl Editable subitems and row selection

890 byte By David Flores at 2007-11-15 22:05:50
In using the CListCtrl enchanements from this site, I have found that 'Highlighting A Row' and 'Editable Subitems' are not compatiable.Problem:In CMyListCtrl::SetOnFocus(CWnd *pOldWnd){if (pOldWnd != NULL && pOldWnd->GetParent() == this)return;//more...}The GetParent() call pr...

RFX_OleDateTime Fix

17326 byte By Dan Querciagrossa at 2007-11-15 22:05:51
Markus Fischer sent me this code that fixes problems with the RFX_OleDateTime code I sent in:void AFXAPI AfxStoreFieldCOleDateTime(CRecordset& rs, UINT nField, COleDateTime& value){ // Get the field data CFieldInfo* pInfo = &rs.m_rgFieldInfos[nField - 1]; // Cache the status pInfo->m_bStatus = rs...

Fix to Shilpas article on Set focus on cell(ListView control)

1529 byte By Shilpa Shamapant at 2007-11-15 22:05:52
This is the code for one of the functions used in the article.int CMyListCtrl::GetRowColumnIndex(CPoint& point, int*col) const{ int colnum = 0; int row = HitTest( point, NULL ); if( col ) *col = 0; // Make sure that the ListView is in LVS_REPORT if( (GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEM...

Fix: Resizable Docking Window 2 (Cristi Posea)

1562 byte By Glenn Carr at 2007-11-15 22:05:53
Problem:This was causing a crash in my ANSI Release build with normal optimizations due to the 'this' pointer for this windowclass being hosed by RegQueryValueEx. Without optimizations turned off it simply overwrote cbDragfullWindows.Fix:I changed the following to set cbDragfullWindows to...

ShowHideMenuCtl miss of info.

288 byte By Romain Chamboncel at 2007-11-15 22:05:54
I'm trying to use ShowHideMenuCtl common controls function and it doesn't work.<br/>I've read SDK docs but I'm a little confused.<br/>Anybody know how and when to use this function (some sample code appreciated).<br/>Thanks for advance,<br/>Romain.

FIX: Flicker in ListView Auto Column Sizing

523 byte By Gary Kibble at 2007-11-15 22:05:55
Correction to "Autosize a column to fit its content - Roger Onslow"I modified the source to work from a CListView rather than a Ctrl. However we had an annoying flicker that I traced to SetColumnWidth(). SetRedraw(false) did not suffice (this is very apparent with a non-white background, you can se...

Visual Studio/Office 97 style Dockable Menu bar BUG..

1647 byte By The Mad Butcher at 2007-11-15 22:05:56
I had the problem with the toolbar class that if i moved a toolbar, the oldwindow still remained on screen. This was because the old window never wasremoved after a move.. Which only could mean that the WM_WINDOWPOSCHANGING message was not handled (correctly). After retrieving the latest version of...

Bug in CGI for "Delete Comment" on this site

278 byte By Ryan Schneider at 2007-11-15 22:05:57
Not a really fatal bug, but it took me a minute or two to figure out..<br/>If you try to delete a comment, and enter you password and hit ENTER as opposed to clicking on the Delete button, it takes you to the Add Comment page instead of deleting your comment.<br/>Ryan