|
Hi to you all,
I have a program that uses both microsoft word and outlook. I use them through automation, so I include both msword9.h and msoutl9.h. It turns out that both libraries define _Application, Panes, Selection and ApplicationEvents (and they do not seem to be identical either). I have now taken the easy route by renaming those 4 classes (to stuff like _Opplication, OSelection, etc). This does the trick, but it does not leave me with a good feeling.
Anyone have any better ideas?
Thanks in advance.
William
|
|
|
|
|
Did you use ATL via #import? You can control namespaces if you do that.
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
If i add different types of files to the list control,
How can i capture which type it is by selecting that item(file) in the list control, then how can i open it ,For ex if it is doc type ,if i double click on it then it opens with MSWord.
explain if any one knows
|
|
|
|
|
if you ::ShellExecute(null, "open", "myFile.ext", null, null, SW_SHOW); , then, ,the system opens automatically the program associated to the extension.
|
|
|
|
|
In the situation if i doesnot know which type of extension it is, then how can i?
|
|
|
|
|
do you know wich application has to open the file, and the program command line ??
|
|
|
|
|
Ya i know which application will open the file...
My Application is like this
I created one SDI application, with formviews, in that form view i added tree control and list control.
Now what i want is i want to add items to tree control and list control of different types.After adding to it open these file by double clicking,
|
|
|
|
|
This[^] articles series might interrest you...
|
|
|
|
|
In the example above, it did know.... It was ..."file.ext"...
If you are talking about files loading in your software, and you are using MFC, then CDocTemplate has a member function MatchDocType you may want to look at.
If you cannot tell the type by looking at the extension, or by looking inside the file, simply accept your PC does not have psychic powers.
Iain.
|
|
|
|
|
kiranin wrote: ...if i doesnot know which type of extension it is...
If you are adding file names to the control, how could you not know it's extension?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I have administrative access on the domain but mandatory profile on my login user is causing me not to see the display settings. When I right click in black area of the desktop to bring display properties windows, I can see just effects tab, all other tabs (for screensaver, coler scheme) are not seen. So I wanted to bring these windows by some other way and want to change the color scheme and save it. How may I do it programatically? My operating system is windows 2000.
thanks
Leya
|
|
|
|
|
Is it possible to know form which ip a connection request has been sent to our application which has been listening at a certain port, before accepting it?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
WSAAccept, using WinSock2
Steve S
Developer for hire
|
|
|
|
|
Hi all,
I want to write an app which should install SNMP services in the target system. Sysocmgr.exe can do this but I need the required redistributables. Can you plz tell whether SNMP services redistributables are available or not? Is there any other option by which I can install SNMP services in the target machine through MFC?
Thanks in advance.
|
|
|
|
|
|
Hi to all,
I want to implement an Open File Dailog to select multiple files.
I have written code (following), but when I select more files ( i tried for more than 12 files) then control goes to return;.
I think it cause due to numbers of characters in all file path; As when same code i tried for other files with long file name & located at long location(long file path), control goes to return; when I select more than 4 files.
What might be the problem? Help me.
CFileDialog m_Open_Dialog(1,0,0,OFN_ALLOWMULTISELECT | OFN_EXPLORER ,"Text Files (*.txt)|*.txt||",0);<br />
<br />
if(m_Open_Dialog.DoModal() != IDOK)<br />
return;<br />
<br />
CString m_strPath;<br />
char *sFile_Name = m_Open_Dialog.m_ofn.lpstrFile;<br />
int iCount =0;<br />
<br />
if( strlen(m_Open_Dialog.m_ofn.lpstrFileTitle) != 0)<br />
{<br />
m_strPath.Format("%s",sFile_Name);<br />
iCount++;<br />
return;<br />
}<br />
<br />
sFile_Name += ( strlen(sFile_Name) + 1);<br />
<br />
do<br />
{<br />
m_strPath.Format("%s",sFile_Name);<br />
iCount++;<br />
<br />
sFile_Name += ( strlen(sFile_Name) + 1);<br />
}while(strlen(sFile_Name)!=0);<code><br />
<br />
Thanks & Best regards,<br />
Aniket Salunkhe
|
|
|
|
|
CFileDialog m_Open_Dialog(1,0,0,OFN_ALLOWMULTISELECT | OFN_EXPLORER ,"Text Files (*.txt)|*.txt||",0);
DWORD MAXFILE = 2562; //2562 is the max
m_Open_Dialog.m_ofn.nMaxFile = MAXFILE;
char* pc = new char[MAXFILE];
m_Open_Dialog.m_ofn.lpstrFile = pc;
m_Open_Dialog.m_ofn.lpstrFile[0] = NULL;
if(m_Open_Dialog.DoModal() != IDOK)
return;
this will solve problem
by default buffer size for selected file path is small (for more files)
just make it big
tanvon@gmail.com
Tanvon
the brain behind ...
|
|
|
|
|
It's working. Thanks for reply.
Also when I increase the value of MAXFILE, then i could select more files.
|
|
|
|
|
Tanvon wrote: DWORD MAXFILE = 2562; //2562 is the max
This was an NT4 restriction.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am creating a dialog based MFC application with tabctrl .whe tab changes im poping up one dialog box for getting password from the user.Im setting focus in text box of password dialogbox.
the problem is the Ok button of password dialog is not responding on the first click.but if I press enter key in keyboard its responding in the first time.
what is the problem. plz any one help me .
thanx in advance.
|
|
|
|
|
in your OnInitDialog() , return FALSE
|
|
|
|
|
no I cant do that.i ve implemented the password dialog in seperate dll.its not a dialog based.
|
|
|
|
|
kanna_p wrote: Im setting focus in text box...
Is it the first non-static control on the dialog?
kanna_p wrote: the problem is the Ok button of password dialog is not responding on the first click.
So you click the OK button with the mouse and it does nothing?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want my socket to listen to any ip address having the a perticular series.
For example it should accept the client requests having address series as
(172.16.1.*).
Is it possible to configure like that?
Please help.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Hi,
I have problem with WIA driver for Twain interface.
Can you tell me how I will not support WIA driver
(by selecting driver to disallow WIA driver support)???
Thanks
|
|
|
|