|
for this,
i used the book
"14 essential skills to learn visual C++"
by steven holzner.
its a wonderful book for the beginners.
iam not sure if it is available as softcopy.
but it is there in most of the popular book stores.
gud luck.
|
|
|
|
|
Yes, i couldn't found a soft copy of that. If it is well structured and if you have a e-book can you send a copy to me. I'm really appreciate it.
I appreciate your help all the time...
Eranga
|
|
|
|
|
mention your ID , i'll send some of the MFC book i have.
Ashish
|
|
|
|
|
Really appreciate it.
Here is my yahoo mail,
eranga262154@yahoo.com.au
I appreciate your help all the time...
Eranga
|
|
|
|
|
plz fwd to my mail pavan1146@gmail.com
|
|
|
|
|
Hi all,
Does anybody know or have a code to get the unicode properties of an attachment file?
here is my code:
string MapiAttachment::GetPropUNICODE(LONG PropertyID, UINT codePage = 0)
{
string pRetVal;
if ((PROP_TYPE_MASK & PropertyID) != PT_UNICODE)
{
return 0;
}
wstring pTemp;
HRESULT hrProperty;
LPSPropValue lpPropValue = NULL;
hrProperty = HrGetOneProp((LPMAPIPROP)m_Attachment, PropertyID, &lpPropValue);
if (hrProperty == S_OK)
{
int len = WideCharToMultiByte(codePage , 0, (const wchar_t *)lpPropValue[0].Value.lpszW, -1,0, 0, NULL, NULL );
LPSTR pTemp;
MAPIAllocateBuffer(len,(LPVOID *)&pTemp);
WideCharToMultiByte(codePage , 0, (const wchar_t *)lpPropValue[0].Value.lpszW, -1,pTemp, len, NULL, NULL );
pRetVal = pTemp;
MAPIFreeBuffer(pTemp);
return (pRetVal);
}
else
{
pRetVal = ("");
return (pRetVal);
}
}
I need to change something at the HrGetOneProp part because it fails there? I hope someone can help me or give me an idea where to get the unicode properties.
Thanks,
Jj
|
|
|
|
|
Hello and good day. I have an application which runs threads and waits for all of them to be terminated before closing the application. I used a timer to check the number of threads that are still active, which successfully checked when there was no more threads. However, when I called OnClose() from the OnTimer function, the application fails to close. I needed to close the application one more time for it to successfully close. I checked and the application reads the CDialog::OnClose() in the OnClose function but it does not close when called from the OnTimer. Does anyone have an idea about this situation? Thank you very much for your help.
-- modified at 1:52 Monday 22nd October, 2007
|
|
|
|
|
|
Thank you very much! PostMessage(WM_CLOSE) did the job. Thank you!
|
|
|
|
|
Llasus wrote: Thank you very much! PostMessage(WM_CLOSE) did the job. Thank you!
You should not call OnClose directly. It's an event handler which is invoked by the MFC messaging framework in response to the WM_CLOSE message. That's why your call didn't work.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|
|
Actually I placed a TRACE in the OnClose function to see if it works before. Since the timer is the one which calls the OnClose function, it printed out in the Output window the message I set inside the OnClose function using TRACE . What I was wondering about was that I had the CDialog::OnClose() inside the function but it did not work. I needed to click on the close button once again to close the application. I made a breakpoint inside the function to double-check and it actually passes the CDialog::OnClose() but it won't close when called directly by the OnTimer function. I also tried DestroyWindow but it really does not work ( though it passes through that line) when called by OnTimer and needed for the close button to be pressed once again to close it.
|
|
|
|
|
Try using calling AfxPostQuitMessage instead of calling OnClose .
Steve
|
|
|
|
|
Thank you for your time and help. Though when using AfxPostQuitMessage caused the application to immediately close without calling the OnClose() which caused some leaks since I have some objects released at that function. Thanks again for your help!
|
|
|
|
|
In that case try PostMessage(WM_CLOSE); instead.
Steve
|
|
|
|
|
Yes. I tried that and solved my problem. Thank you for your help!
|
|
|
|
|
thanks so much for helping. how about finding and displaying minimum, maximum nodes from the binary search tree, returning the inorder successor of a node,counting and returning the number of nodes on the specified level then the diameter of the tree. please help me i will appreciate. c++ codes please. thanks in advance
-- modified at 19:31 Sunday 21st October, 2007
|
|
|
|
|
I dont think its good idea we show to code and you complete your program with it its better you write and if you have problem ask of us.
|
|
|
|
|
Do your own code and stop asking the same question over and over.
|
|
|
|
|
Hi,
I have a simple GUI in which I currently have a CDialog and a CListCtrlEx. Now, I need to add a event handler for detecting and handling right click on my extended version of CListCtrl (i,e. the CListCtrl class) ... I am adding the following in the message map -
ON_NOTIFY(NM_RCLICK, IDC_LIST_CTRL, &CListCtrlEx::OnNMRclickAllEvents)
If I try it out, the function 'OnNMRclickAllEvents' never gets called. However, if I move this line to CDialog .. it works fine! I don't know what I am missing here...
Any help is appreciated.
Thanks..
|
|
|
|
|
Try using ON_NOTIFY_REFLECT to catch the notification in the
control class.
This is an MFC feature - normally notification messages from a control
go to the control's parent window.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I used the following in my Clistctrlex :
ON_NOTIFY_REFLECT(NM_RCLICK, &CSivoListCtrl::OnNMRclickAllEvents)
That didn't work =( Do I need to add anything in the CDialog as well to make this work?
|
|
|
|
|
Do you still have an ON_NOTIFY in the dialog class?
If so, that will override the reflected message and you should remove it.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Nope I don't have it in the main Dialog. Ok, when I described the problem I thought I would keep it simple. But I guess I should describe my exact setup..
So I have main CDialog .. in there there is a CTabCtrl. The CTabCtrl's contents are displayed by another CDialog say CSubCDialog .. not this sub dialog contains my custom CListCtrlEx. The sub dialog is able to receive the nm_rclick message fine, but CListctrlEx doesn't receive it with on_notify_refelct ..
|
|
|
|
|
Regardless of the window hierarchy, this should work.
All notifications are between the control and its parent window,
so the main dialog and tab stuff should be irrelevant.
The control's parent window has no WM_NOTIFY handler or OnNotify()
override, correct?
Again, no ON_NOTIFY() in the parent's message map, right?
And you put the ON_NOTIFY_REFLECT90 in the control's message map, right?
The reflection is done in the control's parent, so if you override any
WM_NOTIFY processing in the control's parent, that may break the
reflection.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Answer is 'yes' for:
The control's parent window has no WM_NOTIFY handler or OnNotify()
override, correct?
Again, no ON_NOTIFY() in the parent's message map, right?
And you put the ON_NOTIFY_REFLECT90 in the control's message map, right?
It's not working. Is there any property called 'notify' = true I need to set for the list control?
|
|
|
|