Jump to content
  • Advertisement

Codorke

Member
  • Content Count

    64
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Codorke

  • Rank
    Member
  1. Quote:Original post by superdeveloper Lol! Just open it in Notepad, and save it as "ansi" in the encoding type option :) I had this same problem (I needed unicode from ansi), and notepad saved my life. Can this also be done from inside my application. Something like opening the and giving with some option to resave it as ansii encoded ? thanks
  2. Hi, I'm using a dll file like this : #using <mscorlib.dll> but my compiler gives me the error : fatal error C1190: managed targeted code requires '#using <mscorlib.dll>' and '/clr' option If i change the 'Used Managed Extensions' option to Yes, all the other classes i made are beeing compiled also with this option. How can i code this option inline so only this dll file is compiled with /clr option ? (I already found the method #pragma unmanaged and #pragma managed but do i have to put this before every class/function i already made ?) Thanks. (C++)
  3. This is indeed working well. Thanks all for the replies and help !!!
  4. I'm using it like you said but now i getting the error : System::String can only create a __gc on the __gc_heap My Code : System::String* unencodedString = System::String(text.c_str()); --> Error Byte encodedBytes[] = ascii->GetBytes(unencodedString); IEnumerator* myEnum = encodedBytes->GetEnumerator(); while (myEnum->MoveNext()) Byte b = *__try_cast<Byte __gc*>(myEnum->Current); // Decode bytes back to String*. System::String* decodedString = ascii->GetString(encodedBytes);
  5. This is really getting to much for me !!! How can i do this conversion (see subject) ? I'm programming in Microsoft Visual Studio 2003 .NET Framework 1.1 (C++). maybe a lexical_cast< ... > but i dont know how. Can someone help me out please ? Thanks !!!!!!
  6. I found in the MSDN under the .NET Framework Class Library an ASXIIEncoding Class [C++]. Did anyone worked with this already ? Liked some suggestions for using it or not ...
  7. I want to be able to extract the text from a pdf file (whats already ok through the library i'm using (pdflib)) and show the text in my openGL 3D Book. But the library only writes the text in a unicoded txt file. So i need to be able to open this unicoded txt file read in the data and then show it in my 3D Book. And this all at run time of the program. (-> can't use nodepad to translate it) Edited : To show the data in my 3D Book, the data has to be ANSI ASCII.
  8. Hi, How can i convert a unicode-txt file to a ansi-txt file ? I'm using a library thats converting a pdf file to a unicoded txt file and there are no options to change the encryption. How can i read this unicoded txt file or convert it to an ansi txt file ? (C++)
  9. Codorke

    initialize

    if your msg is not been initialized there is also no data attached to your msg var. The compiler can't do the comparision and the run-time error arises. (It would be easier for us if we know which error arises.)
  10. Codorke

    Help finding tile under cursor

    If you are using a class for creating the tiles you could add a function to your class like : IsTilePicked(mouse_x_coord, mouse_y_coord) If the coord of your mouse are within the borders of your tile coordinates then return true else return false;
  11. Codorke

    PDF Reader Library for C++

    I tested out the pdflib library but i can only open a pdf document of max 10 pages an up to 1 MB with the evaluation library. I'm looking for some library free of charge and full featured. This library is indeed that where i'm searching for but it's to limited. The fastio is only creating and editing pdf documents and its not for reading them. I also went to the official adobe site for more information but it seems they only sale there devlopment libraries SDK's. Does anyone knows other good free usable PDF (reader) Libraries i could use ? Thanks a lot. Edited : SDK's or COM's are helpfull as well ! [Edited by - Codorke on August 23, 2005 9:06:42 AM]
  12. Hi, I wanted to write some basic code for reading in a TXT file. I i used strcpy and strcat my applic had his own personality. He crashed only a few times but, he crashed. So i debugged it and when he crashes he had problems with strcpy and strcat. Now i wanted to use a safer method then strcpy and strcat but there still some bugs. Does someone wants to look at my code and help me out ? // char* myText; => private class member of cReaderTXT // myText = new char[1]; // myText[0] = '\0'; => Initialization //#define READIN_LINE_SIZE_TXT 256 bool cReaderTXT::leesBestand() { fstream bestand(getPath(), ios :: in); if(bestand.fail())return false; if(!bestand.eof()) { char buffer[READIN_LINE_SIZE_TXT]; bestand.getline(buffer, sizeof(buffer)); char* temp = new char[1]; temp[0] = '\0'; StringCbCopy(temp, sizeof(buffer)+sizeof(char), buffer); // strcpy(temp, buffer); StringCbCat(myText, sizeof(myText)+sizeof(temp)+sizeof(char), temp); // myText = temp; while(!bestand.eof()) { StringCbCat(myText, sizeof(myText)+sizeof(char)+sizeof(char), "\n"); // strcat(myText, "\n\0"); bestand.getline(buffer, sizeof(buffer)); temp = new char[strlen(buffer)]; StringCbCopy(temp, sizeof(buffer)+sizeof(char), buffer); // strcpy(temp, buffer); StringCbCat(myText, sizeof(myText)+sizeof(buffer)+sizeof(char), temp); // strcat(myText, temp); } }else return false; bestand.close(); return true; } Thanks
  13. The first thing my program is doing now is creating the mutex. And like you all said the last thing is releasing it. I know how to create a mutex but didn't knew wherefor they where used. Thanks a lot to help me out !
  14. question 1 : HWND hWnd = GetDesktopWindow(); HDC hDC = GetWindowDC(hWnd); [/qoute] What's the different between the GetWindowDC(hWnd) and the wglGetCurrentDC() function ? I'm always using wglGetCurrentDC() to get my hDC handler, so i don't have to get the hWnd handler first. Is ther another difference between these two ? question 2 : I'm still a leek in using lists but if i'm right the font_list is the array where all the ANSI charset fonts are listed in ? (I'm going to learn more about lists because i've the feeling it could help me out in a lot of different cases)
  15. The application is focused to run under windows XP. I'm already using different functions who are only supported by windows XP so windows is the targetted platform. I'm using the NeHe's standerd code to run my openGL window. So i'll need too create the mutex in the InitGL or better in the CreateGLWindow function ?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!