|
Did you try using the LARGE_INTEGER struct?
|
|
|
|
|
Sorry, didn't get you, I know there is LARGE_INTEGER data type, but where do you want me to use it?? This command is specific to the board driver that I am using.
thanks,
-Pavan
|
|
|
|
|
Something like this?
uint32 _stdcall spcm_dwDefTransfer_i64 (
drv_handle hDevice,
uint32 dwBufType,
uint32 dwDirection,
uint32 dwNotifySize,
void* pvDataBuffer,
union
{
uint64 qwBrdOffs;
struct
{
uint32 dwBrdOffsL;
uint32 dwBrdOffsH;
};
};
union
{
uint64 qwTransferLen;
struct
{
uint32 dwTransferLenL;
uint32 dwTransferLenH;
};
};
*EDIT* Fixed some typing :)
-- modified at 19:04 Wednesday 8th November, 2006
|
|
|
|
|
I have no idea how their developers (strategic-test) have developed these two syntaxes. Maybe same as how you defined, but I am not sure. I have asked their technical support to rephrase my i64 command into i64m command.
BTW how can we define the low and high addresses or lengths for a 64bit integer while accesses it in 32bit fashion??
-Pavan
|
|
|
|
|
pavanbabut wrote: BTW how can we define the low and high addresses or lengths for a 64bit integer while accesses it in 32bit fashion
With the structure I showed as an example you can access them either way - through the dw or the qw members.
The struct will work for both 32 and 64 bit but that doesn't mean that's what the driver vendor
does.
|
|
|
|
|
Why not use
typedef unsigned __int64 uint64;
typedef __int64 int64;
Which gives you easy to use 64 bit types just like unsigned/signed ints of other sizes, and then use unions as shown above to deal with the component parts?
Steve S
Developer for hire
|
|
|
|
|
How can I read a whole line from a text file into a string in C?
|
|
|
|
|
|
|
Hi i would like to ask:
m_Btn (variable for a Button graphic)
how i will say if m_Btn.EnableWindow(TRUE) then return 0
if ( m_Btn.EnableWindow() == TRUE)
{
return 0;
}
?
|
|
|
|
|
<code>
if (m_Btn.IsWindowEnabled())
return 0;
|
|
|
|
|
and how if i want to say is Disable ? :P
(as i see m_Btn.IsWindowDisabled()) doesnt work
|
|
|
|
|
bool disabled = !m_Btn.IsWindowEnabled();
|
|
|
|
|
if ( ! m_Btn.IsWindowEnabled() )
return 0;
|
|
|
|
|
thx
|
|
|
|
|
np, just remember it always tests if it is zero.
|
|
|
|
|
When you run a function see return value if its bool A() you can use for example if (A()) and if(!A())
|
|
|
|
|
Can anybody tell me how to find the system font?
I'm trying to find the font currently associated with a window, MSDN states that if WM_GETFONT returns NULL, then the window is using the system font. But it doesn't tell me how to get a handle to it.
|
|
|
|
|
Nm. I got it sorted. Thanks for the help.
|
|
|
|
|
Well, several days ago I posted a message that the MouseMove was not being captured on a CListCtrl whenever the user was selecting more than one item on a CListCtrl derived class. The replies were basically "it works for me", but no matter how much i tested, it didnt.
The CListCtrl is in large icon view, and I need invalidate a control when the user is selecting various items with the mouse (dragging the mouse).
I'm using this, just to test:
void CMyListCtrl::OnMouseMove(UINT nFlags, CPoint point)
{
if (nFlags & MK_LBUTTON)
ASSERT(FALSE);
CListCtrl::OnMouseMove(nFlags, point);
}
As you could probably test, this is not working. Where can I capture this event?
|
|
|
|
|
This is probably a dumb question and I didn't see your previous post but I'll ask anyway
Is there a ON_WM_MOUSEMOVE() entry in your CMyListCtrl class message map?
Do you get a WM_LBUTTONDOWN message for the control? If so, then maybe the list control has it's
own message loop during dragging operations.
|
|
|
|
|
Yes on both. I think, like you, that the list control has it's own message loop.. but then.. how can I capture this event?
|
|
|
|
|
skullfire wrote: but then.. how can I capture this event?
That would be tough if you want the list control to do its processing at the same time you do
yours. I imagine at WM_LBUTTONDOWN the control is pulling messages straight from the queue
(processing WM_MOUSEMOVE messages) until it receives a WM_LBUTTONUP or when WM_MOUSEMOVE
indicates the button is no longer pressed. You could check if you receive a WM_LBUTTONUP after
a drag operation and possibly handle your stuff there but during the drag I don't think so.
|
|
|
|
|
What could also work for me is if I use an event where I can see if a certain item has changed it's state (LVIS_SELECTED, for instance). Is there an event for this? OnItemChangeState or something?
|
|
|
|
|
From the docs - list view controls WM_LBUTTONDOWN:
"...the list-view control enters a modal message loop until either the button is released or the mouse is moved."
skullfire wrote: What could also work for me is if I use an event where I can see if a certain item has changed it's state (LVIS_SELECTED, for instance). Is there an event for this? OnItemChangeState or something?
LVN_ITEMCHANGING and LVN_ITEMCHANGED are sent to the parent window.
|
|
|
|