Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioneliminating lag from a chess clock Pin
Alexander Kindel16-Dec-18 4:23
Alexander Kindel16-Dec-18 4:23 
AnswerRe: eliminating lag from a chess clock Pin
Daniel Pfeffer16-Dec-18 4:43
professionalDaniel Pfeffer16-Dec-18 4:43 
GeneralRe: eliminating lag from a chess clock Pin
Alexander Kindel16-Dec-18 7:09
Alexander Kindel16-Dec-18 7:09 
GeneralRe: eliminating lag from a chess clock Pin
Randor 16-Dec-18 11:56
professional Randor 16-Dec-18 11:56 
GeneralRe: eliminating lag from a chess clock Pin
Alexander Kindel16-Dec-18 14:51
Alexander Kindel16-Dec-18 14:51 
GeneralRe: eliminating lag from a chess clock Pin
Randor 16-Dec-18 23:09
professional Randor 16-Dec-18 23:09 
GeneralRe: eliminating lag from a chess clock Pin
Alexander Kindel18-Dec-18 14:41
Alexander Kindel18-Dec-18 14:41 
GeneralRe: eliminating lag from a chess clock Pin
Daniel Pfeffer18-Dec-18 20:27
professionalDaniel Pfeffer18-Dec-18 20:27 
QuestionWiFi Notifications [SOLVED] Pin
Richard Andrew x6414-Dec-18 16:13
professionalRichard Andrew x6414-Dec-18 16:13 
QuestionVC++ Word automation issues on Win 10 Pin
narasingubhanu14-Dec-18 2:25
narasingubhanu14-Dec-18 2:25 
AnswerRe: VC++ Word automation issues on Win 10 Pin
Richard MacCutchan14-Dec-18 4:47
mveRichard MacCutchan14-Dec-18 4:47 
GeneralRe: VC++ Word automation issues on Win 10 Pin
narasingubhanu14-Dec-18 19:04
narasingubhanu14-Dec-18 19:04 
QuestionInitializing struct (in C++) Pin
Vaclav_12-Dec-18 6:22
Vaclav_12-Dec-18 6:22 
AnswerRe: Initializing struct (in C++) Pin
leon de boer12-Dec-18 6:28
leon de boer12-Dec-18 6:28 
QuestionList HDD files in CListView Pin
_Flaviu11-Dec-18 1:22
_Flaviu11-Dec-18 1:22 
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 

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.