|
<A
href="http://www.somesite.com/sth.asp" target=_blank>
<img height=100 src="see.jpg" width=600 border=0>
</A>
the html code above show a picture with a link.
How could I filter the img without change the link?
I tried Name Space,I can only show a white area with the link.
I tried Mime Filter,I can only replace some text with some other text.
What I want to do is to replace the IMG with a CString such as "killbill" with the original link. AND also,the HTML code shouldn't change.
How could I do so? thank you.
|
|
|
|
|
Hey, I am trying to send an integer from a VB 6.0 application to a VC++ 6.0 DLL. I know how to send strings, but still having trouble getting numbers to take.
I represent the incoming data as an u_int, I interpret the return as a long, and I send the data as an Integer.
VC++ 6.0 Side:
int _stdcall test(u_int test1, u_int test2, u_int test3)
{
return 0;
}
VB 6.0 Side:
Public Declare Function test Lib "MyDll.dll" (ByVal test1 As Long, _
ByVal test2 As Long, _
ByVal test3 As Long) as long
Call test(1,100,25)
The initial setup crashes the application. So, I just need help sending numeric values to my dll, so that i can interpret them as u_int and use their values in my code. So, if I send the number 100, I need that number to go to my dll and be defined as 100, so that I can use that number in my code, within the function.
need more info? let me know, all help is appreciated, thanks in advance
salut
|
|
|
|
|
I'm not a big fan of COM but this is one of those instances where you'll find setting up a COM interface in the dll greatly simplifies interactions with VB 6.0.
|
|
|
|
|
not a big fan either. It causes a GPF because I am sending the wrong variable type. What is the vb equivalent to u_int. I thought long. It shouldn't be that hard to send an numeric value from VB 6.0 to a VC++ DLL, I am sure there is an easier way, any one? thanks anyway and thanks to those to come in advance.
Salut
|
|
|
|
|
I don't believe there is one. VB has no concept of unsigned integers.
Anna
Currently working mostly on: Visual Lint
Anna's Place | Tears and Laughter
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
|
|
|
|
|
hmm, you would think long would work. I suppose I should define my vars on the C++ side, as something more VB compliant. I think I have this one solved, in a generic way. Perhaps, some suggestions? tia
salut
|
|
|
|
|
borono wrote: all help is appreciated
VB6 Doesn't know Unsigned integers, just use the long type (both VB & VC).
borono wrote: I need that number to go to my dll and be defined as 100
In that case what is wrong with just using a plain integer (this one I know works, I have used this method)?
Public Declare Function test Lib "MyDll.dll" (ByVal test1 As Integer,<br> _ ByVal test2 As Integer,<br> _ ByVal test3 As Integer) as Integer
int _stdcall test(int test1, int test2, int test3) {
If your returning 0, why return anything at all? Returning void will work, change your vb declare from a Function type to a Sub type.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi everyone,
Is it possible to access protected function of one class from another class? can anyone please give me a suggestion for this?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
|
I recently ran into a problem related to the topic, was wondering if anyone has any ideas...
The setup:
<br />
class CView<br />
{<br />
friend class CPreviewView;<br />
<br />
protected:<br />
BOOL DoSomething();<br />
};<br />
<br />
class CPreviewView : public CView<br />
{<br />
public:<br />
void SetSomething(CView* pView)<br />
{<br />
...<br />
<br />
pView->DoSomething();<br />
<br />
...<br />
}<br />
};<br />
<br />
class CMyPreviewView : public CPreviewView<br />
{<br />
public:<br />
void SetSomething(CView* pView)<br />
{<br />
<br />
...<br />
<br />
pView->DoSomething();<br />
<br />
...<br />
}<br />
};<br />
CPreviewView is granted access to DoSomething since it's declared as a friend in the CView class. In the CMyPreviewView class, access is denied to DoSomething since CMyPreviewView isn't declared as a friend.
a) If these were my own classes, I could simply add a new friend class statement to CView. Both CView and CPreviewView are MFC classes, and I don't want to touch the MFC code.
b) If the DoSomething function were virtual, I could simply add an override to CMyPreviewView.
* scratch that *
Is there a simple way that I can somehow grant CMyPreviewView public access to CView::DoSomething?
-- modified at 23:44 Tuesday 27th June, 2006
|
|
|
|
|
Hi,
This is a very basic question. Don't mind...
I want to append a blank space at the end of a string.
strcat(name, " "); doesnt seem to work. The trailing space is ignored. How can I retain it?
|
|
|
|
|
how is name declared ?
maybe the space is added after the '\0' ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I don't think so...
say name contains "Mickey"
strcat(name, " "); returns "Mickey" but strcat(name, "Mouse"); returns "MickeyMouse"...
so I don't think the '\0' in name has an influence...
|
|
|
|
|
|
I tried appending another word after appending a space... The space was not existant.
|
|
|
|
|
If, in the first instance, you can replace C style string handling with the string class, you'll be better off. However, there's no reason I can see for this not to work, all the same.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
When the application starts I send the initial directory as an argument...
so the command line is <exename> <rootdir> . now when the folders in the path contains space, it is recognized as more than one argument. The following code should help attach the arguments together... but the space is not being appended...
<br />
if (argc==1)<br />
initpath[0]='\0';<br />
else {<br />
strcpy(initpath, argv[1]);<br />
for (i=2;i<argc;i++) {<br />
strcat(initpath, argv[i]);<br />
strcat(initpath, " ");<br />
}<br />
}<br />
|
|
|
|
|
Well, this isn't a fix for the string weirdness, but that code isn't the way to fix the problem with spaces in a filename. Put quotes around the directory name so the OS knows the spaces are part of the name.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Cool... I attempted to pass the path, which was stored in a variable, while using _execl function from another application. It didnt work. now i created a new variable and added duoble quotes before and after the path. It works fine...
Thanks for helping me fix it...
|
|
|
|
|
Shrinaresh wrote: ...but the space is not being appended...
How are you verifying this?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Shrinaresh wrote: strcat(name, " "); doesnt seem to work. The trailing space is ignored. How can I retain it?
How are you verifying this? Has name been properly initialized prior to calling strcat() ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I got around my problem (see the reply with title " this is what I am trying to do" in the same post). strcat appends blank spaces.
strcpy(name, "Mickey");
strcat(name, " ");
strcat(name, "Mouse");
returns "Mickey Mouse"...
but when I try to do a similar thing (as in my code in "this is what I am trying to do") the blank is not getting appended. I think the arguments are not null terminated. anyway, this is still interesting but atleast my issue was solved...
|
|
|
|
|
Shrinaresh wrote: I think the arguments are not null terminated.
Your code snippet worked fine for me, although the order of the two strcat() calls should probably be reversed.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I am doing a project in c++ which involves basic file operations i.e. create, copy, rename and delete a file. Here the main thing is performance because the number of times these operations takes palce is 10000. so the program loops for 10000 times and also need to clean up after doing everything.
I have to do this, by mounting a file systems and then i have create a directories on that file system and then perform the operations on the file.
Please suggest me some ideas on how to do this.
|
|
|
|
|
Have you looked at CreateFile() , CopyFile() , rename() , and DeleteFile() ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|