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

Software Development Network >> Visual C++

Visual C++

New Question

_ttoi() family portable way for 32-bit and 64-bit
Debugging release version in VS2005
Converting 64-bit number into string
Divide without using operators
Repainting Windows Form
Need help with CreateFile to a device
What is difference between Queued and Non-Queued Messages?
trouble getting started
Process crash while accessing the member function of the class through an object variable.
Printing Messages to the Visual Studio Output Window?

Top Answerers

Philly10407
scottsignalscape
Fuzon
Will Merydith
Dobriendob
teeMeyer
zxdgsadf
R-Cyclone-S
dkoco
morphius1
Linux future scales out
Only Title

Answer Questions

  • dmkp231 This code snippet makes no sense...

    I've come across some code syntax I've never seen. It compiled, but I don't know how, or what it even does! I've been reading a book about DirectX, and in one of the examples, this little piece of code was present: D3DXMATRIX *D3DXMatrixIdentity(D3DXMATRIX *pout); "D3DXMATRIX" is a type, of course. And "D3DXMatrixIdentity" is a function, of course. Now I don't see how this works. Okay, to break it down, first we have a type, which is D3DXMATRIX, then we have the indirection-operator (which I assume is a pointer), and then we have a function (perhaps a call) with a new D3DXMATRIX (pointer) as it's only parameter. How the heck does this work It isn't just a regular function-call. It isn't a function-call that' ...Show All

  • Bertrand Caillet Unmanaged memory leaks in C++/CLI program

    Is it possible to detect unmanaged memory leaks in C++/CLI program For example: int main(array<System::String ^> ^args) { char* p = new char[100]; return 0; } When I run this program under debugger, memory leak is not reported, like it was in MFC projects. Great, it works in this sample, now I need to do this in my real project. I think you should try _CrtDumpMemoryLeaks function: #include <crtdbg.h> int main(array<System::String ^> ^args) { char * p = new char[100]; _CrtDumpMemoryLeaks(); return 0; } I hope it helps. ...Show All

  • Sean Chambers compiling

    Often the things that seem like they should be the easiest are not. I'd been using Visual C++ 6.0, but was running into a bug, so I just installed Visual C++ Express Edition to see if it helped. In 6.0, if you open a C++ file, you get a Build pull-down menu, and from there you can compile. This is more or less reasonable and consistent with other IDE's. In Express, if you open a C++ file, there is no Build pull-down menu, and none of the visible pull-down menus have a compile option. I looked in the index and there did not seem to be any guidance. Am I missing something Can you compile a C++ file from the IDE, or do you need open a command prompt Thanks Express Edition does not seem to ...Show All

  • manukahn Help with something stupid

    Ok, people. This is my problem... I have two structures struct Insurance { ... ... }; struct Person { ... Insurance insurance; }; Person * Add(); void main() { Person *array = new Person[10]: ... ... } So I need to assign array members using Add function but I have no clue how to implement this function because it doesn't accept any parameter, but needs to create new object of structure Person and return the same object. Can anybody help me with this Thanks. Ok, I'll try to write full task so you'll maybe be able to help me thx. Write a program that will contain definition of shown structures, member functions and global functions to be functional in next ste ...Show All

  • John06053 Screenshot in Winlogon Desktop Problem

    Hi, I have a problem capturing the screen in Winlogon desktop, all i get is a black screen. I have an intreractive service and i can actually capture the screen in the default desktop, but as soon i press CTRL+ALT+DEL and the service captures the screen i get the black screenshot. I think i need to switch to the winlogon desktop. This is the actual code the service is running when i detect a ctr+alt+del /// CODE old_desktop = OpenDesktop("Winlogon",0, FALSE, DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW | DESKTOP_ENUMERATE | DESKTOP_HOOKCONTROL | DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS | DESKTOP_SWITCHDESKTOP | GENERIC_WRITE); SwitchDesktop(old_desktop); ScreenShot("c:\\screen.bmp"); ///CODE-+ I've been looking all aro ...Show All

  • xRuntime Debugging release version in VS2005

    I am debugging a complicated piece of software which takes quite a long time to run until it reaches the point which I have to investigate. Running debug version from debugger is too slow as it takes up to few hours to run until I get it to the point of the problem. I tried to compile the release version and run it from the debugger. Interestingly I can only see some variables (usually local function ones) in the watch window. The "this" variable for some reason is always shown as NULL. I also can not see values of variables of functions that are deeper in the stack. And finally my debug visualizers do not work. Project properties of debug and release versions seem to be almost the same (obviously _DEBUG directive is missing in r ...Show All

  • NetPochi Where is the Register Tool

    In VS6 the Tools main menu used to have a Register item. So if you were developing an automation server you could just use this to register it. Has it gone or moved somewhere else Thanks. You can add it on your own: 1. Select Tools->External Tools... 2. Press "Add" 3. Give the title that you desire like: "Register COM object" 4. In the "Command" brtowse to the regsvr32.exe (in my case path is C:\WIN64\system32\regsvr32.exe) 5. In the arguments enter: $(TargetPath) That's it. Max ...Show All

  • CharlieRussell arrays

    i have an array that i have debuged to make sure it contains stuff. when i access it like arr[1]; it is fine. but is i try int pos = 1; arr[pos]; i get an exeption at runtime of "System.IndexOutOfRangeException" the array is highlited. what can i do Also note that when you create an array, the elements start at 0. If you do something like int array[1];, the first element would be array[0]. Please show us exactly what your failing code looks like. be sure that there are elements in the array. Are you able to post the code snippet where you are doing this there are definetlty elements in the array. and the code i posted was leteraly what i am doing o ...Show All

  • Saptagiri Tangudu Error on delete [] v

    Hi, I have a problem with a class. The declator is class Configuration { public : struct conf_table { char name[40]; char value[10]; }; struct conf_table *conftable; int size; //rows on conftable int max_size; //maximum rows on conftable public : Configuration( void ); //Constructor ~Configuration( void ); //Destructor }; And the code is Configuration::Configuration( void ) //Constructor { size=0; max_size=256; conftable = new conf_table[max_size]; //initialize conftable } Configuration::~Configuration( void ) //Destructor { delete [] conftable; } The problem is that i get an error message (Heap Corruption) after ...Show All

  • Cian how to change the style of WTL's ComboBox

    Hi, I worked on a WTL project by VC6 years ago. The combo box in the dialog is in old style like windows 98/2000. Recently , I need to use the project again. I have upgraded the project to VC .net 2005 and use WTL75. But the combo box's style can not be changed to WinXP style. How can I resolve it Thanks Robert hello Re: how to change the style of WTL's ComboBox you can refer to this article: http://www.go4expert.com/forums/showthread.php t=754 please also note that such questions are outside of the scope of this forum , if you have further questions, find a appropriate newsgroup listed here to take more disccusion. thanks rico ...Show All

  • jucho How to avoid rebuilding

    Hi, I have a header file which is included by some fifty odd files..If i even make a small change as adding a comment to the header file a rebuild is taking place.. Will the pch file resolve this issue..by including that header file in stdafx.h Please help me on this.. Thanks & Regards, AFAIK if you change teh header file, it means that, there are some changes in specific definitions. Unfortunately C++ compiler is not that much smart to handle changed areas . if you change header file, and if you include it somewhere else, that file will also will be part of compilation. else your change will be void. The changes are made in the stdafx, most of the cpp file will recompiled because precompiled header are used by most of the CPP f ...Show All

  • hazz Problem : Change view

    Hi all, I am creating an application which is splitted into 2 view. (0,0) pane I am using to show a TreeView derived from CTreeView whereas (0,1) pane is used to represent the details fo that tree. I am using the following function to change the view. BOOL CSplitter::ReplaceView(int row, int col,CRuntimeClass * pViewClass,SIZE size) { CCreateContext context; BOOL bSetActive; if ((GetPane(row,col)->IsKindOf(pViewClass))==TRUE) return FALSE; CDocument * pDoc= ((CView *)GetPane(row,col))->GetDocument(); CView * pActiveView=GetParentFrame()->GetActiveView(); if (pActiveView==NULL || pActiveView==GetPane(row,col)) bSetActive=TRUE; else bSetActive=FALSE; pDoc->m_bAutoDelete=FALSE; ((CView * ...Show All

  • joynerCN On compiler error c2248 and EventHandlers-delegates : Managed C++

    I have a code which gives compiler error C2248: 'member' : cannot 'access' member declared in 'class'. Members of a derived class cannot access private members of a base class. But the problem is that my derived class is supposed to access the protected members of the original class. Consider the following : ref class A abstract{ public : virtual void ReceiveData(Data^ data) = 0; protected : System::Void HandleReceivedData(System::Object^ sender, EventArgs^ e) { // Some coding here } }; ref class B : public A{ public : B(){} virtual void ReceiveData(Data^ data) override { data->Received += (gcnew EventHandler(this, &A::HandleReceivedData)); /// ERROR C2248 Why /// BUT when I write it as follo ...Show All

  • Manolis set<String> in Visual C++ .NET

    How do you use a set of Strings If I say set<String> *st; String *s = S"FOO"; st->insert(*s); I get an "illegal use of managed type" message. thanks To be clear that this has been answered will require original poster to respond. Marking as answered. As Jonathan said, you can't use std::set as a container of the managed type System::String.  There is no "set" in the .NET framework, but there is a collection, and Jonathan points you in the right direction.  There happens to be a predefined collection that can be used for strings (but for other types you would use a Dictionary).  Example code below ...Show All

  • Johnathan Seal Visual C++ Coding Help

    Hello everyone! May someone please write a quick code for me I've did some re-search on www.google.com , but no luck... Start Button Click { x = www.microsoft.com load time in milliseconds y = 2000 - x z = y * 2 If x is over 2000 milliseconds: { Pop-up message box reading "An error has occured." } If x is not over 2000 milliseconds { Loop Load www.msn.com in y milliseconds. Load www.yahoo.com in z milliseconds. Goto Loop } } I've tried to explain that in best detail as I possibly can think of... If you need any help or don't understand want I want, pelase don't hesitate to ask! Thanks! SDKCodeMonkey wrote: ...Show All

656667686970717273747576777879808182

©2008 Software Development Network

powered by phorum