Click here to Skip to main content
15,888,968 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: List HDD files in CListView Pin
Richard MacCutchan11-Dec-18 6:00
mveRichard MacCutchan11-Dec-18 6:00 
GeneralRe: List HDD files in CListView Pin
_Flaviu11-Dec-18 7:52
_Flaviu11-Dec-18 7:52 
GeneralRe: List HDD files in CListView Pin
Richard MacCutchan11-Dec-18 22:01
mveRichard MacCutchan11-Dec-18 22:01 
SuggestionRe: List HDD files in CListView Pin
David Crow11-Dec-18 13:27
David Crow11-Dec-18 13:27 
GeneralRe: List HDD files in CListView Pin
_Flaviu11-Dec-18 22:36
_Flaviu11-Dec-18 22:36 
SuggestionRe: List HDD files in CListView Pin
David Crow12-Dec-18 2:53
David Crow12-Dec-18 2:53 
GeneralRe: List HDD files in CListView Pin
_Flaviu12-Dec-18 23:15
_Flaviu12-Dec-18 23:15 
QuestionDriving Ctatic::DrawItem Pin
ForNow10-Dec-18 15:16
ForNow10-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

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

};


This my SSetWindowText
C++
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
C++
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
ForNow11-Dec-18 15:58 
Question有什么学习途径 Pin
Member 140765679-Dec-18 20:30
Member 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
ForNow6-Dec-18 2:02 
AnswerRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 5:22
Victor Nijegorodov6-Dec-18 5:22 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 5:26
ForNow6-Dec-18 5:26 
GeneralRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 8:45
Victor Nijegorodov6-Dec-18 8:45 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 8:49
ForNow6-Dec-18 8:49 
QuestionKeyboard functionality for IExplorerBrowser Pin
_Flaviu5-Dec-18 20:59
_Flaviu5-Dec-18 20:59 
QuestionFound Api's Causing Heap Corruption Pin
ForNow5-Dec-18 2:23
ForNow5-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
ForNow5-Dec-18 3:11 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
ForNow5-Dec-18 3:40
ForNow5-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
ForNow5-Dec-18 7:28 
GeneralRe: Found Api's Causing Heap Corruption Pin
Richard MacCutchan5-Dec-18 7:43
mveRichard 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.