|
Thanks for replying sir
The problem is solved
I'll let you know If encountered any other
|
|
|
|
|
The error message is clear: at the point the compiler encounters sizeof(struct Node) (or sizeof(nd) , or whatever...) it doesn't know the size, because the complete declaration of struct Node is missing.
You could post the relevant code, in order to get better help.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Still here
|
|
|
|
|
It's been a while...
Nice to see you again.
How do you do?
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Thanks sir it helped me alot
|
|
|
|
|
You are welcome.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
in visual studio c++ / x64:
what are way safest to convert from:
1.INT_PTR to int?
2.LRESULT to BOOL?
3.LRESULT to int?
|
|
|
|
|
|
Hi,
If you want to detect overflows, underflows, truncation. The Shell team provided the intsafe.h header.
wizQ wrote: 1.INT_PTR to int? The IntPtrToInt function will at least warn you if the pointer was truncated.
CPallini gave great advice, there really isn't a "safe" conversion. But you can at least detect overflows and underflows.
|
|
|
|
|
can one change int to LRESULT?.
change from
int c = ...
to
LRESULT c = ...
also change from
void func(int p,..
to
void func(LRESULT p,...
|
|
|
|
|
The question is, why would you want to do such a thing? The LRESULT type has a specific meaning and purpose, which is not the same as an int , or any other basic, type.
|
|
|
|
|
Hi,
Got two items to ask. First, is there a library available for c++ mfc that can write results to PDF?. libHARU is deoendent on zlib , libpng, etc. Like to try something more straight forward and free. secondly, is there a possibility to save a CDialog to PDF file?.
|
|
|
|
|
You could just print what you want using Microsoft Print to PDF printer.
|
|
|
|
|
When I googled certainly seem to suggest that.
"C++" pdf libary
Not free (I don't think) but years ago Crystal Reports had an API and among many outputs possible was PDF.
|
|
|
|
|
|
|
I have noted those discussion before, no clue..
|
|
|
|
|
Then perhaps you'll describe how you are doing the "dragging" anw how and in what class you are handling this notification...
|
|
|
|
|
Click the left button, hold on it and move the mouse to somewhere else, no any message receive... My codes as below:
<pre lang="C++"> BOOL CListCtrlEx::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT*
pResult)
{
LPNMLISTVIEW pnmv = (LPNMLISTVIEW)lParam;
switch(pnmv->hdr.code){
case LVN_MARQUEEBEGIN:
; // Deal with some case here.
break;
}
return CListCtrl::OnNotify(wParam, lParam, pResult);
}
This method is trigged only when move mouse into the dialog which contains CListCtrlEx object, message type is TTN_GETDISPINFOW.
|
|
|
|
|
I added the message handler for LVN_MARQUEEBEGIN in my CListCtrl derived class:
BEGIN_MESSAGE_MAP(CListOptionsCtrl, CListCtrl)
ON_NOTIFY_REFLECT(LVN_MARQUEEBEGIN, &CListOptionsCtrl::OnLvnMarqueeBegin)
...
void CListOptionsCtrl::OnLvnMarqueeBegin(NMHDR* pNMHDR, LRESULT* pResult)
{
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
*pResult = 0;
}
and it does work.
|
|
|
|
|
Without seeing some of your code it is impossible to guess.
|
|
|
|
|
Updated my question, added related codes.
|
|
|
|
|
Where is the MFC ON_NOTIFY table that defines the captures? Note also that the notification goes first to the list control's parent window, so you need to capture it there.
|
|
|
|
|
Li Lin 2023 wrote: BOOL CListCtrlEx::OnNotify
You cannot capture it there. You will need to use ON_NOTIFY_REFLECT if you want to capture LVN_MARQUEEBEGIN in your CListCtrl derived class.
Or as Richard pointed out you can capture that message in the parent window.
|
|
|
|
|