Search found 675 matches

by Wanderer82
Sun Mar 31, 2024 9:36 pm
Forum: C++ Development
Topic: Binary data in wxString to ASCII
Replies: 9
Views: 4376

Re: Binary data in wxString to ASCII

//Read data from registry value std::string ReadRegistryBinaryValueToString(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName) { std::string binaryString; HKEY hOpenedKey; if (RegOpenKeyEx(hKey, lpSubKey, 0, KEY_READ, &hOpenedKey) == ERROR_SUCCESS) { DWORD dwType; DWORD dwDataSize; // First, get...
by Wanderer82
Sun Mar 31, 2024 5:37 pm
Forum: C++ Development
Topic: Binary data in wxString to ASCII
Replies: 9
Views: 4376

Re: Binary data in wxString to ASCII

I have tried several options to convert the string. Actually I didn't think about the encoding. I thought that a string is always the same and if I just display it in a wxMessageBox (which is possible), it's converted correctly. So one that I tried was: wxString message = wxString::From8BitData(asci...
by Wanderer82
Sat Mar 30, 2024 12:44 pm
Forum: C++ Development
Topic: Binary data in wxString to ASCII
Replies: 9
Views: 4376

Re: Binary data in wxString to ASCII

Yes, that's it. But I have already managed that. I just can't convert this string to a wxString. I always get an empty string when I show the wxMessageBox. If I output the string to a file or to the console, the correct "text" is shown. EDIT: I have another problem: I'm trying to get rid o...
by Wanderer82
Sat Mar 30, 2024 10:15 am
Forum: C++ Development
Topic: Binary data in wxString to ASCII
Replies: 9
Views: 4376

Re: Binary data in wxString to ASCII

I didn't say that it was a string. The screenshots shows the registry editor for the value "Favorites" here: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband So on the left and the middle there are only numbers and / or letters. I thought that this is binary or...
by Wanderer82
Sat Mar 30, 2024 1:30 am
Forum: C++ Development
Topic: Binary data in wxString to ASCII
Replies: 9
Views: 4376

Binary data in wxString to ASCII

Hi In the registry I have a REG_BINARY value. I need the ASCII form, so that I can read some text. In the registry editor it looks like the picture I have attached. What I need is the part on the right side. If I have a wxString with the binary data, how could I convert this to the ASCII form? Or is...
by Wanderer82
Sun Mar 17, 2024 4:36 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

Aha, I found it. As I have four files when Code::Blocks creates a wxWidgets project, I didn't look into them but only into the main.cpp one. Here I found the OnInit() function which shows the frame. Thanks for pointing me this way :D
by Wanderer82
Sun Mar 17, 2024 4:18 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

Okay, I got it to work finally. I have a busyInfoTimer where I put the creation of the splash screen into and I'm creating it on the heap now. Doing it like that, the image of the splash screen appears. But I have a new problem: I want the main window to only appear when the MyWorkerFunction has end...
by Wanderer82
Sun Mar 17, 2024 2:40 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

Well, the other question is: Is the problem really inside my splash screen.
by Wanderer82
Sun Mar 17, 2024 2:18 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

Well then I guess, this is the problem. But when I call MyWorkerFunction, shouldn't the dialog remain open as long as the MyWorkerFunction takes to execute? Or could it be that I use Sleeps inside the MyWorkerFunction which prevent the dialog from being shown? What would be another option to keep th...
by Wanderer82
Sun Mar 17, 2024 2:13 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

You say, that something else might be going on. But when I don't call MyWorkerFunction there is nothing that my app does after this. It just shows the main window and waits for user interaction. But still then the dialog isn't shown at all. I guess it has something to do with starting / showing the ...
by Wanderer82
Sun Mar 17, 2024 2:09 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

With your code I get three errors: obj\Release\Wallisellen_Autoconfig_2023App.o:Wallisellen_Autoconfig_2023App.cpp|| multiple definition of `wxCreateApp()'|obj\Release\Wallisellen_Autoconfig_2023App.o:Wallisellen_Autoconfig_2023App.cpp|| multiple definition of `WinMain'| obj\Release\Wallisellen_Auto...
by Wanderer82
Sun Mar 17, 2024 1:20 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

You mean in the SplashScreen.cpp where I creat the wxDialog? Like so: SplashScreen::SplashScreen(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size) : wxDialog(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSTAY_ON_TOP | wxBORDER_NONE), m_dotCount(0), m_t...
by Wanderer82
Sun Mar 17, 2024 12:42 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

I replaced wxDialog with wxFrame, but there was no difference, still a black window. I tried putting a wxMessageBox in the OnPaint event handler and it doesn't show. So I think, the OnPaint event handler really isn't called. In the MyWorkerFunction there are some Sleeps, maybe this is the reason why...
by Wanderer82
Sun Mar 17, 2024 12:06 am
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

I can't think of anything in MyWorkerFunction that would make the dialog show. I didn't change this code after I created the splashscreen dialog.

Hm, how do I derive SplashScreen from a wxFrame? I mean, how do I have to change my code? I know, I'm in many things still a beginner :roll:
by Wanderer82
Sat Mar 16, 2024 11:38 pm
Forum: C++ Development
Topic: Background image in wxDialog doesn't show up
Replies: 30
Views: 15118

Re: Background image in wxDialog doesn't show up

If I don't call MyWorkerFunction the dialog doesn't show up at all.