Click here to Skip to main content
15,890,506 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: using auto_ptr Pin
Nish Nishant21-Jul-05 1:43
sitebuilderNish Nishant21-Jul-05 1:43 
GeneralRe: using auto_ptr Pin
kramkrish22-Jul-05 3:46
kramkrish22-Jul-05 3:46 
GeneralRe: using auto_ptr Pin
Jörgen Sigvardsson23-Jul-05 3:21
Jörgen Sigvardsson23-Jul-05 3:21 
GeneralRe: using auto_ptr Pin
Nish Nishant23-Jul-05 4:31
sitebuilderNish Nishant23-Jul-05 4:31 
GeneralBUG: ATL 7.0 fails if chunk size is 07ff (2047 bytes) Pin
arun140520-Jul-05 4:54
arun140520-Jul-05 4:54 
GeneralImporting foreign types in IDL File Pin
morenz19-Jul-05 6:49
morenz19-Jul-05 6:49 
GeneralRe: Importing foreign types in IDL File Pin
morenz20-Jul-05 0:54
morenz20-Jul-05 0:54 
GeneralPlz give me some advice about my code (IE Programming/ATL/COM/MFC) Pin
19-Jul-05 3:10
suss19-Jul-05 3:10 
please help me..
I've developed something.
First I made a txt file that contains just some word "Hello, Bye, etc.." and then load it on the IE.
Second check the text on the IE, and then compare the text with some pattern like "Hello".
Third I add some html cord. The function of cord would change background color of the text "Hello" and hand cursor shape, if the pattern is same.

OK. Now I want to add some more function.
1. If I click the text that was already changed background color, and some more things,
('couse same with some pattern like "Hello")
then I want to make pop up my Dialog box(modal) on the IE. The box name is IDD_POPUP.
2. Next, the IDD_POPUP has a static text. I want to show the "Hello" on the static box of IDD_POPUP.

That's all.. plz help me~
------------------------------------------------------------------------------------------------
void CABC::RegexHighlight(CComPtr spHTML)
///reference - http://www.codeproject.com/miscctrl/chtmlview_search.asp
{
static IRegExpPtr regExp( __uuidof(RegExp) );
static IRegExpPtr regExp_1( __uuidof(RegExp) );

LPCTSTR lpszPattern = " Hello /*some pattern*/ ";
regExp->Pattern = lpszPattern;
regExp->put_Global(VARIANT_TRUE);

IMatchCollectionPtr matches;
IMatchPtr match, tempMatch;
long m_cnt;
int i;
long startPoint, strLength;

IHTMLElement *lpBodyElm;
IHTMLBodyElement *lpBody;
IHTMLTxtRange *lpTxtRange;
bool bFound;

spHTML->get_body(&lpBodyElm);
lpBodyElm->QueryInterface(IID_IHTMLBodyElement,(void**)&lpBody);
lpBody->createTextRange(&lpTxtRange);

CString cstr;
BSTR bstr, tmpbstr;
BSTR bmark;
VARIANT_BOOL ret;
lpTxtRange->get_text(&bstr);
lpTxtRange->getBookmark(&bmark);
cstr = bstr;

matches = regExp->Execute(bstr);
m_cnt = matches->Count;

CString chkStr[1000];
long c_cnt = 0;
bool isChk = false;

for (i = 0; i < m_cnt; i++) {
match = matches->Item[i];
startPoint = match->FirstIndex;
strLength = match->Length;

match->get_Value(&tmpbstr);
CString searchText = tmpbstr;

CComBSTR html;
CComBSTR newhtml;
CComBSTR search(searchText.GetLength()+1,(LPCTSTR)searchText);

while(lpTxtRange->findText(search,0,2,(VARIANT_BOOL*)&bFound),bFound) //lFlags = 2 or 0
{
newhtml.Empty();
lpTxtRange->get_htmlText(&html);

//change the background color, etc..

newhtml.Append(" <span id='regexnum' style='color: Black; background-color: yellow'><font style='cursor:hand'>");
newhtml.AppendBSTR(html);
newhtml.Append("dssd");

lpTxtRange->pasteHTML(newhtml);
}
lpTxtRange->moveToBookmark(bmark, &ret);
}

}
GeneralRe: Plz give me some advice about my code (IE Programming/ATL/COM/MFC) Pin
Douglas Troy19-Jul-05 7:00
Douglas Troy19-Jul-05 7:00 
GeneralRe: Plz give me some advice about my code (IE Programming/ATL/COM/MFC) Pin
Member 212103819-Jul-05 17:25
Member 212103819-Jul-05 17:25 
GeneralATLSTR.H &amp; SHOBJIDL.H not found Pin
TOMCAT8118-Jul-05 20:20
TOMCAT8118-Jul-05 20:20 
GeneralRe: ATLSTR.H & SHOBJIDL.H not found Pin
Douglas Troy19-Jul-05 6:43
Douglas Troy19-Jul-05 6:43 
GeneralRe: ATLSTR.H &amp; SHOBJIDL.H not found Pin
TOMCAT8120-Jul-05 22:24
TOMCAT8120-Jul-05 22:24 
GeneralDuplicate Methos Name in ATL, please help I will rate yr answer Pin
LongIsland16-Jul-05 7:56
LongIsland16-Jul-05 7:56 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
Jörgen Sigvardsson16-Jul-05 10:25
Jörgen Sigvardsson16-Jul-05 10:25 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
LongIsland16-Jul-05 14:20
LongIsland16-Jul-05 14:20 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
Jörgen Sigvardsson16-Jul-05 22:13
Jörgen Sigvardsson16-Jul-05 22:13 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
Lim Bio Liong18-Jul-05 3:53
Lim Bio Liong18-Jul-05 3:53 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
Lim Bio Liong18-Jul-05 5:53
Lim Bio Liong18-Jul-05 5:53 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
Jörgen Sigvardsson19-Jul-05 9:54
Jörgen Sigvardsson19-Jul-05 9:54 
GeneralRe: Duplicate Methos Name in ATL, please help I will rate yr answer Pin
Lim Bio Liong19-Jul-05 13:30
Lim Bio Liong19-Jul-05 13:30 
GeneralQuestion about ATL library ca2wex class Pin
Marcel_115-Jul-05 11:02
Marcel_115-Jul-05 11:02 
GeneralRe: Question about ATL library ca2wex class Pin
Michael Dunn15-Jul-05 14:10
sitebuilderMichael Dunn15-Jul-05 14:10 
General(ATL/COM/MFC/C++) Q about IE programming Pin
dojin7915-Jul-05 0:51
dojin7915-Jul-05 0:51 
GeneralRe: (ATL/COM/MFC/C++) Q about IE programming Pin
Douglas Troy15-Jul-05 5:33
Douglas Troy15-Jul-05 5:33 

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.