
Announcement
Collapse
No announcement yet.
Resourcequestion - value as string
Collapse
X
-
>I am using RCDATA a lot, so handy
Gee, no kidding. Nice to know someone finally got some use out of that that demo I posted almost SIX YEARS AGO. All in all, kind of inspiring. Gives me that warm and fuzzy feeling I crave from time to time.
User-Defined Resource Demo January 26 2003
Leave a comment:
-
I would need to write me a new system then.
The above works for me fine, i am using defines and looks good.
Your code does work as well, the L makes it a dword and is interesting for prefilling structures for example..
I am using RCDATA a lot, so handy.
Leave a comment:
-
Why not just store the OR'd flags as an integer in the resource?
Code:#define flags 1L|2L|8L TEST RCDATA begin flags end
For all I know this might work...
Code:TEST RCDATA BEGIN 1L | 2L | 8L END
MCM
Leave a comment:
-
Sigh.. must had a clear mind today, found it myself (PwrDev code):
Code:TEST RCDATA { 100L, "1|2|8" "\0" }
Code:Function Test() As Long Local T As String Local a As Long Local dwFlags As Dword T = VD_RES_LoadDataString( VD_App.hInstance, "TEST", 100 ) For a = 1 To ParseCount( T, "|" ) dwFlags = dwFlags Or Val( Parse$( T,"|", a ) ) Next MsgBox Format$( dwFlags ) End Function
Leave a comment:
-
Resourcequestion - value as string
I wrote a 'system' where i can obtain a string from a RCDATA using indexes like:
100L, "HELLO\0"
101L, "HELLO TOO\0"
The hello part is used to store flags as well (not shown).
I just wonder how i can do something like this:
100L, "1 or 2 or 8"
Of course, this remains text, i need the or'd flag but in readable text.
It should be "11"
I don't think it is possible but would like to try.Tags: None
Leave a comment: