|
how to create a new one..
i tried doing it..
but didn't work out..
after reading the message,
the message is deleted from the inbox!
ranjani
|
|
|
|
|
ranjjj wrote:
how to create a new one..
MAPILogon(0, NULL, NULL, MAPI_LOGON_UI, 0, &m_lhSession);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
i don't want a dialog box to be displayed..
logon_ui does that right??
and...
the only problem now is..
it doesn't work out if the outlook window is not opened..
how to solve it..i tried using new sesion also..anddd..logon ui also..
it doesn't work!
ranjani
|
|
|
|
|
Then use:
MAPILogon(0, "Microsoft Outlook Internet Settings", NULL, MAPI_NEW_SESSION, 0, &m_lhSession);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
even when use the new session..
am able to read the mails only one at a time!
and also....
in the MAPIFindNext function ....
the fourth parameter being the pointer to the message identifier seed..
i'm [passing as Nul in the beginning to read the first unread mail..
how should i use it later??
ranjani
|
|
|
|
|
char sMessageId[512],
sMessageSeed[512];
int nReturn;
sMessageId[0] = '\0';
sMessageSeed[0] = '\0';
nReturn = MAPIFindNext(m_lhSession, 0, NULL, sMessageSeed, MAPI_LONG_MSGID | MAPI_UNREAD_ONLY, 0, sMessageId);
if (SUCCESS_SUCCESS == nReturn)
{
do
{
lstrcpy(sMessageSeed, sMessageId);
nReturn = MAPIFindNext(m_lhSession, 0, NULL, sMessageSeed, MAPI_LONG_MSGID | MAPI_UNREAD_ONLY, 0, sMessageId);
} while (SUCCESS_SUCCESS == nReturn);
}
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
even when i use this..
am not able to log o..when outlook window is not opened!
ranjani
|
|
|
|
|
What is the return value of MAPILogon() ?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
the return value
is
MAPI_LOGON_FAILURE ..integer value is 3!
ranjani
|
|
|
|
|
ranjjj wrote:
also it displays only 1 read mail for 1 execution of thios code...
Because there is no loop. How would you expect it to read more than once?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
am convinced with that...
but...
am not able to log on when outlook window is not opened....
where can the fault be??
kindly help me ..plzz
ranjani
|
|
|
|
|
Make outlook the default mail client (either from Internet Explorer -> Programs -> Email -> Microsoft Outlook, or from the registry HKLM\Software\Clients\Mail\(Default) = "Microsoft Outlook") and then try again
|
|
|
|
|
thank you..will try and shall let u know
ranjani
|
|
|
|
|
How to handle right mouse button click in menu? (like "favorites" menu in IE)
|
|
|
|
|
|
hi,
I've problems with those two funcions they fails giving me error code number
1813 The specified resource type cannot be found in the image file.
and they're used here.....
wclass.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(ICON));
.... and here ....
case WM_CREATE:
hInst = (HINSTANCE)GetWindowLong(hWnd,GWL_HINSTANCE);
hMenu = (HMENU) LoadMenu(hInst,MAKEINTRESOURCE(MENU));
hMenu = GetSubMenu(hMenu,0);
MENU and ICON are defined as resource but I can't explain why the two funcions above fail, maybe it's due to MAKEINTRESOURCE? is there another way to load resources?
thanks in advance
|
|
|
|
|
My first thought is that you are having an EXE/DLL instance handle problem. To double check, you
could use GetModuleFileName to double check which module is being pointed at by the hInst. You can
then double check that your resources are really there, and not in another module of the process.
I would also pick better names than ICON and MENU. I assume you just put them in your post rather than
in your code?
Iain.
|
|
|
|
|
how to check if resource are in the module of the process? for Icon I succeded in, no way for Menu..... names are called ICON and MENU for faster writing in the post,
thanks
|
|
|
|
|
Dear friends,
In my simple dialog based application i placed a rich edit control.
I also derived my custom class from CRichEditCtrl:
CMyRichEditCtrl: public CRichEditCtrl { ...
I want to get EN_CHANGE notification whenever there is some text typed in the box. I am successfully getting it
But the problem is that i want to capture this EN_CHANGE notification in PreTranslateMessage() of my Main dialog class or my custom CMyrichEditCtrl class. Very strange that this message is not appearing in PreTranslateMessage() of either classes.
Can anyone tell me whats the problem.
|
|
|
|
|
There is no such message as EN_CHANGE. You need to look for WM_COMMAND, with a WPARAM of EN_CHANGE, and the right window handle in LPARAM.
Steve S
|
|
|
|
|
Steve
I have tried the following code after calling the SetEventMask with ENM_CHANGE ored with the previous mask.
<br />
void CMyDialog::PreTranslateMessage(MSG *pMsg)<br />
{<br />
if (pMsg->message == WM_COMMAND && HIWORD(pMsg->wParam) == EN_CHANGE<br />
&& (HWND)pMsg->lParam == m_reObj.m_hWnd)<br />
{<br />
TRACE("EN_CHANGE received\n");<br />
}<br />
}<br />
But this doesnt work, i even tried to replace the above condition with this
<br />
void CMyDialog::PreTranslateMessage(MSG *pMsg)<br />
{<br />
if (pMsg->message == WM_COMMAND)<br />
{<br />
TRACE("EN_CHANGE received\n");<br />
}<br />
}<br />
But still no luck. I tried to subclass the control with a custom rich edit class and setup the message handler for EN_CHANGE and Voala i was receiving the message in OnChange() but i am unable to receive it in my PreTranslateMessage so what is wrong here.
Regards
-Saad
|
|
|
|
|
Hi!
There is a function in CBitmap class, LoadBitmap() . However, it only takes resourceID as a parameter i.e it only attaches that bitmap with CBitmap object which is present in the resource.
I like to attach a bitmap to CBitmap object, which is not present in resource, but is in some bmp file. How can i do so
|
|
|
|
|
Try this
HBITMAP CYourClass::LoadBitmapFromFile(LPCTSTR szFilename)
{
HBITMAP hbmp;
hbmp = (HBITMAP)LoadImage(NULL, szFilename, IMAGE_BITMAP, 0, 0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE);
return hbmp;
}
He believed the commercials that said drink beer, get laid
but at closin' time he was alone, he didn't get paid.
Last night his lover was a razorblade..
"Dan Reed song Mix it up"
What do you want to patch today?
|
|
|
|
|
i want to access mysql database using C , i read the documentation which is there on mysql site , but where to get the required files like mysql.h and ,lib files.
My MySql database is on linux machine and i want to access it from Windows machine. My program which is accessig the mysql data is written in c and is on Windows platform.I have already installed the required mysql driver, but to use the mysql API's i require mysql.h file . Do i require any other files for that, if so please let me this in detail.
Suvarna
|
|
|
|
|
You can access mysql through ODBC and you wont need the mysql.h file. You find the mysql odbc in the mysql site. Install it on your windows machine and then make a connector in the windows odbc. Then you connect to the linux mysql from you program through the odbc connector.
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|