|
Hi again,
I have clipboard sorted out, my prime is dealing with selected text!
Thanks, I think I'll turn to Windows Accessibility.
|
|
|
|
|
Actually selecting text is simply a case of drawing it differently, and every application is likely to handle this differently. Heck, they may be including paragraphs, diagrams, all sorts.
But what you CAN do is to monitor the clipboard for copied / cut test. Do a search (here on CP) for clipboard monitor .
If you're just interested in word, then I imagine it does have some mechanism you can use for that.
On a final thought, well behaved applications may work witb the Accessibility API to help blind people know what they've selected, but that will only be with mainstream apps, not *every* one.
Iain.
|
|
|
|
|
Thanks,
I already have Clipboard functionality, I'm interest in what I can do with selected text, that is can I get it from various sources. I also noticed the Windows Accessibility, but before getting inside with it I decided to ask few questions.
Thanks for trying to help me!
|
|
|
|
|
Hello Everyone,
I am using a Dialog Application, in which i am using two sliding dialogs for customizing the main dialog.
I want to change the cursor for each sliding dialog. Should be Bitmap.
Tell me if any one knows it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Did you use of CreateCursor for create it and SetCursor for set it?
|
|
|
|
|
I used CreateCursor and SetCursor. It is working in main dialog. But, it is not working in the sliding dailogs. There are two sliding dialogs. I am want to use company logo as a cursor.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
santhoshv84 wrote: But, it is not working in the sliding dailogs.
Are those dialogs responding to the WM_SETCURSOR message?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It sounds like you need to handle WM_SETCURSOR in your sliding dialogs. But this would only handle the cursor on the dialog itself, not on any buttons, static controls etc. To handle all those cases would be possible by using subclassed controls also, but it sounds like rather a lot of work...
You also have the separate problem of turning an arbitary bitmap into a cursor!
Iain.
|
|
|
|
|
Are the sliding dialogs coordinates fixed?
You can get the dimensions and position of the dialogs. Then get the position of the mouse according to the main frame or the desktop and, if you are inside of the region ocuped by your dialog when is visible... then change the cursor to the one you want.
I made it in my project when being over one bitmap (that represents an element that can be configured in advanced window), and changing cursor depending on the element.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
MY application do the word automation. My problem is while i quit the word through my application it will close all the word document , which i not open through my application. Pls help me to close the word document which i open through my application .
Thanks in advance
|
|
|
|
|
|
i open it by
pDisp is
hResult = CLSIDFromProgID(L"Word.Application", &cLswid);
CoCreateInstance(cLswid, NULL, CLSCTX_LOCAL_SERVER, IID_IDispatch,(void **)&pDisp);
pDisp->GetIDsOfNames(IID_NULL, L"Open", 1, LOCALE_USER_DEFAULT,&dispID)
pDisp->Invoke(dispID, IID_NULL, LOCALE_SYSTEM_DEFAULT, autoType, &dp, pvResult, NULL, NULL)
|
|
|
|
|
Use the Close method of the Document object, instead of the Quit method of the Application object.
|
|
|
|
|
Hai experts,
I need to get RTF format of a text...how to gat this...any api or how...using VC++?
Pls help me.....
|
|
|
|
|
I would try this.
a) Create an invisible CRichEditCtrl (or use a visible one).
b) Set the text with SetWindowText (or type or paste it into your control).
c) To get the Text in RTFFormat use StreamOut Method.
There is a small sample in MSDN for this.
If you are not using MFC:
a) Create a Window of richedit class. (CreateWindow(...)
b) use WM_SETTEXT
c) send EM_STREAMOUT - Message to the created window
|
|
|
|
|
It depends what you are trying to do.
RTF is all readable text - create a "Hello world" document using word pad and save it as RTF, then open it using Notepad. That's a minimal RTF document.
If you want to make your own RTF documents from a program, use the contents of that Wordpad-generated file as a basis, just replace the "Hello world" with whatever you need to output from your program.
As I said, it depends what you are trying to do in the RTF document.
|
|
|
|
|
Hello everyone,
I am using Visual Studio 2003. I am writing a JNI program, and upper layer is Java code and lower layer is C code (DLL). The Java code is utilizing C code by JNI.
To debug the C code, in the C DLL Project Properties dialog, I assign Debugging Command to java, then set Command argument to,
-classpath "C:\Program Files\Java\jdk1.5.0_06" HelloWorld,
when when debugging from Visual Studio, Visual Studio will crash. Do you know anything wrong with the settings?
I have also tried to run manually from command line,
java -classpath "C:\Program Files\Java\jdk1.5.0_06" HelloWorld
and the result is correct.
regards,
George
|
|
|
|
|
hiiii,
I want to handle WM_NCLBUTTONUP in my doc/view application. I already add this message handler for my window. But it was not responded when my mouse was up in the caption bar of my window.Please give suggestion for how to handle the WM_NCLBUTTONUP?
Thanks in advance...
ss
|
|
|
|
|
First thing I would do is handle (at least as a test) WM_NCLBUTTONDOWN. Its quite possible that something is grabbing the down button, and then capturing the mouse until an UP comes along, bypassing you.
If you can't see the DOWN message, then you've probably not added the handler properly.
Another possibility...
The view itself doesn't actually *have* a caption bar - its provided by the CChildFrame in a non-maximised MDI frame, or the CMainFrame in a SDI app, or a maximised view. So you may be subclassing the wrong window!
Iain.
|
|
|
|
|
hi all masters of vc
i want to know that how can i automaticlly
shutdown and logon system on a particular time in vc++
please help me
thanks
|
|
|
|
|
You can use of WM_TIMER and after a time use of ExitWindowsEx.
|
|
|
|
|
Hello everyone,
I think if we define foo as char array, for example,
char foo [32];
then foo, &foo and &foo[0] should be the same, right?
For example, the following 3 statements are the same,
strcpy (foo, goo);
strcpy (&foo, goo);
strcpy (&foo[0], goo);
Any comments?
I am very interested in how C treats foo and &foo and make them the same?
thanks in advance,
George
|
|
|
|
|
I think that you will find this to be compiler dependent.
foo is the array, so C/C++ treats the array name as a pointer to the array and thus it is a pointer of the same value as &foo[0].
With some compilers however, I have seen where the compiler stores a pointer to the array (like &foo[0] and then &foo is a pointer to that pointer... so I would stay away from this syntax.
Jim
|
|
|
|
|
Thanks Jim,
I have tested that on Visual Studio, foo and &foo are the same. I think you mean on some other compiler, they may be different.
Here is my test program in Visual Studio.
<br />
int main (int argc, char** argv)<br />
{<br />
char foo [1024];<br />
unsigned int p;<br />
unsigned int q;<br />
p = foo;<br />
q = &foo;<br />
<br />
return 0;<br />
}<br />
I am interested in the cases when "&foo is a pointer to that pointer". I am wondering what is wrong if I still treat foo and &foo the same in this situation? Could you provide more information and analysis please?
regards,
George
|
|
|
|
|
I do not recall where I have seen it. It was several years ago on an embedded compiler... seems like green hills or perhaps wind river. If you are using microsoft, I don't think you will have a problem treating foo and &foo as equals.
Jim Fisher
|
|
|
|