|
Hi Neville,
For creating simple components, you can start with this[^] article.
Once you have the COM component, you can call it from javascript using the techniques specified in this[^] article.
If you have trouble with COM, another option that springs to mind is to create an instance of the windows scripting host(wsh), through the above technique and call the external program.
Have a look here[^] and also here[^]
Hope this helps
regards
Kannan
|
|
|
|
|
Hi Kannan,
Thanks for the detailed reply and the links, very helpfull. I had a look at WSH however I'm unable to use the WScript object from JS in a HTML page in IE, which makes sense. If I could use WScript then I could launch my app.
To my surprise though I could use ActiveXObject("Scripting.FileSystemObject") and then create and delete files and folders.
Looks like I'll spend some time now investigating the COM route. I'll let you know where I end up.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Hi Kannan,
I've been able to build a simple COM component that gets run from javascript when the user right clicks in IE. The COM component then launches my application, so I have a solution. If you need any specific details please let me know.
Thank you very much for your help.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
1. UpdateAllViews() member function has 3 parameters. After writing a Bitmap file in the CDocument class, how will I update my view with new Bitmap using UpdateAllViews().
2. I’m writing a program to display two different outputs. A Bitmap image and some textual information in an AppWizard created MDI application. I want to display this in two different child windows that popup at the same time i.e. with out using Splitter windows.
I would also like to know whether it is possible to set sizes for these child windows.
3. How do we display the percentage completed font (in numeric values) on a Progress Bar control and update it along with the progress bar ?
|
|
|
|
|
Neel Abraham wrote:
how will I update my view with new Bitmap using UpdateAllViews().
In your CView -derived class you have a OnUpdate() -handler. In this you do whatever your View needs to do when a new bitmap comes along. Maybe resizing etc. Your view does not hold a copy of the bitmap, instead it accesses the one inthe document, so it will at once display the new bitmap.
If you happen to have more than one message to send using UpdateAllViews() , you define some so called HINTS:
const LPARAM HintNewBitmap = 1;
const LPARAM HintTwo = 2; and call
UpdateAllViews(NULL, HintNewBitmap, NULL);
and in your handler you switch on the Hint.
Neel Abraham wrote:
I would also like to know whether it is possible to set sizes for these child windows.
Sure. In OnSize() you can set the sizes to whatever you want before calling the Base-class with it.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Hi,
There is an application that comunicates with a printer through a serial interface. If i start this application, is there anyway to spy what commands have beeing sent through the used serial port?
Thank u very much,
Dirso
|
|
|
|
|
Connect serial port 1 to 2 via crossover cable.
Write program to open ports 2 and 3 and just act
like a bridge the two-- and to report on what is
sent. Then connect your printer to port 3 and
that application to port 1.
I've not had to go this far before, but I think
that should do it for you.
|
|
|
|
|
|
Ooh, that's so much nicer if you're on Windows.
I just downloaded all those utilities and have
been playing with them. Really useful stuff.
|
|
|
|
|
I have created a table (using VC++ 6.0) with MSHFlexGrid Control where I display data. I am able to add new rows to the table during run-time by calling AddItem( string, rowIndex ). However, the user should be able to delete a row from the table and I cannot find a function that would do such a thing. Of course, I can clear the contents of the row by setting each value displayed in the cell to NULL and shift up all the next rows but that sounds like a time consuming operation and I would be left with blank rows at the end of the table. Or I could redraw the table entirely, but that doesn't sound right to me either. Can somebody please tell me how to delete a row from the table without performing all those operations? If that is possible of course.
none
|
|
|
|
|
I am sorry people but I found the answer to my question. It took me a week to find what was right in front of me. Sometimes when you look too hard for an answer which is screaming in front of you you don't see it. I would have deleted this message but I couldn't. Don't know why.
none
|
|
|
|
|
I want to create a function that will take an array pointers to any data type and resize it at runtime. But I know I can't use xalloc since I'm initially allocating the memory with new. But I also can't use new in the function when I don't know what data type I'm using, or can I? Must I overload the function with everything I use it for and rewrite the operator= for every new class I use it for? There must be an easier way to do it.
|
|
|
|
|
std::vector
std::vector<MyPtr*> vPtr;
for(int i=0; i<nPointers;i++)
{
vPtr.push_back(new MyPtr);
}
MyData = *vPtr[iIndex];
vPtr.clear();
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
brandon1879 wrote:
I want to create a function that will take an array pointers to any data type
That's what templates are for.
template <typename ELEMENT_TYPE>
bool ResizeArray ( ELEMENT_TYPE** ppElts, size_t nCurrSize, size_t nNewSize )
{
}
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Ok, I am developing a quasi-realtime data display with some dials and sliders on it. The controls are in their own modeless dialog so users can show or hide them as they please. I am aquiring the data from a seperate datasource from within a seperate thread, and will pass the data structure to the UI via message pump. I also wrote a "window manager" class to handle which controls are shown and which ones aren't. I plan on sending a message to the "window manager" with the data structure, and then have the window manager send messages to the individual controls.
So my question is:
Do I:
A. Use SendMessage() from the DAQ thread and wait for the updates to return before acquiring the next sample, and use SendMessage() from the window manager to all the controls.
B. Use SendMessage() from DAQ and PostMessage() to the controls from the window manager, letting the control windows handle their own message que.
C. Use PostMessage() from the DAQ to the manager, and SendMessage() to the controls.
D. Use PostMessage() all around, passing the structures created on the heap and deleting them within the message handlers.
E. Some other method
Aside:
The data aquisition will more than likely take longer than the window updates, so I probably won't be flooding the message que. I plan on running between 10 Hz - 30 Hz.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I think you have to use PostMessage() all around. Because SendMessage() returns only after the message procceed completely while PostMessage() only puts message into the message queue and returns.
Here data aquisition will take longer time then message processing. SendMessage() also take some time to process the message. So it probably make the whole process slower.
C.R.Naik
|
|
|
|
|
Also for process-safety, prefer using PostMessage. Windows guarantees that PostMessage can always be safely called from within any thread (even inside kernel code or with some gdi-locks unavailable) which is not true for SendMessage, because it is per-se unknown what the called dialog-procedure might do.
|
|
|
|
|
Pater wrote:
Also for process-safety, prefer using PostMessage.
I agree. I will implement it this way. Thanks!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Chintan wrote:
I think you have to use PostMessage() all around.
That's what I was leaning towards but I didn't want to lead any answers. Thanks!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hi.
Im creating a print preview and printing classes which use, among others, CRichEdit class. Ive managed to get it working very well (not using Doc/View Arch.) EXCEPT for one detail: when i print a RTF text with double spacing between the lines, it works fine both on preview and on printing. When i use single spacing (default), it puts half the space between lines in printing than in preview!! I dont know if its the printing or the print preview that is working wrong on this, or is it a weird bug in CRichEdit...
Thanks in advance
Miguel Lopes
|
|
|
|
|
E.g., Yahoo.com
When I move the cursor on the Yahoo.com, how can I get the URL of this link from outside. I will not host the internet browser. In other words, is there a function that I can hook to retrieve the URL? Thanks.
|
|
|
|
|
|
Thanks. This is very helpful.
|
|
|
|
|
I am working on some functionality using AnimateWindow() and I was curious to know if anyone had a good example of a WM_PRINTCLIENT implementation.
Any help would be appreciated.
Thanks,
David Ramsey
|
|
|
|
|
Hiya where is the Project->Settings in Visual Studio.NET, that is in Microsoft Visual 6.0. Need to add some .lib files to my project..
Thanks,
grahamoj.
|
|
|
|