|
Yeah, create an ActiveX control. I wouldn't invest the time in this endeavor, especially when Microsoft has dropped plugin support in IE 5.5 and above.
|
|
|
|
|
Hi, I’ve been trying for most of the day now to write a function that is basically the same as JScript's split function (you pass a string containing one or more key letters, and the key letter, and the function returns an array [or list] of the strings).
e.g. (pseudo code).
CStringList Foo::Split(CString strBigString, CString srtKeyletter)
{
.. do stuff here that creates an array of keyletter delimited strings
return [CStringList containing the strings]
}
However, I can’t get it to work. Not even slightly! Could anyone here help?
Yours,
Peter
|
|
|
|
|
Hi Peter,
are you after a strtok or wstrtok type function. Its a c library call that tokenizes as you describe
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_strtok.2c_.wcstok.2c_._mbstok.asp
or use the CString FindOneOf to implement what you want
John
|
|
|
|
|
Thanks, i've managed to write a function using wstrtok that does exactly what I wanted.
|
|
|
|
|
Hi again,
Somebody has to know how to fix this... cause I can't!
If you use nested splitters and click on a splitter bar WITHOUT moving the bar, the bar automatically moves 2 pixels to the right (or down). Why is that? It's a CSplitterWnd bug but I can't seem to get around it...
NEW: I can mail you a sample project for anyone interested in removing this bug! Just mail me!
All help is greatly appreciated,
/Tommy
|
|
|
|
|
maybe it's because you move the mouse without noticing.
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject "
|
|
|
|
|
No, I'm not accidentally moving the mouse...
Somebody please solve this!!!
/Tommy
|
|
|
|
|
I'm using a lot of nested splitter windows in my current application and it doesn't happen to me.
|
|
|
|
|
Ok...
If you divide the first splitter in two columns LEFT and RIGHT and then split the LEFT in two rows UP and DOWN you WILL get this problem. When clicking, and not moving the mouse, the big splitter bar you'll notice that it jumps away.
Would you like me to send you a sample of this kind of bug?
/T
|
|
|
|
|
You've described exactly the main window of my application and is where I tried it. So I repeat everything went fine!
ORi
|
|
|
|
|
Sorry!!!! My English isn't very good so when I read left I understood right! Now I've tried what you said with the nested splitter windows on the left and YES it happens also to me! It must be some bug...
|
|
|
|
|
Ok, good! (or bad)
Do you know how to fix it? Cause it's definitely a CSplitterWnd bug where they've somehow missed calculating the width of the splitter borders when using nested splitters...
/Tommy
|
|
|
|
|
i created an SDI application with CHtmlView.
how to tell the app to show the webpages in lynx-style mode (without images)
??
|
|
|
|
|
I don't believe it is possible to control this from the IWebBrowser interface. The only way I know is the global Internet options dialog.
|
|
|
|
|
Depends on how you want to solve this problem. you could do a number of things.
1. You could download the site and then get all img elements and set the display css to none.
2. Or you wait for document complete message from the browser and strip out all the img elements by getting them and then setting each one's outerHTML to an empty string.
3. Or you could download just the text stream from the website using WinInet, do a regular expression find/replace on the text stream stripping out all images and then set the outerHTML of your HTMLView of the body object to the text stream you retrieved.
So it just depends on how you want to attack the problem, these are just a few ideas.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Hi all, Iam making a project for me to receive emails and news, which look likes the Outlook Express.
Doubts: I've included a CListCtrl, which has the emails from a folder. but I don't know how to get the selected email in another window, from the CListCtrl selected Item, and when I press my left mouse button.
Could you write me an example Please?
I have put the ClistCtrl control on the window; add the variable to the CListCtrl (m_lista) and put the columns from my database of folders.
How do I for the user press on an Item, and I put the information on another window?????
Please help
Thanks in advance.
Jesus
|
|
|
|
|
I'm a little confused about exactly which parts you are struggling with. If you use SetItemData you can assign a pointer to your data with the list index. If you handle the NM_DBLCLK (Doubleclick) message from the ListCtrl you can get the data for the selected item by using GetItemData.
Or if you've got a split view you can handle the LVN_ITEMCHANGED to change the display message everytime the selection item is changed in the list.
Hope this helps,
Michael
|
|
|
|
|
Just wondering is anyone is using imagelib activeX from skyline tools in the VC++ environment. If so, are you having any problems with it? and how would you rate the support?
thank you.
|
|
|
|
|
Are you asking as a customer or a potential customer. Paintlib provides an ActiveX control for free with full source if you're looking at alternatives ( assuming you need it to be an Active X control. )
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,there!
I got one problem while I try to convert the VARIANT data into the
COleSafeArray data. List part of my codes below:
VARIANT var;
COleSafeArray sa;
var=mscomm1.GetInput();
sa=var; // Here I got an assert error!!
The assert error occured in (..\mfc\src\olevar.cpp):
COleSafeArray& COleSafeArray::operator=(const COleVariant& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY);
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
// VT_ARRAY = 0x2000
Looks like the the varSrc must be VT_ARRAY, but mscomm1.GetInput() return
variant is VT_BSTR(=8).
Does anybody know how to solve this problem? Pls help!
Any comment & suggestion are greatly appreciated!
Wayne
04 Sep 2001
|
|
|
|
|
This is your problem
<br />
VARIANT var;<br />
COleSafeArray sa;<br />
<br />
var=mscomm1.GetInput();<br />
sa=var;
<br />
The constructor is:
<br />
COleSafeArray( const VARIANT& varSrc );<br />
Then what your you need to do it is
<br />
sa = COleSafeArray(var);<br />
Cheers !!!!
Carlos Antollini.
|
|
|
|
|
Dear Carlos,
Replaced the below line
sa=var; // <=Here
with sa = COleSafeArray(var);
the same assert error occur again. Look at the below codes for ref.
COleSafeArray::COleSafeArray(const VARIANT& varSrc)
{
AfxSafeArrayInit(this);
*this = varSrc; // assert error here!!! (it invoke below codes)
m_dwDims = GetDim();
m_dwElementSize = GetElemSize();
}
COleSafeArray& COleSafeArray::operator=(const VARIANT& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY); // The real assert err occur here!!
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
Any suggestion? Anyway, thanks for your quick response!
Wayne
05 Sep 2001
|
|
|
|
|
Dear Carlos!
Try your method, same assert error occured!
Take a look at below codes for ref.
COleSafeArray& COleSafeArray::operator=(const VARIANT& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY); // Assert err occured here!!!!
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
Anyway, thanks for your quick response! Any other suggestion?
Wayne
05 Sep 2001
|
|
|
|
|
I'm learning MFC's and I've the problem. I want to write a new line character to a CEdit control but I can't!
Here's the code:
CString myString;
myString = "some string \n more";
myEditCtrl.SetWindowText(myString);
and I get displayed: some string <strange char=""> more
I've initializated the control with ES_MULTILINE, but it still doesn't work.
Please I need help !!!!!!!!!!!
|
|
|
|
|