Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
F

Freddie Code

@Freddie Code
About
Posts
38
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Char String to String ^ - Help Needed
    F Freddie Code

    I think I found a workable solution. I would not start a new project doing it this way but I'm working with some legacy code that is unmanaged so I need to deal with char arrays as string from C. To convert from char array to String in VS C++ .Net Managed Code use: gcnew System::String (YourCharArrayStringToDisplay); So for example, char ThingToShow[100] sprintf( ThingToShow, "This works!"); MessageBox::Show(gcnew System::String(ThingToShow)); Here is the link that I found it in: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/adcadbc1-9092-41ba-8deb-01e800f0b172[^] :)

    .NET (Core and Framework) c++ help csharp question announcement

  • Char String to String ^ - Help Needed
    F Freddie Code

    I'm using Visual C++ 2005 .NET. (I'm new to .Net programming) How do you convert a char string to a String ^ for printing in RichTextBox? Thanks. This is my code which does not work. char StringToDisplay[100] = {'\0'}; char StringToConcat[100] = {'\0'}; char chDllVersion[80]; // chDllVersion is returned from another function sprintf( StringToConcat, "dll version in use = %s ",chDllVersion); strcat( StringToDisplay, StringToConcat ); RichTextBox1->Text = StringToDisplay; // <- This gives an error because StringToDisplay Type is not of correct type

    .NET (Core and Framework) c++ help csharp question announcement

  • How do I update a Form from a function?
    F Freddie Code

    Figured it out.... You need to go to the Class View, right click on your Form, Add New Function then choose the file that you want to add the function to. Make sure that the file you add the function to is #included into the project. Make sure the file you add the function to has #include "stdafx.h" as the first line of the file.

    C / C++ / MFC question csharp c++ visual-studio announcement

  • How do I update a Form from a function?
    F Freddie Code

    I'm using Visual Studio 2005 C++. I want to update the controls on a form from within a function. The function is in a seperate file from the main form so the function can not "see" the memebers of the form. Do I have to pass the form to the function? The form controls seem to be "private" to the main form so I dont know if it will allow them to be changed from another function. Can someone give me some guidance on this, or a sample function call would be great. Thanks.

    C / C++ / MFC question csharp c++ visual-studio announcement

  • Directory.GetFiles Method (String) - VB.NET 2005
    F Freddie Code

    I have the GetFiles method working correctlynow, thanks. GetFiles reutrns the complete path, not just the file name. Searching the help, there does not seem to be a method that just returns the file name. My goal is to prepend the file names per the users input in a textbox. What would be the best way to do this? Since the file name returned by GetFiles includes the entire path, is there an easy way to extract just the file name, modify it and resave it? Thanks.

    Visual Basic csharp com help question

  • How to send email using vb?
    F Freddie Code

    Does this approach require a Mail Server running on the same machine as the application?

    Visual Basic help tutorial question

  • Directory.GetFiles Method (String) - VB.NET 2005
    F Freddie Code

    According to the Microsoft Online Help: http://msdn2.microsoft.com/en-us/library/07wt70x2.aspx For VB.NET, it says to declare GetFiles per below before using it. Why do you need to redeclare it in your code? I would thing that if it is part of the System.IO Namespace, it is already declared? Help, very confused.:confused: 'Namespace: System.IO 'Visual Basic (Declaration): Public Shared Function GetFiles(path As String) As String() 'Visual Basic (Usage): Dim path As String Dim returnValue As String() returnValue = Directory.GetFiles(path)

    Visual Basic csharp com help question

  • VB.NET 2003 Articles for VB.NET 2005 ??
    F Freddie Code

    Coming from VB6, I'm jumping straight to Visual Studio VB.NET 2005 Express (skipping VB.NET 2003). When I search this site or the Web for VB.NET 2005 article or sample code I get a lot of hits for VB.NET 2003 articles and code. 1) Can I assume that articles and code for VB.NET 2003 will work in VB.NET 2005? 2) I'm particularly interested in File and Directory manipulation. Reading all file names in a directory tree, changing their names, creating directories, copying, deleting etc. Does VB.NET 2005 have significant improvements/changes in this area over VB.NET 2003? Thanks.

    Visual Basic csharp visual-studio data-structures question

  • Pass parameters and execute a console Application from VB.NET?
    F Freddie Code

    Thanks RageInTheMachine953, This works quite nice. How can you test to see when the process is completed?

    Visual Basic question csharp linux help

  • about Parallel Port Programming???
    F Freddie Code

    For the hardware connection to the parallel ports and some sample code in C, see this website: http://www.phanderson.com About half way down the page are some books/workbooks he wrote about connecting hardware motors and such to the parallel port and programming them with the PC. The code won't apply, but he gives some great circuits and theory. I have both books and they are an excellent intro to controlling stuff with the parallel port. "Use of a PC Printer Port for Control and Data Acquisition - Volume 1" "Use of a PC Printer Port for Control and Data Acquisition - Volume 2"

    Visual Basic csharp tutorial question

  • Pass parameters and execute a console Application from VB.NET?
    F Freddie Code

    Hi, I'm experimenting with VB.NET 2005 Express. I want to write a VB.NET front end to repeatedly call a console application. My question is: How can you pass command line parameters to and execute a console Application from VB.NET? Specifically, how to pass the command line parameters, execute the cosole application and then test to see when it has completed? I found this sample code in the VB.NET help. It calls the console app but I need some help with how to pass command line parameters and test to see if the cosole application is done. ' (2) Call a Visual Basic run-time function (Shell), discard the return value. Call Shell("C:\WINNT\system32\calc.exe", AppWinStyle.NormalFocus) Anyone? Thanks. -- modified at 21:14 Tuesday 24th January, 2006

    Visual Basic question csharp linux help

  • MFC Check Box
    F Freddie Code

    Thanks, this is what I needed! :)

    C / C++ / MFC c++ question

  • MFC Check Box
    F Freddie Code

    How do you check if a check box has been checked? I created a check box named IDC_checkbox and assigned a member variable of type Value named m_checkBox.

    C / C++ / MFC c++ question

  • Writing Data to an Open File
    F Freddie Code

    In VC++6 MFC I'm using the CFileDialog Class to get a filename from the user as in the code below. How do I write ASCII data to the file that is returned. How can I write "Hello World" to the file. Can I use fprintf? What would the file handle be? char strFilter[] = { "CANMon Files (*.canmon)|*.canmon|All Files (*.*)|*.*||" }; CString canLogFile; CFileDialog FileDlg(FALSE, ".bcr", NULL, 0, strFilter); if( FileDlg.DoModal() == IDOK ) { f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite); CArchive ar(&f, CArchive::store); canLogFile = FileDlg.GetFileName(); sprintf(szPrintString, canLogFile); m_logboxTestVariable.AppendString (canLogFile); }

    C / C++ / MFC question c++

  • VC++ .NET saveFileDialog
    F Freddie Code

    I figured out what I was doing wrong. I did not realize that the return type of the file name is a pointer, so it needs to be declated like this. String *myFileName; :laugh::laugh::laugh:

    C / C++ / MFC tutorial csharp c++ question

  • VC++ .NET saveFileDialog
    F Freddie Code

    For whatever reason, my .NET compiler is not liking the declaration of a variable as CString Type. I wonder if there needs to be included another .h file to be able to use String type? Compiler does not like this: CString myFileName;

    C / C++ / MFC tutorial csharp c++ question

  • VC++ .NET saveFileDialog
    F Freddie Code

    I want to get a file name back from the saveFileDialog box and store it as a global variable. What Type should I declare this varialbe as? Seems like the return type for the saveFileDialog file name is String and the compliler is not liking this Type.. Anyone have a simple VC++ .NET example on how to get the user selected file name back from the saveFileDialog box and stored in a variable? Thanks.

    C / C++ / MFC tutorial csharp c++ question

  • Power Supply Tester
    F Freddie Code

    Could also be that your Voltage Meter is not accurate.

    Hardware & Devices php com testing beta-testing question

  • Custom Controls in VC++ .NET
    F Freddie Code

    I finally go the hang of creating custom controls in VC++6 MFC Wizard. I now need to create some custom controls in Visual C++ .NET (EditBox based). From what I've been reading, the way to do this in .NET is to create the contol in a .dll made with a "Managed C++ Class Library" project. Problem is, I don't want to have to link a .dll. I want the custom contol compiled right into the main program. How can I make a custom control that is compiled right into the project? :wtf: :confused: Thanks.

    C / C++ / MFC c++ question csharp help

  • Need help with Worker Thread Code
    F Freddie Code

    I'm a newbee with MFC. I'm following this article on Worker Threads: http://www.codeproject.com/threads/usingworkerthreads.asp[^] With the following code I'm getting the following error. Any suggestions as to what is going on here? : error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'void (void)' // getcanmessages.cpp: implementation of the Cgetcanmessages class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "canmon.h" #include "getcanmessages.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// static UINT run(LPVOID p); void run(); volatile BOOL running; Cgetcanmessages::Cgetcanmessages() { } Cgetcanmessages::~Cgetcanmessages() { } void Cgetcanmessages::gogetcan() { running = TRUE; AfxBeginThread(run, this); //<<<---this is the error line. } UINT Cgetcanmessages::run(LPVOID p) { Cgetcanmessages * me = (Cgetcanmessages *)p; me->run(); return 0; } void Cgetcanmessages::run() { //add worker tasks here. }

    C / C++ / MFC c++ help question com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups