|
Oh I'm sorry.
I'm getting error at readrtf () function.
I think I'm passing the wrong information to readrtf().. especially parameter one. Mapirtf.cpp explain about readrtf() defination as follow: but I dont' know where to get Profile name..
<br />
DllExport HRESULT WINAPI readrtf (LPSTR lpProfileName,<br />
LPSTR lpMsgIDSrc,<br />
LPSTR lpStoreIDSrc,<br />
LPSTR *lpRTF)<br />
In the example of readrtf() provided by microsoft, http://support.microsoft.com/?kbid=172038[^] get the session, mapi message and the logon then readrtf(). I'd tried to get the session of as follow, but doesnt' work.. I dont' know how to covert that vb example code (from 172038) to c++.
<br />
<br />
CoInitialize(NULL);<br />
_ApplicationPtr pApp; <br />
hr=pApp.CreateInstance(__uuidof(Application));<br />
if (FAILED(hr))<br />
{<br />
MessageBox("Unable to instantiate Outlook.","Outlook Error",MB_OK);<br />
return;<br />
}<br />
<br />
pNS = pApp->GetNamespace(_bstr_t("MAPI"));<br />
_NameSpacePtr session = pApp->GetNamespace(_bstr_t("MAPI.Session"));<br />
<br />
<br />
thanks for your reply David.
|
|
|
|
|
I also have another question
I tried to include mapix.h and mapiutil.h to my project so I can call
MAPIInitialize() and LPMAPISESSION session memeber functions.
However, when I run the application.. I got error saying
WCHAR: is redefiniation; different basic types. error is in "MAPIDef.h"
what am I missing again? do I need to support the unicode? if so how can I do that?
I tried to add
#ifundef UNICODE
#define _UNICODE
to stdafx.h but I still get the same error.
What can I do to get the rtf message body of email?
Thanks
|
|
|
|
|
I'm messing with the status bar of my MFC SDI app to change the message from 'ready' to 'working' while doing a lengthy computation using the setup linked below. I've got everything working except that intially there is no value for the default status text. I've tried calling StatusBarMessage() from the constructor and OnCreate events, but in both cases it causes a null reference exception because the GUI components haven't been created yet. Where should I move the initialization call to.
http://www.codeguru.com/Cpp/controls/statusbar/article.php/c2973/#more
|
|
|
|
|
Which pane of the status bar are you attempting to change?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
The left most that normally displays "Ready" or a description of the current menu/toolbar item.
I solved my problem by calling the init code in InitializeInstance. *duh*
|
|
|
|
|
I also 'handled' WM_SETMESSAGESTRING in one of my MFC apps, and in that case I could set the message to anything I wanted, and also avoid messages I did not want to appear in the status bar that the framework might have posted automatically.
Oh, I also remember I did this because the message text was not in pane 0 of my staus bar, it was in the right-most pane instead of the left-most pane.
|
|
|
|
|
I'm trying to make an edit box that will involve more complicated entry than just one line. In fact, sometimes I want to prefill my edit box from a file. I've already set the multiline property, and the 'want return' property, so it appears to be working properly when typing into it, but if I load in information from a file, the newline characters get changed into a funny vertical blackened box. How can I get the edit box to format them properly, turning the newline character into an actual newline?
Danny
|
|
|
|
|
bugDanny wrote:
How can I get the edit box to format them properly, turning the newline character into an actual newline?
Use \r\n instead.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
Thank you both. By the way, what does the \r mean?
Danny
|
|
|
|
|
|
I've added several items to my menus at designtime; thier Enabled properties are true, and their grayed properties are false; but at runtime they're grayed out and inactive. Is there something I need to do to activate them?
|
|
|
|
|
Problem fixed. I had my handlers set for ON_UPDATE_COMMAND_UI instead of ON_COMMAND. Been too long since I've done anything with mfc obviously.
|
|
|
|
|
Hi.
How could I know when Windows is closing.
Because I have a program always loading and I want to trap the Window's closing, to show a message box.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
-- modified at 14:35 Wednesday 21st September, 2005
|
|
|
|
|
You may override the WM_NCDESTROY message handler like this
void CyourDlg::OnNcDestroy()
{
MessageBox("Dialog is going to be closed...");
CDialog::OnNcDestroy();
}
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 15:02 Wednesday 21st September, 2005
|
|
|
|
|
Demian Panello wrote:
How could I know when Windows is closing.
Look for the WM_QUERYENDSESSION or WM_ENDSESSION message.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
What about OnClose()
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I have the webbrowser in a program but want also to access the equivalent of this functionality:
internet explorer: Tools/internet options/general/fonts/language script
I expect it is not something exposed in the webbrowser, but otherwise.
Does anyone know how it can be done ?
Raymond Mercier
Raymond Mercier
|
|
|
|
|
hello
i find that there's little documention about DHTML Edit.who can tell me how to use it.
the event OnonkeyupDhtmledit().it doesn't tell me which key is pressed,i want to know which key is pressed.
thanks a lot
jianxin china
-- modified at 13:00 Wednesday 21st September, 2005
|
|
|
|
|
how do i know the dlls held up by a specific application? for example, i'm developing an application using TSAPI, it's mainly using CSTA32.dll and ATTPRV32.dll,
i'm copying these two dlls in other computers' system32 folder , though i was able to solve the error "xx.DLL not found in this computer" i'm still not able to connect to the Telephony server.
i think its using some other dlls along with these two.. how to find those dlls?
thankx
V
|
|
|
|
|
i tried in "Bulid->start debug->go",
i got this list of dlls used by my program, do u find any dll that u guess its not in ur system?
Loaded 'ntdll.dll',
kernel32.dll',
Csta32.dll',
wsock32.dll',
ws2_32.dll',
msvcrt.dll',
ws2help.dll',
advapi32.dll',
rpcrt4.dll',
mswsock.dll',
user32.dll',
gdi32.dll',
ATTPRV32.dll',
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
shell32.dll',
SHLWAPI.DLL',
Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCIRTD.DLL'
AMInit.dll',
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1643_x-ww_7c3a9bc6\comctl32.dll',
comctl32.dll',
EntAPI.dll',
psapi.dll',
netapi32.dll',
msctf.dll',
mslbui.dll',
First-chance exception in MyTray.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
dnsapi.dll',
winrnr.dll',
wldap32.dll',
rasadhlp.dll',
wshtcpip.dll',
The thread 0xDF4 has exited with code 0 (0x0).
wshtcpip.dll',
The thread 0x880 has exited with code 0 (0x0).
Loaded 'C:\Program Files\Microsoft Visual Studio\Common\Tools\SPYHK55.DLL',
V
|
|
|
|
|
|
i just found its already installed in my system but i never used it, i think iti'll solve my problem, thank you
V
|
|
|
|
|
Vivekuniq wrote:
i think iti'll solve my problem
But only for implicitly loaded libraries.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello,
I'm building a Windows Explorer-like application that displays files and folders. For my particular app, however, the files and folders being displayed may not exist on the computer the app is running on.
I'm using SHGetFileInfo with the flag SHGFI_USEFILEATTRIBUTES to get the icon for the file whether it exists on the computer or not.
Is there a similar way to get a folder icon for a path that doesn't exist? If the path I'm displaying in the folder tree doesn't exist, I want to get the default folder icon index (I'm using SHGetFileInfo to get the system image list).
Any ideas?
Thanks,
Ian
|
|
|
|