Click here to Skip to main content
15,895,656 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to set Icon? Pin
<color>Aljechin 6-Apr-06 0:36
<color>Aljechin 6-Apr-06 0:36 
AnswerRe: How to set Icon? Pin
Nibu babu thomas6-Apr-06 0:44
Nibu babu thomas6-Apr-06 0:44 
GeneralRe: How to set Icon? Pin
<color>Aljechin 6-Apr-06 1:41
<color>Aljechin 6-Apr-06 1:41 
GeneralRe: How to set Icon? Pin
Ștefan-Mihai MOGA6-Apr-06 1:50
professionalȘtefan-Mihai MOGA6-Apr-06 1:50 
GeneralRe: How to set Icon? Pin
<color>Aljechin 6-Apr-06 1:42
<color>Aljechin 6-Apr-06 1:42 
GeneralRe: How to set Icon? Pin
Ștefan-Mihai MOGA6-Apr-06 1:48
professionalȘtefan-Mihai MOGA6-Apr-06 1:48 
JokeRe: How to set Icon? Pin
James R. Twine6-Apr-06 4:01
James R. Twine6-Apr-06 4:01 
QuestionHaving trouble with painting view with multithread in a SDI application. Pin
zhonglin.liang5-Apr-06 23:53
zhonglin.liang5-Apr-06 23:53 
I write a program with SDI . I want to use multithread drawing text with multithread on the view.
Below is my code:

void CCMTView::OnIniteButton()
{
m_Timer.Start();//m_Timer is a multimidea timer.It sends data
//to the serial port every other 2ms.

p_Doc = GetDocument();
HWND hwnd = GetSafeHwnd();
pOutDataThread = AfxBeginThread(threadProc,
(LPVOID)hwnd,0,0,NULL);
}
UINT threadProc(LPVOID param)
{
CString len,strPersent,
CString msg("");

CClientDC dc(CWnd::FromHandle((HWND)param));

if(p_Doc->curBufIdx !=0)
{//p_Doc is global pointer to CMMTDoc
//curBufIdx is a member of CMMTDoc
//buf is a struct member of CMMTDoc


for(unsigned int i = 0 ; i < p_Doc->curBufIdx; i++)
{
len.Format("%d",p_Doc->buf[i].len);
strPersent.Format("%d",p_Doc->buf[i].persent);

msg = len + strPersent;
dc.TextOut(0,0,"len percent ");
dc.TextOut(0,(i+1)*15,msg);
msg = "";
tmpMsg = "";
}
}
return 0;
}
how to implement drawing text on the view with multithread?
Your help will be appreciated greatly.
AnswerRe: Having trouble with painting view with multithread in a SDI application. Pin
Cedric Moonen6-Apr-06 0:58
Cedric Moonen6-Apr-06 0:58 
AnswerRe: Having trouble with painting view with multithread in a SDI application. Pin
YaronNir6-Apr-06 1:42
YaronNir6-Apr-06 1:42 
Question"WMVideo9 Encoder DMO" Filter Pin
Andy Rama5-Apr-06 23:40
Andy Rama5-Apr-06 23:40 
Question"WMVideo9 Encoder DMO" Filter Pin
Andy Rama5-Apr-06 23:39
Andy Rama5-Apr-06 23:39 
QuestionWindows Socket Problem Pin
QuickDeveloper5-Apr-06 23:22
QuickDeveloper5-Apr-06 23:22 
AnswerRe: Windows Socket Problem Pin
Ștefan-Mihai MOGA6-Apr-06 0:57
professionalȘtefan-Mihai MOGA6-Apr-06 0:57 
AnswerRe: Windows Socket Problem Pin
abbiyr6-Apr-06 5:34
abbiyr6-Apr-06 5:34 
Questionlinker error for ScriptStringAnalyse ??? Pin
jayart5-Apr-06 23:14
jayart5-Apr-06 23:14 
QuestionQueue and Stacks Pin
KOOOSHA5-Apr-06 23:05
KOOOSHA5-Apr-06 23:05 
AnswerRe: Queue and Stacks Pin
parichaybp5-Apr-06 23:11
parichaybp5-Apr-06 23:11 
AnswerRe: Queue and Stacks Pin
toxcct5-Apr-06 23:21
toxcct5-Apr-06 23:21 
AnswerRe: Queue and Stacks Pin
Cedric Moonen5-Apr-06 23:32
Cedric Moonen5-Apr-06 23:32 
GeneralRe: Queue and Stacks Pin
toxcct5-Apr-06 23:33
toxcct5-Apr-06 23:33 
AnswerRe: Queue and Stacks Pin
Bob Stanneveld5-Apr-06 23:43
Bob Stanneveld5-Apr-06 23:43 
GeneralRe: Queue and Stacks Pin
Eytukan5-Apr-06 23:45
Eytukan5-Apr-06 23:45 
JokeRe: Queue and Stacks Pin
toxcct5-Apr-06 23:46
toxcct5-Apr-06 23:46 
GeneralRe: Queue and Stacks Pin
Bob Stanneveld5-Apr-06 23:48
Bob Stanneveld5-Apr-06 23:48 

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.