|
Make the resource ID "HOME.HTM" with quotes, then red://reslocal.dll/home.htm will work.
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
Absolutely stunning! Cheers so much Matt.
I wasn't far away (well I was), I had it working with the resource identifier bit:
blah-blah/%23101
The quotes has just made it all look so much more friendly when the source if viewed etc.
Thanks again,
Simon
|
|
|
|
|
No problem. It was a simple problem with an answer someone would never think of
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
Create an HTML resource in your module (can be an EXE or DLL) with a string ID (not an integer ID) and reference it like:
res://C:\path\to\your\file.dll/YOURPAGEID.html
--Mike--
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
Thanks for the pointer Michael.
It seems obvious know that a string id is one with " around it, but that don't look right in the IDE, so I was having trouble with that in the end. All working now though.
Thanks,
Simon
|
|
|
|
|
It's said that if two threads in different processes communicate with each other, a window must be there for the sake of a message called WM_COPYDATA.
My question is:
Without any window, can these two threads communicate with each other, and how?
Best regard
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
If the target thread/process does not have a window then WM_COPYDATA is not an option for you.
If it is only simple data you can try using the clipboard, though you can't notify the target thread. It'll have to keep checking the clipboard on it's own.
I guess you can try memory mapped files [a topic I know nothing about]
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
The following possibilities spring to mind...
* mutex/event if only signalling is required
* Memory mapped files(I seem to recall a rather nice tutorial on this site somewhere)
*Sockets
*Local RPC (You need to understand IDL)
*Named pipes (Similar in concept to sockets)
*DCOM
I'd probably use sockets myself, because that's what I'm most familiar with.
Rob.
|
|
|
|
|
I am completely frustrated!
I have read from several sources, that you can use the GetIRichEditOle() function to get to the ITextDocument interface for a CRichEditCtrl.
I am using VC 6, and the RichEdit version looks like it is 3.0.
I am using the following code:
ITextDocument *pTextDoc = NULL;
IRichEditOle * ire = m_RichEdit.GetIRichEditOle();
if ((ire == NULL) || (ire->QueryInterface(IID_ITextDocument, (void**) &pTextDoc) != S_OK) || (pTextDoc == NULL)){
DWORD dwErr = GetLastError();
if (ire != NULL)
ire->Release();
TRACE("Failed ITextDoc\n");
}
The pTextDoc is always NULL. The GetLastError() returns 0.
I have also tried the method specified in MSDN, but it fails also. The method they use is very similar to the above code, so that's no surprise.
I am getting desperate! I need to get the ITextDocument interface to do some things like set the line spacing.
Please, if anyone knows how to do this, let me know.
Thank you very much,
David
|
|
|
|
|
Check the return value from QueryInterface() - that should give a clue regarding what error happened. Enter the return code into the Error Lookup util (on the VC Tools menu) to get a text description of the error.
--Mike--
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
Thank you for the suggestion. I forgot I could get that information from the Query call.
The code was 0x80004002 which means no such interface supported!
Any idea why?
Have you ever tried this? Do you think it is possible that MFC is actually using a differnt RichEdit implementation? I also have RICHED.DLL, and RichEd32.dll, in addition to RICHED20.DLL. The debug output shows that RICHED20.DLL is being loaded, so I should be OK right (RICHED20.DLL has v3.0 support)?
Thanks again,
David
|
|
|
|
|
|
Thank you very much.
I see the problem. I'm actually trying to use CRichEditView. I see where the call is being made.
I guess I will have to play around with loading the RICHED20.DLL, maybe by overriding PreCreateWindow()? I'll try not to bother you again.
Thank you.
David
|
|
|
|
|
Can I use those modes together?
I got an error message that says that an error occured when tried acces the file... hmnmm....
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Use CFile::modeReadWrite instead.
--
Andrew.
|
|
|
|
|
I see you got your answer so I feel able to make my usual comment in addition - if you use iostreams they will do the same thing and you won't be tied to MFC. You'll also be able to easily extend your stream to accept your own types.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Christian Graus wrote:
You'll also be able to easily extend your stream to accept your own types.
How!!!!!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
By writing iostream insertion and extraction operators. I guess I should write an article...
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Christian Graus wrote:
I guess I should write an article...
Yes you should!
But by the way, I found that WritePrivateString/GetPrivateString is a much easier way to my problem!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
So you're using an ini file ? I avoid them, because the functions you're using are only provided for legacy code, Microsoft recommends putting data in the registry.
However, I use iostreams often, they are an easy way to stream state information to disk, for debugging for example.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
I've got a class with a _variant_t member variable.
When I call delete on objects of my class, I get memory leaks. Is there a safe way of getting rid of these objects?
Thanks,
funbag
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
What are you using in the variants? I could see where some problems might occur if you are using safe arrays, but if you are just using the regular variant union variables, then I'm not too sure..
What are the memory leaks saying? Are the leaks explicitly of object of CYourClass? Or are they variant objects?
//------------------------
CSignature::Jeff() ;
PostMessage(WM_QUIT) ;
//------------------------
|
|
|
|
|
My class is derived from IADORecordBinding, and has the two _variant_t objects. They're used to read an adVariant and an adGUID type from a recordset object, to which my object is bound.
The adVariant is just used to store a date from the db, while the GUID is used as a record identifier.
When I delete my object, a COM error is raised, 800020008 - bad variable type.
The memory leaks seem to be a cascade of the error of not deleteing my object correctly.
I hope this helps
Thanks,
funbag
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
This is probably a really simple question but could someone please tell me how to call a .exe program when I click a button on a dialog box. Thanks so much.
|
|
|
|
|
ShellExecute(..)
or
CreateProcess(..)
The first one is simple to use than the second!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|