wxFileOffset to long? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Earned some good credits
Earned some good credits
Posts: 135
Joined: Sun Mar 23, 2008 12:09 am

wxFileOffset to long?

Post by ouch67 » Sun Jun 22, 2008 9:11 am

I'm trying to take a text hex string and convert it into a file position.

So I'm wondering how I do that in wxwidgets exactly?

I know to send the string to ToLong, but I can't seem to find a way to convert that long into that wierd wxFileOffset vaar type that every file command seems to need in wxwidgets.

Also there really needs to be more info on wxFileOffset and why it's even needed. I can only find 2 sentences in the docs mentioning it.

Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Jan 01, 2005 6:19 pm

Post by Frank » Sun Jun 22, 2008 11:22 am

What's strange about it? It's just a typedef to a long or a long long (depends on your platform).

So, all you have to do is this:

wxFileOffset offset = MyLongVariable;

I just tested it, works fine.

Post Reply