Splitting a DWORD into 24 bit and 8 bit values....
-
This should be pretty easy, right? I'm feeling pretty brain dead right now, though... In CTreeCtrl the nodes have a DWORD data item and I want to make use of that as a 24 bit value and an 8 bit value. What would be a nice way of getting and setting the DWORD from two other variables? Thanks, Ben.
Please don't split into the wind! :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
This should be pretty easy, right? I'm feeling pretty brain dead right now, though... In CTreeCtrl the nodes have a DWORD data item and I want to make use of that as a 24 bit value and an 8 bit value. What would be a nice way of getting and setting the DWORD from two other variables? Thanks, Ben.
-
This should be pretty easy, right? I'm feeling pretty brain dead right now, though... In CTreeCtrl the nodes have a DWORD data item and I want to make use of that as a 24 bit value and an 8 bit value. What would be a nice way of getting and setting the DWORD from two other variables? Thanks, Ben.
I know it's early but you should probably don a fireproof jacket - just in case...!! (Or maybe just post in the C++ forum)
Sarchasm : The gulf between the author of sarcastic wit and the person who doesn't get it.
-
This should be pretty easy, right? I'm feeling pretty brain dead right now, though... In CTreeCtrl the nodes have a DWORD data item and I want to make use of that as a 24 bit value and an 8 bit value. What would be a nice way of getting and setting the DWORD from two other variables? Thanks, Ben.
The problem you've got here is that you were trying to split the DWORD using a mouldy old leaf. You really need something like a bandsaw to split that DWORD neatly.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
This should be pretty easy, right? I'm feeling pretty brain dead right now, though... In CTreeCtrl the nodes have a DWORD data item and I want to make use of that as a 24 bit value and an 8 bit value. What would be a nice way of getting and setting the DWORD from two other variables? Thanks, Ben.
As with questons on CP, you have to know where to put which bits.
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
The problem you've got here is that you were trying to split the DWORD using a mouldy old leaf. You really need something like a bandsaw to split that DWORD neatly.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
Please don't split into the wind! :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]:laugh:
There are some really weird people on this planet - MIM.
-
Is this is a programming question? :~
Dave Please support my CPRepWatcher article in the August competition! Find Me On: Web|Facebook|Twitter|LinkedIn
It is.
There are some really weird people on this planet - MIM.
-
It is.
There are some really weird people on this planet - MIM.
-
Pass all values to a CListCtrl...
I wanna be a eunuchs developer! Pass me a bread knife!
Beaten to the punchline again
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP