Wednesday, 15 February 2012

c++ First-chance exception in exe (KERNEL32.DLL): 0x0EEDFADE: (no name) FIX!!!

First-chance exception in Test.exe (KERNEL32.DLL): 0x0EEDFADE: (no name)

Just add below before you call the DLL.

CoInitialize(NULL);

Monday, 6 February 2012

USA federal holidays 2012

Monday, January 2*New Year's Day
Monday, January 16Birthday of Martin Luther King, Jr.
Monday, February 20**Washington's Birthday
Monday, May 28Memorial Day
Wednesday, July 4Independence Day
Monday, September 3Labor Day
Monday, October 8Columbus Day
Monday, November 12***Veterans Day
Thursday, November 22Thanksgiving Day
Tuesday, December 25Christmas Day

Wednesday, 1 February 2012

How to fix the CListCtrl MFC C++ lines in middle of item issue bug fix.

Problem:-

alt text

fix:-

To fix this bug in the MFC List Control you need to specialize the control, over-ride the method wich responds to the scroll, and force it to redraw the list completely after it has done the scroll.


SmoothListCtrl.cpp



// SmoothListCtrl.cpp : implementation file
//


#include "stdafx.h"
#include "MFC_Sample.h" // your project header
#include "SmoothListCtrl.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


/////////////////////////////////////////////////////////////////////////////
// CSmoothListCtrl


CSmoothListCtrl::CSmoothListCtrl()
{
}


CSmoothListCtrl::~CSmoothListCtrl()
{
}




BEGIN_MESSAGE_MAP(CSmoothListCtrl, CListCtrl)
//{{AFX_MSG_MAP(CSmoothListCtrl)
ON_WM_VSCROLL()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CSmoothListCtrl message handlers


void CSmoothListCtrl::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{


CListCtrl::OnVScroll(nSBCode, nPos, pScrollBar);


Invalidate();
    UpdateWindow();
}


SmoothListCtrl.h





#if !defined(AFX_SMOOTHLISTCTRL_H__91716634_7EEA_4555_8977_2F7C96751793__INCLUDED_)
#define AFX_SMOOTHLISTCTRL_H__91716634_7EEA_4555_8977_2F7C96751793__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SmoothListCtrl.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CSmoothListCtrl window

class CSmoothListCtrl : public CListCtrl
{
// Construction
public:
CSmoothListCtrl();

// Attributes
public:

// Operations
public:

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSmoothListCtrl)
//}}AFX_VIRTUAL

// Implementation
public:
virtual ~CSmoothListCtrl();

// Generated message map functions
protected:
//{{AFX_MSG(CSmoothListCtrl)
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
//}}AFX_MSG

DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SMOOTHLISTCTRL_H__91716634_7EEA_4555_8977_2F7C96751793__INCLUDED_)