GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)
Re: GTA2 Font Topic - txt2gta2 released!
Sorry, i found that my IntToString doesn't work for license plates.
I don't know why. If you generate the plates it will display that file not found.
Can you debug this part by yourself?
Something goes wrong in there.
If it doesn't start working, use your old version of IntToString.
I don't know why. If you generate the plates it will display that file not found.
Can you debug this part by yourself?
Something goes wrong in there.
If it doesn't start working, use your old version of IntToString.
Re: GTA2 Font Topic - txt2gta2 released!
Try ShellExecute and SW_HIDE.
Re: GTA2 Font Topic - txt2gta2 released!
Of course, Sektor is correct.
I was wondering why all the mess around "system()".
Is there any particular reason why you use it?
As Sektor said, you can execute almost anything you want with ShellExecute and you can control it's window, command line etc.
Hide it, maximize it, show it as it is and so on.
Read more about it here:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
I was wondering why all the mess around "system()".
Is there any particular reason why you use it?
As Sektor said, you can execute almost anything you want with ShellExecute and you can control it's window, command line etc.
Hide it, maximize it, show it as it is and so on.
Read more about it here:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
I only use system() because that worked with version 2 and the other ones I tried never freaking work. Always some kind of weird error. It seems that I'm actually working now with .NET and C++ at the same time. The GUI functions in Visual Basic 2008 is from .NET, I didn't know that, I just used it. Learning C++ and .NET at the same time is confusing, for example, the stupid System::String^ isn't native/normal C++ is it?B-$hep wrote:Of course, Sektor is correct.
I was wondering why all the mess around "system()".
Is there any particular reason why you use it?
As Sektor said, you can execute almost anything you want with ShellExecute and you can control it's window, command line etc.
Hide it, maximize it, show it as it is and so on.
Read more about it here:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
To be honest, I cannot get the ShellExecute working...
I add #include <shellapi.h> and ShellExecute(NULL, "open", "imagemagick\\convert.exe", NULL, NULL, SW_SHOWNORMAL);
And what do I get: error LNK2001: unresolved external symbol "extern "C" struct HINSTANCE__ * __stdcall ShellExecuteA(struct HWND__ *,char const *,char const *,char const *,char const *,int)" (?ShellExecuteA@@$$J224YGPAUHINSTANCE__@@PAUHWND__@@PBD111H@Z)
"Mmmm, your eyes are so beautiful."
Re: GTA2 Font Topic - txt2gta2 released!
You forgot to link shell32.lib.
Under Project->Properties choose Linker.
Then you will see Command Line.
Click on it. Then you will see empty white box on the window.
Type this in: shell32.lib
Click OK and build EXE again.
Im using VC++ Express but the project options window should be same.
Try this, if doesn't work, let me know.
EDIT: you said .NET and C++. So you actually use managed C++ and not the native WIN32 one?
When you started working on GUI version of your tool, what project did you created with VS Wizards?
CLR->Windows Forms Application ?
Or Win32->Win32 Project?
Under Project->Properties choose Linker.
Then you will see Command Line.
Click on it. Then you will see empty white box on the window.
Type this in: shell32.lib
Click OK and build EXE again.
Im using VC++ Express but the project options window should be same.
Try this, if doesn't work, let me know.
EDIT: you said .NET and C++. So you actually use managed C++ and not the native WIN32 one?
When you started working on GUI version of your tool, what project did you created with VS Wizards?
CLR->Windows Forms Application ?
Or Win32->Win32 Project?
Re: GTA2 Font Topic - txt2gta2 released!
OK, as it turned out that it's a managed C++ and you can't use the usual ShellExecute.
You could use Process::Start method
http://msdn.microsoft.com/en-us/library ... start.aspx
http://msdn.microsoft.com/en-us/library ... 71%29.aspx
Read the whole page, it has info about command line also.
But i don't see any chance to hide the window. Probably you could send message to window (SW_HIDE).
But first try to make it work for you and worry about hiding flashing console window later.
EDIT: almost forgot. You must add this to the top of your code:
You could use Process::Start method
http://msdn.microsoft.com/en-us/library ... start.aspx
Code: Select all
Process::Start("IExplore.exe");
Read the whole page, it has info about command line also.
But i don't see any chance to hide the window. Probably you could send message to window (SW_HIDE).
But first try to make it work for you and worry about hiding flashing console window later.
EDIT: almost forgot. You must add this to the top of your code:
Code: Select all
using namespace System::Diagnostics;
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
New color system is getting shape.
Example text input: [1]Cuban-Pete [5]likes [7]fast [15]cars and [10]woman!
Output:
Example text input: [1]Cuban-Pete [5]likes [7]fast [15]cars and [10]woman!
Output:
"Mmmm, your eyes are so beautiful."
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
Anybody any idea how to convert System::String^ to std::string? I use string to get into system(), but the user input is in System::String^.
Do you guys also perhaps know why running my program the first time (after computer restart) takes pretty long, but the next time it goes very quick? How can I fix that?
Do you guys also perhaps know why running my program the first time (after computer restart) takes pretty long, but the next time it goes very quick? How can I fix that?
"Mmmm, your eyes are so beautiful."
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
I fixed the string thing, perhaps a bit "ugly", but it works:
Code: Select all
string SystemToString(String ^blabla){
int lenght = blabla->Length;
string realString = "";
for (int i=0; lenght > i; i++){
realString += char(int(blabla[i]));
};
return realString;
};
"Mmmm, your eyes are so beautiful."
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
I fcked it all up, just when I was almost at the end. I removed a resource image in the (resX?) by hand (I just needed to update the preview image) and now I get LNK2005 error's... this really sucks. Do you guys know a way to find the problem by hand?
What I did was rename an image to "222" and added a new one, but removed the "222" again or something like that...
What I did was rename an image to "222" and added a new one, but removed the "222" again or something like that...
"Mmmm, your eyes are so beautiful."
Re: GTA2 Font Topic - txt2gta2 released!
Damn, so many posts here already. Didn't notice.
What errors exactly? How many of them?
What errors exactly? How many of them?
Re: GTA2 Font Topic - txt2gta2 released!
I finally got around to trying this program. It's cool.
I used it to generated some text for this page.
I used it to generated some text for this page.
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
Thanks. The page looks nice.Sektor wrote:I finally got around to trying this program. It's cool.
I used it to generated some text for this page.
"Mmmm, your eyes are so beautiful."
Re: GTA2 Font Topic - txt2gta2 released!
How is your work on GUI or this tool going?
If you have some problems, post them here.
If you have some problems, post them here.
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
It's going good.
Only small problem with a function, you can only check the System::Object^ sender with the real name and not a string.
I also wanted to do colouring in richTextBox, but I don't get that working. I can make for example "[0]" to grey color, but if there is another [0] in the richtextbox, I can't get it....
Only small problem with a function, you can only check the System::Object^ sender with the real name and not a string.
I also wanted to do colouring in richTextBox, but I don't get that working. I can make for example "[0]" to grey color, but if there is another [0] in the richtextbox, I can't get it....
"Mmmm, your eyes are so beautiful."
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
Code: Select all
if (this->radio_large->Checked == true){
this->example_large->Visible = true;
this->example_normal->Visible = false;
this->example_menu->Visible = false;
this->example_street->Visible = false;
this->example_car->Visible = false;
};
"Mmmm, your eyes are so beautiful."
Re: GTA2 Font Topic - txt2gta2 released!
What are they?
Buttons? Labels? Checkboxes?
You could all hide all at once with simple panel.
Put panel on the top of the controls and hide / unhide just this panel.
Buttons? Labels? Checkboxes?
You could all hide all at once with simple panel.
Put panel on the top of the controls and hide / unhide just this panel.
Always wear safety glasses while programming.
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
They are images.
I have no idea about cleaning up strings/integers. Is that necessary? (garbage collection?)
I have no idea about cleaning up strings/integers. Is that necessary? (garbage collection?)
"Mmmm, your eyes are so beautiful."
Re: GTA2 Font Topic - txt2gta2 released!
.NET has garbage collector, you don't need to mess with that.
It automatically collects garbage.
But where are your images? On the main form?
It automatically collects garbage.
But where are your images? On the main form?
Always wear safety glasses while programming.
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Font Topic - txt2gta2 released!
yeah, they are example images of the font the user selected.
I thought perhaps this is possible (but it did not work):
this->example_car->Visible, this->example_normal->Visible = false;
I thought perhaps this is possible (but it did not work):
this->example_car->Visible, this->example_normal->Visible = false;
"Mmmm, your eyes are so beautiful."