Software Development Network Logo
  • Microsoft ISV
  • SharePoint Products
  • IE Development
  • VS Team System
  • Visual C++
  • Visual FoxPro
  • Visual Studio
  • Smart Devicet
  • Visual Basic
  • .NET Development
  • Visual C#
  • Windows Vista
  • Game Technologies
  • SQL Server
  • Audio and Video

Software Development Network >> Visual C++

Visual C++

New Question

VC++ 2005 redistributable
IMPLEMENT_DYNAMIC() error
Changing Static properties.. Is this impossible?
UI thread dialog???
Dynamically allocated arrays of strings
I want to send a keyboard message (enter key whose name is VK_RETURN) to that window, can you write this statement for me,
How do I run another application from an application using a button?
how to import pure c++ into class library
formatting output to a file
Added an Event like OnTimer in VC++2005

Top Answerers

KLankford
bshive
Gavin Lilley
Michael Herman - Parallelspace
tasleemarif
Lixin wang
Ragavendra
prk
Nasir_khan_persistent
Rui Dias VD
sitemap
Only Title

Answer Questions

  • aybe A Problem with feof()

    I am trying to build a program that, among other things, loads data from a binary data file, I use fread() in a while loop with condition !feof. every thing loads fine but the last part of the file loads twice creating a duplecate element at the end of the list. Does anyone know why this is and if it can be avoided; hear is my source code for the loading function: afx_msg void EditWindow::OnOpen() { if(head) { while(current->next) { current = current->next; } while(current!=head) { current=current->prev; delete(current->next); current->next = NULL; } delete(current, head); head =NULL; current = NULL; } ReadOutIn o; FILE* loadPointer = fopen("Level.lvl", "rb"); if(loadPointer) { while(!fe ...Show All

  • Brian Kramer Reading CSV data from a byte array

    I'm writing a C++/CLI (vs2005) app and would like to read in CSV data from a byte array. Is there any .Net classes that I should be using to read the CSV data If not, what are my options I am not aware of any. You can write your own one. The byte array contains csv data. For example, the following contains 6 records where the 4th record contains two carriage returns. Are there any .Net classes for me to use to extract the data values in rows and columns format /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// line 1 is field names: "data_test","text_test","memo_test" line 2 is rec ...Show All

  • Thomas Greenleaf LNK2005 on new/delete

    Hi I have a project that generates an EXE which uses MFC, and also links in static libraries that use STL. During the link phase, I get the following errors: GIPSSipVoiceEngine error LNK2005: "void * __cdecl operator new(unsigned int)" ( 2@YAPAXI@Z ) already defined in GIPSSipVoiceEngineDll_debug.lib(AppDialogSet.obj) GIPSSipVoiceEngine error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" ( 3@YAXPAXHPBDH@Z ) already defined in GIPSSipVoiceEngineDll_debug.lib(AppDialogSet.obj) I read a KB article(148652) that indicated that the C-Run time was being linked before the MFC libraries, and this needs to be reversed. So what I did was, as the KB article indicates, look inside AFX.h, and get the ...Show All

  • Jason P summing elements of a vector(class) with class elements

    Hi, I'm using Visual Studio 2005 and trying to use "accumulate" function in order to sum elements of type vector class. However, the elements of the vector in question have are objects, namely: class bond { public: double strength, prob; bond() : strength(0), prob(0) {} bond(double x, double y) : strength(x), prob(y) {} }; void main() { vector<bond> bond_array(N); // N: very large double sum_total //say the elements of vector bond_array are full with values ... sum_total=accumulate(bond_array.begin(), bond_array.end(), 0); //This command is incomplete, see the question. ... } What I'm trying to accumulate is actually ".prob" of all elements of type bond in vector, and the parameter sum_total will be assigne ...Show All

  • Roffern Trying to change the menu fonts and dialog box to Arial in MFC

    Hi, We are trying to change the menu fonts to Arial in MFC i.e. changing the fonts of File, Edit etc options to Arial from the font set by default. I tried to do this in the OnCreate function by doing it this way NONCLIENTMETRICS ncm = { sizeof(NONCLIENTMETRICS) }; bool x = ::SystemParametersInfo ( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, false ); if(x == false) DWORD d = GetLastError(); strcpy(ncm.lfCaptionFont.lfFaceName, "Arial"); strcpy(ncm.lfSmCaptionFont.lfFaceName, "Arial"); strcpy(ncm.lfMenuFont.lfFaceName, "Arial"); strcpy(ncm.lfStatusFont.lfFaceName, "Arial"); strcpy(ncm.lfMessageFont.lfFaceName, "Arial"); ::SystemParametersInfo ( SPI_SETN ...Show All

  • AlexBB program terminates early??!!!

    Hi: I am very new in C-programming and trying to practice on visual c++ 2005 express edition. Everytime I compile the program, there are no errors, but when I run the program it will not play the entire program. Example bellow will only show the initial cout, to enter the characters, But once you enter the data and press enter the program terminates. I even put in a extractor operator so the program will be forced to show everything before it, but the program still terminates without showing anything. I get a The program '[1332] get.exe: Native' has exited with code 0 (0x0). in the output windows. I would appreciate any help in this matter. Thank you. #include <iostream> #include <string> u ...Show All

  • Mike Hildner warning C4005/RC4005 macro redefinition/redefinition

    I am creating a dialog resource and it contains the ubiquitous OK button. The id for this button, IDOK, is being given the value 1001 by the resource compiler. IDOK is also defined in winuser.rh with a value of 1. This is causing two warnings to be issued, C4005 for the former and RC4005 for the latter. What is the best solution for resolving this issue I am contemplating either manually changing the value in resource.h to 1 or removing the definition altogether from resource.h. Thanks in advance for your assistance. Change it in the resource header and see where that leads you. Something along the lines of: #ifndef IDOK #define IDOK 1 #endif #ifndef IDCANCEL #define IDCANCEL 2 #endif ... ought to do it. Tha ...Show All

  • OClaudiu Including text files in projects which show up in solution explorer

    Hello. This should be a fairly simple question to answer with any luck. I am trying to include text files with commentary on my code so someone else in a far off land and time could understand my program ;). With my program, some commentary is too lengthy to be put in the code, so I want to be able to have text files with more information accessible from the solution explorer for someone trying to follow the code. When Visual Studio generates a new Windows forms project, a file 'readme.txt' appears in the solution explorer which contains some explanations, etc. How can I make my own text files appear just like this readme file I am using the express edition of the compiler, in case that is relevant. Thanks a bunch. ...Show All

  • siavoshkc Mouse Coordinates

    Hi, I'm trying to write a simple app that just show the mouse coordinate in a Static control when the mouse is moved over picture box, I have a dialog app with a PictureBox and a Static Label (It has an OK and Cancel too) - I've created a control variable and a class to deal with the MouseMove event on the picture, but when I come to access the Static control in the MouseMove event I run into problems. Originally I tried using getDlgItem and casting it to a CStatic and setting the window text on the MouseMove event, this caused the app to crash (Not quite sure why) Then I tried to create a control variable for the Label, this belongs to the dialog box so isn't available to the MouseMove event which is handled in the class I created for the ...Show All

  • K.Kong why i can't find the definition of the function throw()?

    LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong) throw() { ATLASSERT(::IsWindow(m_hWnd)); return ::SetWindowLongPtr(m_hWnd, nIndex, dwNewLong); } it is included in the <atlwin.h>,vs2003.net,please help me! It should be easy to find; see The try, catch, and throw Statements (C++) . Eventhough it is a statement, not a function, it should be easy to find using the Help system provided with Visual Studio. What happens when you put the cursor on "throw" in the editor and press F1 You should be able to find the documentation that way. What do you mean by " included in the <ATLWIN.H> " Do you mean it is used there or something else Brian Kramer wrote: The throw() in this de ...Show All

  • NetPochi reply to gettempath() threads

    Hi , thank you for all your replies, they hve all been useful for my understanding, of what is involved. I am the stage of being able to create a dir (c:\\TempDir) and copying files in my VS2005 project folder. This works fine when debugging, and release to produce the .exe, But when i test exe on clean machine, error message states it cannot locate any of the resource files. I have tried adding these to the resource folder using solution explorer (right click and add resource), the file name appears in solution explorer but not in solutions explorer resouce folder. My question is:1. How do I save or process files in the winforms application, which I want the .exe to install/copy , when the .exe is launched. My question is:2. Here ...Show All

  • XpyXt fatal error LNK1104: cannot open file 'mfc70d.lib

    hi all, I am trying to compile application and following erro is occuring fatal error LNK1104: cannot open file 'mfc70d.lib i am having VS .NET 2003 , DirectX SDK Summer 2004 installed on XP Prof Sp2 Help me. Cheers Suresh Hi Bite , thanks it worked out , quite a long back it is build in VC++ 7.0 only now I used .NET 2003 version to build that . Thanks. Suresh hi re: fatal error LNK1104: cannot open file 'mfc70d.lib You are using vs .NET 2003 means your program should linking with mfc71d.lib. so i guess(just guess) that your program were build in vc++ 7.0. if this is true, goto the project settings->linker0>input and look for the file mfc70d.lib and change it to mfc71.lib. wish ...Show All

  • Recep TARAK&amp;#199;IO&amp;#286;LU Private access

    Say if we ve certain private methods along with private data members and public methods. other than friend function is thr any other way we access these members(they being private only) directly. its one of the requirements in a project of mine. The real prob comes when accessing function. say we've classes ported to us in .obj format. then going for DMA using pointers is a risky n unreliable job. class x { private: void meth1 ( ) { cout<< "Meth1" ; } void meth2 ( ) { cout<< "meth 2" ; } } ; class xduplicate { public: void virtual meth1 ( ) ; void virtual meth2 ( ) ; } ; main ( ) { x obj; xduplicate *obj1; obj1= ( xduplicate * ) &obj; obj1->meth1 ( ) ; ...Show All

  • Noah Nadeau Is this bug fixed - "Add/Remove operation is impossible"

      I very recently bought VS2005 and came across this bug while developing MFC apps (c++). "Add/Remove operation is impossible, because the code element XXX is read only" I have seen this bug discussed in the msdn forums dating back to well over a year ago. Has this bug been fixed yet If so where do I download the fix from Whats the point of developing an MFC application in VS2005 if the wizard does not work Its absolutely insane!! I might as well go back to using VC++ 6. (This is the second fustrating bug I've come across in VS2005, if you see my other thread). Yes that link does appear to describe the problem. Ok excellent you say it is fixed in SP1. Wher ...Show All

  • Opfer Remove a given value from a list

    Hello all: Is this solution correct void remove(Node **node, int v) { while (*node) { if ((*node)->value = v) { Node *tmp = *node; *node = (*node)->next; free(tmp); } else node = &(*node)->next; } } If this code is correct, I have the following question: why can we just free(tmp) without making the collection between the previous node of tmp with the node after tmp Thank you Yes, it is correct. As for your subsequent question: if you don't connect the previous node with the node after tmp you will end up having previous node having a 'next' pointer that points to freed memory instead of pointing to the next node ...Show All

96979899012345678910111213

©2008 Software Development Network

powered by phorum