Click here to Skip to main content
15,905,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What are the advantages of a string table? Pin
Anthony_Yio27-Oct-03 16:23
Anthony_Yio27-Oct-03 16:23 
AnswerRe: What are the advantages of a string table? Pin
yndfcd27-Oct-03 16:28
yndfcd27-Oct-03 16:28 
AnswerRe: What are the advantages of a string table? Pin
Michael Dunn27-Oct-03 17:44
sitebuilderMichael Dunn27-Oct-03 17:44 
AnswerRe: What are the advantages of a string table? Pin
Pizzor200028-Oct-03 5:38
Pizzor200028-Oct-03 5:38 
AnswerRe: What are the advantages of a string table? Pin
Atlantys30-Oct-03 13:02
Atlantys30-Oct-03 13:02 
GeneralComponents and Controls missing in Visual C++ .Net Pin
Dreknar27-Oct-03 16:00
Dreknar27-Oct-03 16:00 
GeneralRe: Components and Controls missing in Visual C++ .Net Pin
Kevin McFarlane28-Oct-03 0:39
Kevin McFarlane28-Oct-03 0:39 
Generalwindow refresh problem in ActiveX Control Pin
HeartFriend27-Oct-03 14:57
HeartFriend27-Oct-03 14:57 
CMyWindow: public CWindowImpl<cmywindow>
{
BEGIN_MSG_MAP(CMyWindow)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
END_MSG_MAP()

LRESULT OnPaint(...)
{
// do some drawing here
}

};
CMyControl: ...(ignore for brief) , public ComControl<cmycontrol>
{
...(ignore for brief)
LRESULT OnCreate(...)
{
// create m_wndClient here
}
LRESULT OnDraw(...)
{
// do useless drawing here just for test
}
private:
CMyWindow m_wndClient;
}

something wiered happened when the first time i clicked the control window, m_wndClient window didn't show up correctly,
it just show me those things done in OnDraw, why?
it just happened at the first time when i click .



i.e
LRESULT CMyControl:OnDraw(...)
{
.
.
.
TextOut(_T("MyControl")); //pseudocode
.
.
.
}


LRESULT CMyWindow:OnPaint()
{
.
.
.
TextOut(_T("MyWindow")); //pseudocode
.
.
.
}

run the simplest program , everything appears to be ok,
it just show "MyWindow"( because m_wndClient occupies all the space of the control)
but when i click in the control, it shows "MyControl" instead,
i have to resize the window or do other operations to trig the OnPaint event handler in MyWindow to let the control refresh itself. it just happens at the first time i click it, can anyone tell me why?
how can i avoid it?
QuestionWhat is the difference between .sln and .vcproj? What do they do? Pin
Link260027-Oct-03 14:03
Link260027-Oct-03 14:03 
AnswerRe: What is the difference between .sln and .vcproj? What do they do? Pin
Kentamanos27-Oct-03 14:29
Kentamanos27-Oct-03 14:29 
GeneralCreate bitmaps from windows content Pin
alex.barylski27-Oct-03 13:18
alex.barylski27-Oct-03 13:18 
QuestionHow to change the font color in a richedit control Pin
Deepak Samuel27-Oct-03 12:08
Deepak Samuel27-Oct-03 12:08 
AnswerRe: How to change the font color in a richedit control Pin
Oinka27-Oct-03 13:32
Oinka27-Oct-03 13:32 
QuestionAnybody see what I did wrong? Pin
Oinka27-Oct-03 11:39
Oinka27-Oct-03 11:39 
AnswerRe: Anybody see what I did wrong? Pin
Anthony_Yio27-Oct-03 16:33
Anthony_Yio27-Oct-03 16:33 
Generalstill can't figure it out Pin
Oinka27-Oct-03 19:17
Oinka27-Oct-03 19:17 
GeneralRe: still can't figure it out Pin
Steve S27-Oct-03 22:30
Steve S27-Oct-03 22:30 
GeneralThanks! Pin
Oinka28-Oct-03 12:35
Oinka28-Oct-03 12:35 
GeneralLinking two tables programmatically Pin
DimkaSPB27-Oct-03 11:04
DimkaSPB27-Oct-03 11:04 
GeneralRe: Linking two tables programmatically Pin
Terry O'Nolley27-Oct-03 11:39
Terry O'Nolley27-Oct-03 11:39 
GeneralRe: Linking two tables programmatically Pin
DimkaSPB27-Oct-03 11:54
DimkaSPB27-Oct-03 11:54 
GeneralI still DO NOT UNDERSTAND keyboard accelerators Pin
BoudewijnEctor27-Oct-03 10:44
BoudewijnEctor27-Oct-03 10:44 
GeneralRe: I still DO NOT UNDERSTAND keyboard accelerators Pin
Terry O'Nolley27-Oct-03 11:44
Terry O'Nolley27-Oct-03 11:44 
GeneralRe: I still DO NOT UNDERSTAND keyboard accelerators Pin
BoudewijnEctor28-Oct-03 5:21
BoudewijnEctor28-Oct-03 5:21 
GeneralRe: I still DO NOT UNDERSTAND keyboard accelerators Pin
Steve S28-Oct-03 21:41
Steve S28-Oct-03 21:41 

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.