|
When I call MAPISendMail(..), it will only execute correctly if I have Outlook running. If Outlook isn't running I get a MAPI_E_LOGIN_FAILURE error returned. I've tried MAPILogon to create a session, still no luck. Any ideas?
|
|
|
|
|
Hey Kevin...how are you calling MAPISendMail?? You can specify as a calling parameter to popup a MAPI logon box to authenticate yourself...
Erik
I hit faked him with my win32 API .chm and the peabrain goes for it. I follow it up with a salvo of left's and right's sending him down hard. It's lunch time and he's getting a Champ Sandwhich Special. I said, How's that Mr. VB?! Is that 'I wanna use COM in that Server enough for you?!'
...Ever since then, I've been the Champ.
|
|
|
|
|
Hi there,
i'm curious about how does static_downcast and dynamic_downcast works ???
Thanks for any answer !
Have a nice day !
|
|
|
|
|
I have a class derived from CObList. When serializing this class it writes to the disk just fine. However
when reading from the file, the serialization aborts with an unexpected file format.
I'm getting "Warning: Cannot load CGroups from archive. Class not defined." in the debug window, coming
from a TRACE call in arccore.cpp.
My question is that, according to all the information I am gathering from sites, calling CObList::Serialize( ar ) from
within my CGroups::Serialize( ar ) method should perform the proper serialization of the object and even
store the CGroups object information in the file so that on a read the CArchive knows what object it is
retrieving.
Yet, arccore.cpp still returns for me the message above and the serialization bottoms out.
Does anyone have any leads as to a culprit for this problem?
Thanks!
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
CGroup::Serialize code, please
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
void CGroups::Serialize(CArchive& ar)
{
CObList::Serialize( ar );
if (ar.IsStoring())
{
ar << m_GroupCode << m_GroupDescription;
}
else
{
ar >> m_GroupCode >> m_GroupDescription;
}
if(AfxIsValidAddress(*(void**)m_Categories, sizeof(void*), FALSE))
m_Categories->Serialize( ar ); //another CObList
}
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
I'd set a breakpoint in arccore.cpp, line 318. Each object serialized via operator << is preceeded by the class name. Your problem is related to file layout - when application reads file, class name is missing/invalid. Looks like calls to CArchive methods related to writing and reading differs in order - maybe you screwed something in CYourDoc::Serialize?
BTW: Why are you using AfxIsValidAddress? I'm not sure if this is your problem, but testing for validity of the object this way seems strange. It's *your* code and you should know if m_Categories is valid or not. AfxIsValidAddress only checks if object is withing the program's memory space.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hey,
if (ar.IsStoring())
{
ar << m_GroupCode << m_GroupDescription;
}
else
{
ar >> m_GroupCode >> m_GroupDescription;
}
This looks pretty dangerous. I've learned that it's not a good practice to trust the compiler to handle expressions like these in the right order (which one will be serialized or deserialized first, m_GroupCode of m_GroupDescription?)
I'd say:
if (ar.IsStoring())
{
ar << m_GroupCode;
ar << m_GroupDescription;
}
else
{
ar >> m_GroupCode;
ar >> m_GroupDescription;
}
Structured programming vs. chaotic mind boggling
|
|
|
|
|
Hi,
I have a big speed problem...
I'm working on a database and I access it on a SQL server on local network..
It takes me about 1 minute to write 7000 records... That's way to slow!
I thought at first it could be the network speed that would make it slow but I made tests with an MS Access database on the same network and without changing a line of code, writing 7000 records takes less than a second!!! So the network is not the problem...
Could the problem be in my code? Or is it MSSql that is to slow?
Somebody have an idea on that?
It would be very appreciated!
Thanks
Frederico
|
|
|
|
|
How you are inserting records?
With Insert or with a Store Procedure?
Do Inserts is slow in SQL Server, is More quick To execute a Store Procedure that make the insert.
Carlos Antollini.
|
|
|
|
|
I'm using MFC class CRecordset.
I create a class derived from CRecordset and bind all fiels to the database fields.
Then I create an instance of that class and establish the connection through an ODBC an a CDatabase object.
CTableOneSideData* cxOneSide = new CTableOneSideData(cxDatabase);
//open the table
if(cxOneSide->Open(NULL))
{
if (cxOneSide->CanAppend())
{
//insert values into fields
}
cxOneSide->Update();
}
Could you tell me more about Store Procedure?
Thanks a lot.
Frederico
|
|
|
|
|
I know that several Windows standard fonts, like Times New Roman have app. 500~700 symbols for different charsets. How can i use all the symbols in VC++. I know i may specify SYMBOL_CHARSET or DEFAULT_CHARSET, how can i use them both at the same time?
|
|
|
|
|
Hello, the codegurus around the world.;)
Try to use CRichEditCtrl to change the character set on the selected text.
CRichEditCtrl::SetSelectionCharFormat
However, I never use this, but it might work.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
I have a TreeList view, where the first column is a tree view and the second cloumn is a list, with each list item corresponding to a tree item.
I can change list item label via button control (to increase or decrease the value) or edit it value using a dialog box. When I use the button control, I find the the label on the list is not refreshed, I need to deselect it before the values changes. And when I use the dialog to change the value, it does nto change at all.
How can I make the label on the list change 'instantaneously'?
Thanks in advance
|
|
|
|
|
After changing your value, try:
UpdateData(false);
Hope it will help!
Regards
Frederico
|
|
|
|
|
i've tried that btu it still doesn't work.
|
|
|
|
|
Hi all,
I created a wizard generated project using CHtmlView. Everything works well, but unlike IE, the "Enter" key does not work as a shorcut to submit a form. Does anybody know how to fix that? I'm using Windows 2000 Pro SP2
|
|
|
|
|
Dear Gurus,
I have run into a problem that I think you might be able to help me with.
I have developed a program that leaves a blank tab in the taskbar (No title at all) when it is running. Now my problem is that I donot want people to be able to minimize the software by rightclicking on the blank tab in the taskbar. Can someone show me how to disable the right click options on this blank tab?
Or is there a way to get rid completely of this blank tab in the taskbar.
Please Help I have been fighting with this problem for over two weeks now on my own.
Thanks in advance,
Raymond Bentoera
|
|
|
|
|
Have you tried adding WS_EX_TOOLWINDOW to your Windows Style. This should prevent the window from appearing in the taskbar.
Michael
|
|
|
|
|
Check this KB article: Q205158 "HOWTO: Prevent a Window from Appearing on the Taskbar"
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Please Mr. Sowinsky,
Can you please give me the exact URL. Becaus I gate a page that is about graphics and sprites.
Thanks in advance,
Raymond Bentoera
|
|
|
|
|
The article is in Microsoft's knowledge Base, not on my website Just type Q205158 in the Search pane of your VC++ help. If you don't have KB installed on your workstation, use this direct link:
http://support.microsoft.com/support/kb/articles/Q205/1/58.ASP
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
you can override the PreCreateWindow of your class that has CFrameWnd as its base class, and then exclude WS_SYSMENU as one of the class styles. but doing this will also remove the minimize, maximize, and close button in your application's title bar.
|
|
|
|
|
Does any one know how to dynamically set the text on top of a dialog box?
a sample code would be great!
Thanks!
|
|
|
|
|
What's the "text on top of a dialog box"? Caption? If yes, use SetWindowText for that.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|