Click here to Skip to main content
14,211,427 members

C / C++ / MFC

 
AnswerRe: List HDD files in CListView Pin
Richard MacCutchan11-Dec-18 6:00
protectorRichard MacCutchan11-Dec-18 6:00 
GeneralRe: List HDD files in CListView Pin
_Flaviu11-Dec-18 7:52
member_Flaviu11-Dec-18 7:52 
GeneralRe: List HDD files in CListView Pin
Richard MacCutchan11-Dec-18 22:01
protectorRichard MacCutchan11-Dec-18 22:01 
SuggestionRe: List HDD files in CListView Pin
David Crow11-Dec-18 13:27
memberDavid Crow11-Dec-18 13:27 
GeneralRe: List HDD files in CListView Pin
_Flaviu11-Dec-18 22:36
member_Flaviu11-Dec-18 22:36 
SuggestionRe: List HDD files in CListView Pin
David Crow12-Dec-18 2:53
memberDavid Crow12-Dec-18 2:53 
GeneralRe: List HDD files in CListView Pin
_Flaviu12-Dec-18 23:15
member_Flaviu12-Dec-18 23:15 
QuestionDriving Ctatic::DrawItem Pin
ForNow10-Dec-18 15:16
memberForNow10-Dec-18 15:16 
I have an owerdraw ComboBox When a user selects an Item I want to Display the Detail info

I figure I could use the same Dialog for Background

So for the 6 CStatic and Their 6 Labels I do ShowWindow(SW_HIDE)

I saw the following post on how to drive DrawItem by Calling invalidate an the SetWindowText

Getting owner draw child control to paint when calling SetWindowText - vc.mfc[^]

So I create my own derived CStatic

class MyStatic : public CStatic
{ DECLARE_DYNAMIC(MyStatic)
public:
	MyStatic();
	~MyStatic();
	
	void SetWindowText(LPSTR);
	void DrawItem(LPDRAWITEMSTRUCT pdis);

};


This my SSetWindowText
void MyStatic::SetWindowText(LPSTR lpsz)
{
	Invalidate();
	CStatic::SetWindowText(lpsz);

}


two bad things on the way to getting where I want

1) I get an exception in wincore.cpp at the retrun ::CallWindowProc
RESULT CWnd::DefWindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)
{
	if (m_pfnSuper != NULL)
		return ::CallWindowProc(m_pfnSuper, m_hWnd, nMsg, wParam, lParam);

	WNDPROC pfnWndProc;
	if ((pfnWndProc = *GetSuperWndProcAddr()) == NULL)
		return ::DefWindowProc(m_hWnd, nMsg, wParam, lParam);
	else

2) After the exception my Drawitem is called however ItemData doesn't have the String pointer and and is NULL

Thanks
AnswerRe: Driving Ctatic::DrawItem Pin
ForNow11-Dec-18 15:58
memberForNow11-Dec-18 15:58 
Question有什么学习途径 Pin
Member 140765679-Dec-18 20:30
memberMember 140765679-Dec-18 20:30 
SuggestionRe: What is the learning path? Pin
Richard Deeming11-Dec-18 1:09
mveRichard Deeming11-Dec-18 1:09 
QuestionAfxMessage doesn’t block Pin
ForNow6-Dec-18 2:02
memberForNow6-Dec-18 2:02 
AnswerRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 5:22
memberVictor Nijegorodov6-Dec-18 5:22 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 5:26
memberForNow6-Dec-18 5:26 
GeneralRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 8:45
memberVictor Nijegorodov6-Dec-18 8:45 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 8:49
memberForNow6-Dec-18 8:49 
QuestionKeyboard functionality for IExplorerBrowser Pin
_Flaviu5-Dec-18 20:59
member_Flaviu5-Dec-18 20:59 
QuestionFound Api's Causing Heap Corruption Pin
ForNow5-Dec-18 2:23
memberForNow5-Dec-18 2:23 
AnswerRe: Found Api's Causing Heap Corruption Pin
CPallini5-Dec-18 3:08
mveCPallini5-Dec-18 3:08 
GeneralRe: Found Api's Causing Heap Corruption Pin
ForNow5-Dec-18 3:11
memberForNow5-Dec-18 3:11 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
ForNow5-Dec-18 3:40
memberForNow5-Dec-18 3:40 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
CPallini5-Dec-18 6:50
mveCPallini5-Dec-18 6:50 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
ForNow5-Dec-18 7:28
memberForNow5-Dec-18 7:28 
GeneralRe: Found Api's Causing Heap Corruption Pin
Richard MacCutchan5-Dec-18 7:43
protectorRichard MacCutchan5-Dec-18 7:43 
GeneralRe: Found Api's Causing Heap Corruption Pin
CPallini5-Dec-18 7:49
mveCPallini5-Dec-18 7:49 

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.


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190619.1 | Last Updated 19 Jun 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid