I am writing ActiveX Control.
I am newbie to C++, and I work like with VB
But specific problem allow to create ActiveX Control only with C++.
This ActiveX Control is for IE 6, using MFC, connect to IHTMLDocument2 Interface and do HTML parsing .
What I do:
All is working, I think I finish to implement my idea to program, but there is one big bug.
This program is windowless and for user MessageBox is not needed.
I simple disable with comment // my MessageBox() code lines
and what you think --------> my program STOP WORKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Ok program is working but it begin do bad calculations (logical error)
Problem is NEXT:
I write above that a() function has global variable (int d=0), then function b() change this variable to (d=1).
Function a() not see this change (d=0) and my program do logical errors.
here is a() function code:
extern int d;
do first .....................
do second .................
here is b() function code:
How you see first time a() read predefined global variable d=0 ,then b() change to d=1, but a() think d=0
and switch statement do bad results.
When I remove comenting characters // for MessageBox().... ALL WORKING PERFECT!!!!
a() function now see that d=1
What you think ? Strange behavior!
I need remove this messageboxes for users.
I understood that this variable is like hidden, but not understand how messagebox change his behavior, and what to do how repair this bug?
It is like messagebox got focus to function, or maybe there are many processes , threads, or maybe this is MFC bug.
What I need to do ?
Maybe write my own Messagebox function(DialogBox) that show only 0.00001ms and users can't see this one and my program work OK.