|
Start by reading about Word's automation Object model.
You can, I recall, access the document's collection of tables.
Having done this, you should be able to refer to properties of the table to extract text from it.
If you know VB it's helpful
[Hey, you at the back! Stop throwing that stuff at me... ]
Steve S
|
|
|
|
|
i get the handle to a textbox in any opened window on my desktop using Enumhcildwindows function <under hooking="" system=""> and i want to set a text in this textbox automatically.i need a function to do this task..
thank you
E-Email: app_prog@yahoo.com
Hawk,amr
|
|
|
|
|
VERIFY (::SetWindowText (hWnd, _T("foo")));
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
I have an output file (text file). In the text file there are a few locations of other text files, along with the name and path of each file.
it seems like if the location is anywhere other than the desktop the file can not be found.
How can I read the location of a file from another text file and open it?
Thank
Ehsan Behboudi
|
|
|
|
|
How can you handle the case where you want to put a Max limit on the size that you can make a MFC dialog based application window.
I store the main dialog windows size in the InitDialog routine, but how do you limit the resizing?
I placed code in the OnSize, but it did not work.
|
|
|
|
|
WM_GETMINMAXINFO message.
Process this and return the minimum and maximum sizes the user can change for the window
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
//{{AFX_MSG_MAP(CMyDlg)
...
ON_WM_SIZING()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CMyDlg::OnSizing(UINT fwSide, LPRECT pRect)
{
if (pRect->right - pRect->left > 400)
pRect->right = pRect->left + 400;
CDialog::OnSizing(fwSide, pRect);
// TODO:
}
|
|
|
|
|
|
(Forgive me for posting this in the VC++ forum)
I'm trying to get command prompt autocompletion to work on my W2KSP4 box. Anyone know the registry setting? The entries I've found while Googling don't seem to work. Thanks,
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
I am working on a project of BHO and I need to make a PropertySheet dialog box pop up when I click on an item in the context menu. The property sheet is from the BHO. The problem is sometimes the PropertySheet is displayed under the current IE window and the user cannot see it. I know what caused the problem. It is because there is one BHO for each IE window. But when a property sheet is called, the program just use PostMessage to send out a message, and the first BHO that gets it will display the property sheet. That is why sometimes the property sheet cannot be seen. How do I solve this problem?
I tried to use SetWindowPos(NULL,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE) in the property’s initialization function. But it doesn’t work. I also tried to add SetForegroundWindow(); before that. There is still something wrong with it. First, it will make the IE window that the BHO hooked to become the window on focus and make the current IE window hide; Second, it only works on the IE windows from the same thread(The new window is generated from current old window by clicking on File->new->Window). It doesn’t work when the IE windows are on different thread, for exampe, generated by clicking on the blue “e”.
Please help. Thanks a lot in advance
|
|
|
|
|
I am not familiar with BHO but did you try wndTop as the first parameter to SetWindowPos() instead of NULL?
John
|
|
|
|
|
Can somebody please enlighten me on the topic of Multicasting and UDP? I am trying to build a simple chat program, but the problem is that I will need to load one socket per client, so there will be a very big number of connections and I don't want that. The fact is that I heared that Multicasting can help a lot. How can I find out IPs of computer on a LAN and send messages all around?
Thank you lot in advance !
The Greater Mind Balance
|
|
|
|
|
There is some good article about multicasting here.
(Simply type multicasting and you will get them all.)
A good one would be:
.NET Remoting - Events. Events? Events!
|
|
|
|
|
Alright. I'm stepping through my code in Visual Studio.NET and I notice in the "Autos" window variable values turn red. I assume this happens to show that a variable value is being modified or was just modified. But I'm not sure. Could somebody explain?
Thanks in advance.
|
|
|
|
|
Yes u are rite the red variables indicate that they were changed during the last execution of line or lines(if you have set a breakpoint ahead and pressed f5)
|
|
|
|
|
Ah, Good. Thank you very much.
|
|
|
|
|
In vc6 if I do pow(2,-23) I get the correct answer of 0.00000011920928955078125. In vc71, the same code returns 0. From stepping into the newly templatized pow I see that I can make this work by using 2.0 or casting to a float or double, but this just seems wrong....especially since the method returns a double.
Anyone know if this has been reported as a bug yet?..or how to report if not??
|
|
|
|
|
Hmmm. That sounds like a templated or overloaded version is being invoked, rather than a "bug" per se, particularly if you're casting.
Does pow(2,-23.0) give you 0 or 1.19e-7 ?
Steve S
|
|
|
|
|
You are passing integers into the function. It worked before because there wasn't an integer version of pow and thus it was forced to use the double version.
There isn't a bug in VC7.1. Fix your code to call the routine properly so it knows you want the double or float version of pow.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Integer version or not, the function always returns a double. The code shouldn't have to "know". Whether I pass integers or floats, the correct answer is never 0.
|
|
|
|
|
No the integer version returns an integer that is then automatically casted to a double. With integers only the correct answer is 0.
John
|
|
|
|
|
Hi All,
I have Created a Font using the function:
CreateFont()method.
I want to get the width of the font here for a particular purpose,
So Iam creating a font first with the "CreateFont" function & giving '0' in the width parameter as I dont know the width of the font.
Then I get The font metrics of this font & from it I create a Logfont structute editing the width part.
Now I create the font again with the width .
Everything worked fine until I got into a problem:
I used the "SetWorldTransform" for scaling.Now When I scale the text with a particular font,the scaling is not happening in the horizontal direction(ie: widthwise).
I would like to have the scaling widthwise as well.
Could anyone Help.....
Thanks in Advance..
font.CreateFont(-height,0,rotVal.x ,rotVal.y,style,FALSE,FALSE,0,ANSI_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_SWISS,
reinterpret_cast<const unsigned="" short*="">(facename.c_str()));
TEXTMETRIC fontMetric;
m_deviceContext->GetTextMetrics(&fontMetric);
double averageCharWidth =(fontMetric.tmAveCharWidth);
//LogFont Structure
LOGFONT lf;
memset(&lf,0,sizeof(LOGFONT));
font.GetLogFont(&lf);
lf.lfWidth=(averageCharWidth/1.5)*ratio;
//Deleting the fontObject & Creating a New Font.
font.DeleteObject();
font.CreateFontIndirect(&lf);
CFont * pOldFont = m_deviceContext->SelectObject(&font);
The xForm structure is as follows:
XFORM xForm;
xForm.eM11 = 0.01 * m_iZoomFactor;
xForm.eM21 = 0;
xForm.eDx = 0;
xForm.eM12 = 0;
xForm.eM22 = 0.01 * m_iZoomFactor;
xForm.eDy = 0;
SetWorldTransform(pDC->GetSafeHdc(), &xForm);
|
|
|
|
|
I'd like to copy the content of a Flexgrid (MS FlexGrid Control version 6.0)to a Word or Excel document. I tried "InvokeHelper(0x37, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);" hoping it would copy a picture to the clipboard but it doesn't.
Ideally, I would like to copy not a picture but the actual data as a table to Excel.
Many thanks in advance for your help.
|
|
|
|
|
Actually I am doing a project on face detection
Now i have got the output coordinates of facial features but there are too many of them and i need only a few of them to do analysis so as to achieve face expression detection.
So will the coordinates selected, like x,y (12,23)for neutral expression I want to compare will another x,y (45,76). If if it satisfy the happy criteria, then output will be happy
So how should I link two programmes together?
The first programme output a list of coordinates while the want I am doing will get some valuse and output the expression
i do hope someone will help me
|
|
|
|