Click here to Skip to main content
15,917,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is assignment to int atomic Pin
Joe Woodbury1-Feb-09 16:52
professionalJoe Woodbury1-Feb-09 16:52 
AnswerRe: Is assignment to int atomic Pin
Randor 1-Feb-09 10:48
professional Randor 1-Feb-09 10:48 
GeneralRe: Is assignment to int atomic Pin
Dudi Avramov1-Feb-09 21:26
Dudi Avramov1-Feb-09 21:26 
GeneralRe: Is assignment to int atomic Pin
Stuart Dootson1-Feb-09 22:13
professionalStuart Dootson1-Feb-09 22:13 
Questiondecoding pdf format into device Pin
Horizzzon1-Feb-09 8:18
Horizzzon1-Feb-09 8:18 
AnswerRe: decoding pdf format into device Pin
CPallini1-Feb-09 10:23
mveCPallini1-Feb-09 10:23 
GeneralRe: decoding pdf format into device Pin
Horizzzon1-Feb-09 10:43
Horizzzon1-Feb-09 10:43 
QuestionStrncmp and GetwindowText problem Pin
keret1-Feb-09 6:18
keret1-Feb-09 6:18 
I enumerate all open windows with Enumwindows. In the processor function I try to check if the title of the window contains a certain string. If yes, put the handle in a list of handles(m_wndList).

if(hwnd)
{
 CWindow win(hwnd);
 CHAR str[100];
 win.GetWindowText((LPTSTR)(str),100);
 if (strncmp(str,"searchstring", 13) == 0)
  dlg->m_wndList.push_back(hwnd);
}


It compiles, but I get the following error messages:
Run-time Check Failure #2: Stack around the variable str is corrupted

and/or

Run-time Check Failure #2: Stack around the variable win is corrupted

What is the problem? How should I change my code?
AnswerRe: Strncmp and GetwindowText problem Pin
Stephen Hewitt1-Feb-09 6:49
Stephen Hewitt1-Feb-09 6:49 
AnswerRe: Strncmp and GetwindowText problem Pin
Cedric Moonen1-Feb-09 7:31
Cedric Moonen1-Feb-09 7:31 
GeneralRe: Strncmp and GetwindowText problem Pin
keret1-Feb-09 8:38
keret1-Feb-09 8:38 
QuestionRe: Strncmp and GetwindowText problem Pin
David Crow2-Feb-09 5:55
David Crow2-Feb-09 5:55 
AnswerRe: Strncmp and GetwindowText problem Pin
keret2-Feb-09 6:54
keret2-Feb-09 6:54 
QuestionIs there any documents about vista's architecture? (brief one) Pin
followait1-Feb-09 4:09
followait1-Feb-09 4:09 
AnswerRe: Is there any documents about vista's architecture? (brief one) Pin
CPallini1-Feb-09 5:34
mveCPallini1-Feb-09 5:34 
GeneralRe: Is there any documents about vista's architecture? (brief one) Pin
followait1-Feb-09 15:39
followait1-Feb-09 15:39 
QuestionExcel Export document Pin
mohammadmot1-Feb-09 3:57
mohammadmot1-Feb-09 3:57 
AnswerRe: Excel Export document Pin
CPallini1-Feb-09 5:16
mveCPallini1-Feb-09 5:16 
QuestionNeed some help on how to use wget command in widows environment Pin
John5021-Feb-09 2:37
John5021-Feb-09 2:37 
AnswerRe: Need some help on how to use wget command in widows environment Pin
Randor 1-Feb-09 11:10
professional Randor 1-Feb-09 11:10 
QuestionRegistering ActiveX programmatically Pin
Mohammad Khodaea31-Jan-09 23:32
Mohammad Khodaea31-Jan-09 23:32 
AnswerRe: Registering ActiveX programmatically Pin
«_Superman_»1-Feb-09 0:49
professional«_Superman_»1-Feb-09 0:49 
AnswerRe: Registering ActiveX programmatically Pin
CPallini1-Feb-09 1:14
mveCPallini1-Feb-09 1:14 
AnswerRe: Registering ActiveX programmatically Pin
Stephen Hewitt1-Feb-09 2:10
Stephen Hewitt1-Feb-09 2:10 
QuestionDynamic Text on Bitmap Button Pin
Super Hornet31-Jan-09 16:09
Super Hornet31-Jan-09 16:09 

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.