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

C / C++ / MFC

 
AnswerRe: problem cdatetimectrl in package? Pin
ananth_xyz27-Oct-03 22:09
ananth_xyz27-Oct-03 22:09 
GeneralRe: problem cdatetimectrl in package? Pin
murali_utr27-Oct-03 23:00
murali_utr27-Oct-03 23:00 
QuestionHow to get HMODULE/HINSTANCE handle of a different application? Pin
kvcrajan27-Oct-03 18:45
kvcrajan27-Oct-03 18:45 
AnswerRe: How to get HMODULE/HINSTANCE handle of a different application? Pin
yndfcd27-Oct-03 19:31
yndfcd27-Oct-03 19:31 
Generalftp client using vc++ and winsock Pin
pampatipraveen27-Oct-03 17:45
pampatipraveen27-Oct-03 17:45 
GeneralRe: ftp client using vc++ and winsock Pin
georgiek5027-Oct-03 20:03
georgiek5027-Oct-03 20:03 
GeneralHTMLView Pin
Giang Pham 7827-Oct-03 17:02
Giang Pham 7827-Oct-03 17:02 
GeneralRe: HTMLView Pin
Neville Franks27-Oct-03 22:17
Neville Franks27-Oct-03 22:17 
GeneralRich Edit: select all Pin
halblonious27-Oct-03 16:52
halblonious27-Oct-03 16:52 
GeneralRe: Rich Edit: select all Pin
Mumiozol28-Oct-03 0:25
Mumiozol28-Oct-03 0:25 
GeneralRe: Rich Edit: select all Pin
jhwurmbach28-Oct-03 1:22
jhwurmbach28-Oct-03 1:22 
GeneralRe: Rich Edit: select all Pin
Mumiozol28-Oct-03 2:28
Mumiozol28-Oct-03 2:28 
GeneralRe: Rich Edit: select all Pin
halblonious28-Oct-03 9:39
halblonious28-Oct-03 9:39 
QuestionWhat are the advantages of a string table? Pin
Daniel132427-Oct-03 16:06
Daniel132427-Oct-03 16:06 
AnswerRe: What are the advantages of a string table? Pin
Oinka27-Oct-03 16:19
Oinka27-Oct-03 16:19 
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 

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.