Click here to Skip to main content
15,911,762 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCListView with a Timer Pin
daniel995-Oct-01 10:14
daniel995-Oct-01 10:14 
GeneralRe: CListView with a Timer Pin
Andres Manggini5-Oct-01 10:43
Andres Manggini5-Oct-01 10:43 
QuestionHow do I use CButton::Create() to make a push button check box? Pin
Bart-Man5-Oct-01 10:12
Bart-Man5-Oct-01 10:12 
AnswerRe: How do I use CButton::Create() to make a push button check box? Pin
Fazlul Kabir5-Oct-01 10:17
Fazlul Kabir5-Oct-01 10:17 
GeneralRe: How do I use CButton::Create() to make a push button check box? Pin
Bart-Man5-Oct-01 10:22
Bart-Man5-Oct-01 10:22 
AnswerFinal Solution Pin
Bart-Man5-Oct-01 10:55
Bart-Man5-Oct-01 10:55 
GeneralConnect() timeout Pin
Alex Griffing5-Oct-01 9:27
Alex Griffing5-Oct-01 9:27 
GeneralOverriding CWndClassInfo in ATL Pin
5-Oct-01 8:05
suss5-Oct-01 8:05 
I am having trouble with overriding CWndClassInfo in ATL/WTL. I am working to set the cursor for a CListViewCtrl derived class (ListCtrl) to be a cross (IDC_CROSS) and remove the CS_HREDRAW & CS_VREDRAW to eliminate the flicker during resizing (Q183210). I thought I made the appropriate changes (see below) yet the view does not display the cross cursor and the flicker is still present. What else is needed to invoke the ListCtrl::GetWndClassInfo()? Are there examples of what I am trying to do in ATL?

// ListCtrl.h
class ListCtrl : public CWindowImpl<listctrl, clistviewctrl="">
{
public:
ListCtrl();
virtual ~ListCtrl();

BEGIN_MSG_MAP(ListCtrl)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
END_MSG_MAP()

public:
LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,
BOOL& /*bHandled*/);

static CWndClassInfo& GetWndClassInfo()
{
static CWndClassInfo wc = {
{
sizeof(WNDCLASSEX),
0,
StartWindowProc,
0, 0, NULL, NULL, NULL, (HBRUSH)(COLOR_WINDOW+1), NULL,
_T("ListCtrl"), NULL
},
NULL, NULL, IDC_CROSS, TRUE, 0, _T("")
};
return wc;
};
};



// Status.cpp
Status::Status()
{
list_view = new ListCtrl;
}

Status::~Status()
{
if (list_view)
delete list_view;
}

HRESULT Status::open(const HWND hWnd)
{
if (list_view) {
RECT rect;
::GetClientRect(hWnd, &rect);

HWND h = list_view->Create(hWnd, rect, _T("ListCtrl"),
WS_CHILD |
WS_VISIBLE |
WS_CLIPSIBLINGS |
WS_CLIPCHILDREN |
LVS_REPORT,
WS_EX_CLIENTEDGE);
return S_OK;
}
GeneralDisplay attributes Pin
john john mackey5-Oct-01 7:32
john john mackey5-Oct-01 7:32 
GeneralRe: Display attributes Pin
5-Oct-01 7:36
suss5-Oct-01 7:36 
GeneralDisabling item in CListCtrl Pin
5-Oct-01 7:02
suss5-Oct-01 7:02 
GeneralRe: Disabling item in CListCtrl Pin
Masaaki Onishi5-Oct-01 9:59
Masaaki Onishi5-Oct-01 9:59 
GeneralCreating window like Taskbar Pin
5-Oct-01 6:57
suss5-Oct-01 6:57 
GeneralRe: Creating window like Taskbar Pin
Michael Dunn5-Oct-01 8:27
sitebuilderMichael Dunn5-Oct-01 8:27 
GeneralRe: Creating window like Taskbar Pin
Ravi Bhavnani6-Oct-01 8:02
professionalRavi Bhavnani6-Oct-01 8:02 
GeneralRe: Creating window like Taskbar Pin
Michael P Butler6-Oct-01 9:05
Michael P Butler6-Oct-01 9:05 
GeneralAfxTrace without MFC Pin
Steven Mitcham5-Oct-01 5:37
Steven Mitcham5-Oct-01 5:37 
GeneralRe: AfxTrace without MFC Pin
Chris Losinger5-Oct-01 5:48
professionalChris Losinger5-Oct-01 5:48 
GeneralRe: AfxTrace without MFC Pin
Steven Mitcham5-Oct-01 8:06
Steven Mitcham5-Oct-01 8:06 
GeneralRe: AfxTrace without MFC Pin
Chris Losinger5-Oct-01 8:11
professionalChris Losinger5-Oct-01 8:11 
GeneralRe: AfxTrace without MFC Pin
Steven Mitcham5-Oct-01 8:28
Steven Mitcham5-Oct-01 8:28 
GeneralRe: AfxTrace without MFC Pin
Michael Dunn5-Oct-01 8:28
sitebuilderMichael Dunn5-Oct-01 8:28 
Generalabout hook in vc! Pin
5-Oct-01 4:53
suss5-Oct-01 4:53 
GeneralRe: about hook in vc! Pin
Paolo Messina5-Oct-01 11:12
professionalPaolo Messina5-Oct-01 11:12 
GeneralNetApiFreeBuffer and W95/98/Me Pin
Braulio Dez5-Oct-01 4:36
Braulio Dez5-Oct-01 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.