|
I cannot explain how you use smartpointers as I don't understand them really well myself.
However there is a second way for automation.
You have to "import" the library stuff from office itself. (for word 2003 it's the MSWORD.OLB file) These contain all the functions available for working with Word. (cfg Excel, Acces, ...) If you succesfully imported them you can make Objects of the the Word application and use them as any other Object. (see msdn for more info)
You have to read a lot of that stuff to understand it all. There are also examples on msdn.
(btw I found my error, if you get the same, try pressing ALT-F5)
there is also an object model file called VBAOF11.CHM (again office 2003) in your office. Here you can find additional info.
hope it's helpfull (but to explain it all it's just TOO much)
|
|
|
|
|
You should ask me, I can get you answers wholesale, with reduced delivery costs...
If you drop me an email to my hotmail account, with a rough outline, I'll send you back a (hopefully useful) set of instructions/hints.
Steve S
|
|
|
|
|
|
Read the posts?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
sorry
|
|
|
|
|
Nevermind dude
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I'm looking for a function that gives me a list similar to what I get from Add/Remove Programs.
WinXP; any help greatly appreciated.
|
|
|
|
|
char textds[250];
CWnd *DT = GetDesktopWindow();
CWnd *NW=DT->GetTopWindow();
for(;;)
{
NW=NW->GetNextWindow();
if(NW==NULL) break;
NW->GetWindowText(textds,sizeof(textds));
//here you have a pointer to the window
}
|
|
|
|
|
I am going to add a small article on how to do this, but the following code fills an MFC CStringList with the installed programs:
<br />
#define AUDIT_KEY _T("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")<br />
#define AUDIT_KEY_LEN 256<br />
#define AUDIT_DISPLAY _T("DisplayName")<br />
<br />
<br />
HKEY hKey;<br />
if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, AUDIT_KEY, 0, KEY_READ, &hKey) != ERROR_SUCCESS)<br />
return;<br />
<br />
CStringList list;<br />
<br />
DWORD dwIndex = 0;<br />
LONG lRet;<br />
DWORD cbName = AUDIT_KEY_LEN;<br />
TCHAR szSubKeyName[AUDIT_KEY_LEN];<br />
<br />
while ((lRet = ::RegEnumKeyEx(hKey, dwIndex, szSubKeyName, &cbName, NULL,<br />
NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS)<br />
{<br />
if (lRet == ERROR_SUCCESS)<br />
{<br />
HKEY hItem;<br />
if (::RegOpenKeyEx(hKey, szSubKeyName, 0, KEY_READ, &hItem) != ERROR_SUCCESS)<br />
continue;<br />
TCHAR szDisplayName[AUDIT_KEY_LEN];<br />
DWORD dwSize = sizeof(szDisplayName);<br />
DWORD dwType;<br />
<br />
if (::RegQueryValueEx(hItem, AUDIT_DISPLAY, NULL, &dwType,<br />
(LPBYTE)&szDisplayName, &dwSize) == ERROR_SUCCESS)<br />
{<br />
list.AddTail(szDisplayName);<br />
}<br />
::RegCloseKey(hItem);<br />
}<br />
dwIndex++;<br />
cbName = AUDIT_KEY_LEN;<br />
}<br />
::RegCloseKey(hKey);<br />
The Rob Blog
|
|
|
|
|
Hi all.
Whether exit simple function like WIDTH(RECT rc) in standard VC libraries ???? I.e functions what accomplish
an plain operations with RECT structure ,get width ,get height.This not hard to write any makros for this aim but i just want think.
Thaks.
|
|
|
|
|
I know that under MFC you have a class CRect for it
but under API Win32 i dont think there is
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I would like to override the minimize-event so that the dialog remains where it is but resizes to a fixed size (e.g. CRect( x, y, 320, 100 ) )
How is that possible?
I’ve tried this but don’t get the ” CRect( x, y, 320, 100 )”-size
void CDlg::OnSize(UINT nType, int cx, int cy){
if( nType == SIZE_MINIMIZED )
{
CPoint p;
GetCursorPos( &p );
SetWindowPos( 0, p.x, p.y, 320, 100, 0 )
return;
}
…
…
}
...and justice for all
APe
|
|
|
|
|
Try the function OnGetMinMaxInfo() and override the values of MINMAXINFO FAR* lpMMI->ptMinTrackSize.x,y
this shud the fix the dialog to the min size set by you in the above function
Gudluck
Adi
|
|
|
|
|
Hi,
I am doing a dialog based app USING MFC.
I need to interact with the front end using Flash.
Can anybody help me in this regard?
The flow of app is .....
Create a Dialog based app
Insert a Flash based control.
Insert a Flash control "buton".
Pls help me in communicating with these two.
Regards
|
|
|
|
|
How can you tell if a CWnd object is displayed or not. I can never figure this one out.
If you initilise the object but not displayed as a window what function can I call to test it?
---
|
|
|
|
|
May be it's need to check WS_VISIBLE style flag, true or false, setted or not ?
|
|
|
|
|
BOOL CWnd::IsWindowVisible();
Maxwell Chen
|
|
|
|
|
Thanks, that was rather stupid of me
---
|
|
|
|
|
Where can I get/download DBG files for MS VS 7, C++
I need exact link/URL.
Now i'm walking on www.microsoft.com and while i have no results
Thanks a lot in advance !!!
|
|
|
|
|
|
COOL!!! MEGA THANKS !!!
Thanks a lot again many times !
Navigation of MS site very hard for me (
|
|
|
|
|
Is there any way to know that a time has been set.
For example SetTimer(id, elapsed minutes ....)
Can I know whether the time with this id has been set or not?
|
|
|
|
|
I also never got this answer, but i tried the following code
m_set = 0;
SetTimer(....)
if(m_set==0) //dont start it again...
else
settimert
m_set=1;
If your ever get good answer , plz do let me know
regards
Balkrishna
|
|
|
|
|
Hi !
I have a question which might look silly about std namespace :
I thought that when using the new C++ headers of the includes (without the ending .h), I had to put a std:: in front of each keyword (or put 'using namespace std' at the begining of my code).
In the exemple below, it works how I was expecting with the vector class, but it doesn't work with the cmath include. I get a compile error that std is not a namespace. If I take out the 'std::' in front of abs, it works, but why ? What am I missing there ?
#include <cmath>
#include <vector>
int main (void)
{
std::vector<int> MyVect;
int a=-5;
int b=std::abs(a);
return 0;
}
Thanks for your help !
Jerome
|
|
|
|
|
#include <iostream>
#include <vector>
#include <cmath>
int main (void)
{
std::vector<int> MyVect;
int a= -5;
int b= abs(a);
return 0;
}
<b>Maxwell Chen</b>
|
|
|
|