Click here to Skip to main content
15,887,820 members
Everything / Programming Languages / Visual C++ 10.0

Visual C++ 10.0

VC10.0

Great Reads

by Petrov Vladimir
Weiler-Atherton algorithm in MFC codes demo implementation
by Lars [Large] Werner
Windows has built inn support for a lot of keyboard languages, this class makes it possible to extract that info in an easy manner and present it to screen.
by Eugene Sadovoi
Integrating third party tools and libraries into Visual Studio (MSBuild) configuration environment.
by Petrov Vladimir
Weiler-Atherton algorithm in 3D codes demo implementation

Latest Articles

by libbyliugang
A splitter control for dialog can auto change the linked window's position
by gintack
C++ header file to plot data in the form of x, y, z arrays and list as potential lines and graphs
by tonywilk
Not 'Just Another Parser', this reads elements from JSON simply and without memory overhead in C
by Petrov Vladimir
Weiler-Atherton algorithm in 3D codes demo implementation

All Articles

Sort by Title

Visual C++ 10.0 

24 Jan 2014 by Member 20
HiI am using RPC Client and Server interface. I am able to build in 32 bit but when I change it to 64 bit, I am getting error "Invalid build platform for this stub" and it is pointing to below lines:#if !defined(__RPC_WIN32__)#error Invalid build platform for this stub.#endifHow to...
24 Jan 2014 by OriginalGriff
See here: MSDN: Targeting Stubs for Specific 32-bit or 64-bit Platforms[^]
18 Apr 2012 by Ivan Shcherbakov
The article describes 10 time-saving debugging techniques available in Visual Studio.
20 Jul 2012 by Sunil P V
This article is a simple geometry library for drawing lines, circles, arcs, text, etc.
15 Jul 2011 by ThatsAlok
Collection of Q&A from VC++ forum
1 Nov 2016 by Philippe Mori
The first problem with your code is that identifier that begin are reserved for the system. In your case, you use the well known macro _T as a parameter for your template.Unicode Programming Summary[^]The next problem with your code is inconsistent use of int and size_t for the size....
19 Dec 2012 by ThatsAlok
Article touching simple programming instrument like Property, Method, Event and invoking ATL Dialogs from ATL/COM Component
23 Jan 2018 by Cem KARACA
An article on how to combine Slider Controls and Progress bar into one class using custom draw
16 Jan 2016 by Mathew_wwx
This tip will introduce a library written in C++ that wraps up a 2d polygon triangulation algorithm with time complexity of O(N*logN), the algorithm works on both self-intersected and non self-intersected polygons.
11 Dec 2010 by logicchild
An article that desribes some essentials to help learn the DirectX technology.
5 Aug 2014 by Babu_Abdulsalam
A Simple Profiler for C++ apps on x64 platform
26 Apr 2011 by Sudheesh.P.S
AsyncFile is a small wrapper class for simplifying the usage of asynchronous file APIs.
30 Apr 2012 by Nippey
This is a TCHAR alternative for "A Small Class to Read INI File"
7 Jan 2014 by Petr Ivankov
Application of abstract approach to real-time.
10 Apr 2011 by StupidSteve
When running another piece of my new program, the debugging is okay but after that it reported a "Access violation writing location...".Using the breakpoint function, I find that the following function has something wrong:/*variable initialization function*/void initialize (int...
10 Apr 2011 by Hans Dietrich
This line is incorrect: for(i=0; i
10 Apr 2011 by Ciumac Sergiu
Hi,You access the array out of bounds, so it's kind of strange the introducing strictly less condition didn't change anything. Also ignore my previous solution as it wasn't correct.Regards
10 Apr 2011 by krmed
The problem lies in this area:while((nd=getchar())!=EOF){ if(nd!='\n') { temp[digit]=nd; ++digit; } else if (digit>=80) { printarray(temp[MAXLINE], digit); initialize(temp[MAXLINE], digit, nd); } else...
13 Apr 2011 by Anurag Pradeep Gupta
My project contains wowvision.ocx, wowvision.inf, wow.CAB and B.html pages and some other html page where I tested the activex control.This step for client machine1-You do copy wow.CAB, wowvision.ocx and b.htm page in the local server.2-Open the IE and put the address and html page...
13 Apr 2011 by Joan M
Probably you've not registered the activex control on the client machine...In order to do that you should follow the steps depicted here: http://support.microsoft.com/kb/146219[^]HTH...
13 Apr 2011 by LaxmikantYadav
Dear Anurag, It looks like a ocx registration problem. try to register it with regsvr32 app.regsvr32 ocxfilename
16 Jan 2013 by Ajay Vijayvargiya
Covering the nitty-gritties of C++ templates.
1 Jul 2012 by Ajay Vijayvargiya
Let's dwell deeper into C++ templates!
1 May 2012 by Markus Koppensteiner
Explains how to use some OpenCV commands for video manipulation.
17 Jun 2013 by geoyar
An MFC linear chart control with enhanced appearance.
7 Apr 2011 by Jayant Narayan Dash
HI All,i have some doubts regarding application development.i am writing a vc++ MFC application in VS2010 and WIN-XP. here i am using WMI, lotsof securities related APIs and assembly language also.really i am curious to know what minimal things need to be take care to run this...
7 Apr 2011 by Sergey Alexandrovich Kryukov
I already commented on Win98. This is the only item which can be highly problematic. If you could exclude it from support (I highly recommend it), you would be fine.Well, on every part of Windows API you need to look for Microsoft documentation and check up the list of compatible platforms,...
7 Apr 2011 by #realJSOP
Your operating system support should be restricted to XP, Vista, Windows 7, Server 2003-2008. Everything older than those is irrelevant and so obsolete that they make Warren Buffet look like a spring chicken.Further, unless you have a tangible requirement to create 64-bit software, don't...
17 Feb 2011 by Debojyoti Majumder
I created my application in VC++ and I have to verify my it using AppVerifier.When I am testing my application with AppVerifier the application crashes when I am closing the application window. I have debugged my application and from the stack trace I came to know it's crashing in the last...
17 Feb 2011 by Andrew Brock
The C++ compiler will add its own statements to the destructor to destruct any member variables that are a class type.Consider this:class A { public: A() { m_szMessage = new char[10]; } ~A() { delete []m_szMessage; } private: char *m_szMessage;};class B...
17 Feb 2011 by Stephen Hewitt
Thanks for the stack trace. Also, the exception type generated is often of use. In addition, since you're using the application verifier look at the debugger output window as the verifier will tell you what the problem is (via debug strings). To me it looks like you're freeing an invalid image...
30 May 2011 by Jayant Narayan Dash
Hi All,i want to create a tool for password protecting any application before execution in windows platform.when an application is going to execute, before that i want to display a dialog box for entering password. if the password is correct then application will start execution, if...
30 May 2011 by Ciumac Sergiu
>>EDIT, the solution is obsolete as I though you are asking for .NET app, sorry.Kind regards
30 May 2011 by Jaadooo
--> right click on your edit control and set property 'Password" as true--> you can use database or .txt file to validate the password ie user entry in the edit controlis matching with the password/passwords given in .txt or databse--> if you dont want user to close window ( using...
1 Nov 2013 by Gabi Barcan
Call methods of an existing class in MFC asynchronously, while still preserving the thread affinity required by MFC and COM.
2 Sep 2010 by dmihailescu
What is the start-up and system performance overhead for .Net, Mono, Java versus C++ and Forms, WPF, Swing versus MFC
24 Apr 2011 by Rajesh G Manwani from Mumbai
There are no exceptions in code except that LoadBitmap is returning 0 to indicate resource is not available.
24 Apr 2011 by Rajesh G Manwani from Mumbai
I have bitmap resources in dll. When I use the dll in debug configuration, I am able to load the bitamps . However, same code when run in release configuration returns error for LoadBitmap. Are the resources not availale in release configuration? are theere any settings in visual studio or any...
24 Apr 2011 by Sergey Alexandrovich Kryukov
Resources are available, for sure, regardless of the settings and configuration.You problem is somewhere else. Are you sure you're loading from embedded resource? It can be a path name problem.You can debug your code even in Release configuration and find where the problem is. Better yet...
9 Mar 2011 by ganesh_IT
Now i am in a vc++ project. I am developing UI module with rich ribbon controls. In ribbon control buttons we can provide 16/32bit bitmaps using a image collection. I am creating 32x320 bitmap using resource editor which contains 10 button images. When i am using this image collection in...
9 Mar 2011 by SnowHow
The bitmap editor in VS does not create 32bit bitmaps hence there is no alpha channel which is kind of absurd. Anyhow a quick look at google should provide you with the means to do what you need. Google Time
9 Mar 2011 by ganesh_IT
Hi SnowHow, thanks for the information. Another solution to solve this problem is using PNG images instead of bitmapsThanks in advanceganesh_IT
18 Sep 2012 by FranciskaR
Benchmarking Boundary Trace Algorithm against some FloodFill algorithms since they used a stack or recursion
25 Mar 2015 by Eugene Sadovoi
Integrating third party tools and libraries into Visual Studio (MSBuild) configuration environment.
30 Mar 2015 by Eugene Sadovoi
Integrating third party tools and libraries into Visual Studio (MSBuild) configuration environment.
19 Feb 2013 by Debdatta Basu
Introduction to C#/C++ interoperability, and a performance evaluation.
14 Oct 2010 by InActive
How to use the .NET DateTime class in C++ to generate a basic calendar via a console program
9 Apr 2018 by gintack
C++ header file to plot data in the form of x, y, z arrays and list as potential lines and graphs
15 Feb 2013 by Christoph Husse
The clean way for getting C++ enumerations with Reflection support.
26 Oct 2016 by Shao Voon Wong
C++: Prefer Curiously Recurring Template Pattern (CRTP) to Template Pattern
14 Aug 2016 by pal4yth
i use vs2010 create a win32 application , add a dialog resource idd_dialog1 . run the exe ,click the ok button ,then show a message box ,but i can not close messagebox ,it has no reponse to my clicks.here is my code: #include "stdafx.h"#include "testdlg.h" #define MAX_LOADSTRING...
14 Aug 2016 by Tacitonitus
Well, on the surface, there doesn't seem to be a whole lot wrong with your code. However:1) Read (or re-read) GetMessage function (Windows) - specifically where it says, "avoid code like this" (hint: you have code "like this").2) Kill off the WM_PAINT case - it doesn't do anything.3) Add...
14 Aug 2016 by Richard MacCutchan
Your sample is creating a modeless dialog which requires different handling from a modal type. See Modeless Dialog Boxes[^] for details.
10 Jan 2011 by Rajesh G Manwani from Mumbai
I am updating interface of an active x control. It has dual interface. I have manually updated the odi file, compiled it, and added the new methods to co-class and dual interface. On compilation , I get the error 'cannot instantiate abstract class Cobject::XObject due to members --- list of...
10 Jan 2011 by Espen Harlinn
check calling convention, parameters and so on. everything must match the expected method signatures.RegardsEspen Harlinn
10 Jan 2011 by #realJSOP
An abstract class cannot be instantiated. You MUST derive a new class from it, and implement all of the pure virtual functions in it, and then use the new class instead.This is basic C++ stuff...
2 Oct 2011 by Ștefan-Mihai MOGA
How to center window in WIN32
23 Sep 2011 by Charles Kludge
void CenterWnd(HWND wnd){ RECT r,r1; GetWindowRect(wnd,&r); GetWindowRect(GetDesktopWindow(),&r1); MoveWindow(wnd,((r1.right-r1.left)-(r.right-r.left))/2, ((r1.bottom-r1.top)-(r.bottom-r.top))/2, (r.right-r.left), (r.bottom-r.top),0);}
4 Oct 2011 by Nick Kulikovsky
There is ATL CWindow method CenterWindow:void CenterWnd(HWND hWnd){ CWindow wnd; wnd.Attach(hWnd); wnd.CenterWindow(NULL); wnd.Detach();}
22 Dec 2010 by SIBI V.J.
Hi, I want to change the color, font and style of title bar in a dialog box.I am vc++ developer. Please help me..RegardsSibi Jayan
22 Dec 2010 by jk chan
u can handle WM_NCPAINT message and paint ur own title bar there using GDI/GDI+ functions.see this http://www.codeguru.com/cpp/w-d/dislog/titlebar/article.php/c1987/
19 Jun 2012 by Binu MD
Change the default ICON of MFC applications
29 Jul 2011 by Sayyed Mostafa Hashemi
How to set/change the master volume.
16 Aug 2011 by matt_taws
Isn't it more easy to just do:return nStatus == NERR_Success
2 Aug 2011 by Charles Oppermann
How to check Windows 7 version in Visual C++
29 Jul 2011 by Sayyed Mostafa Hashemi
Code for checking the avilabiltiy of Internet connection.
11 Feb 2011 by Sharon F
I am developing using VC++ 2010, have an MDI application using tabbed documents using the Ribbon Bar Office 2007 style Fluent UI.I changed the CMFCRibbonStatusBar to CMFCStatusBar in the Main Frame class (because the extended panel text on the right disappeared when the frame size became...
11 Feb 2011 by Niklas L
MSDN says you should try CBasePane::ShowPane()[^]This method shows or hides a pane. Use this method instead of ShowWindow because this method notifies the relevant docking managers about changes in the pane's visibility.
11 Feb 2011 by Eugen Podsypalnikov
You can also change the positions[^] of the frame's components,so the position rectangle of a bar/view/.. could have its height =0 or not... :)
14 Feb 2011 by Sharon F
I ended up getting it to work by posting a WM_SIZE message to the ChildFrame just after the Show/Hide.m_wndChildStatusBar.ShowWindow(SW_SHOW);PostMessage(WM_SIZE);Thank you Niklas and Eugen for your helpful suggestions!
16 May 2014 by Andrew Truckle
HiI don't have an answer but did you resolve this ?I am using vs2013 and now use cmfcstatusbar too. I overrode the onmdiclienterasebackground to draw my own background and that has caused the same behaviour as you. If I revert to normal program behaviours the status bar shows immediately..
2 Mar 2015 by Member 8605996
I have CListCtrl in my program that I running on my computer with windows 7. When I load the program on windows 8.1 the column width are not set the same. I ran it in various compatibility modes in window 8 but that did not help. Everything else is working in the program.
30 Sep 2010 by Pro_Dev
I need to show a modal dialog after the window has been created and shown...I need to know that which event is fired after the window is loaded and shown in the memory so that the modal dialog stays on top of the window..!It is a MDI application and it loads after the OnCreate method has...
30 Sep 2010 by Richard MacCutchan
The simplest method of doing this is to send a private message to your window just after it has first been created. Your code can then respond to that message by showing your dialog.
12 Apr 2012 by Abhi Ajmera
Hi All,I am creating an SDI application with multiple toolbars derived from CMFCtoolbar.When I am floating them which I am forcefully doing by a checkbox condition, the toolbar is not displaying full text of buttons also the image of last button is getting cut. I am using PNG for toolbar...
20 Nov 2012 by Vineeth.B
Set the bLocked parameter of CMFCToolbar::LoadToolBar() function to TRUE. That may solve your problem.
4 Jul 2011 by Richard MacCutchan
A little tool to keep a list of code or text snippets ready to put in the clipboard
19 Apr 2013 by Chandra Shekhar Joshi
If you are migrating your COM application to Visual Studio 2012 then this could be helpful for you.
14 May 2012 by valeriyabobko
create COM with no ATL, just C++
11 Feb 2011 by Rajesh G Manwani from Mumbai
In COM server with multiple interfaces, can instance of any of co-class of any of the interfaces be created as member of some class? If I try to do so, I get compiler error "C2259 : cannot instantiate abstract class due to following members : QueryInterface, AddRef ....". How this can be resolved?
11 Feb 2011 by CPallini
You may store the interfaces as pointers. :)
11 Feb 2011 by Kozlov_Sergey
Try to use CComPtr or CComQIPtr.
11 Feb 2011 by mbue
If you do it in this way you have to instanciate the vtables in the final class (iPersistStream derived from base classes) example:class iPersist : public IPersist{public: // IUnknown virtual HRESULT __stdcall QueryInterface(REFIID riid,void** ppv){ return E_NOINTERFACE; } virtual...
11 Feb 2011 by Sergey Alexandrovich Kryukov
You cannot instantiate an abstract class. You should understand which classes are abstract: those having at least one pure virtual method, which is often called abstract as well (in newer language it is typical to have the language key word abstract in one or both cases).So, how would you...
7 Mar 2011 by gomathylakshmanan
Hi All,Is the compiler option /GM(not /Gm) available in VS10?In VC6 it means enable minimal rebuild..But its not available in vs10.Is /GM and /Gm same or any difference?pls clarify me.Thanks.
7 Mar 2011 by CPallini
Documentation[...
23 Mar 2011 by Rajesh G Manwani from Mumbai
What is equivalent of #ifdef ... #endif flags in .odl files? Is it possible that in odl file, we shall have interface methods which are compiled conditionally ?e.g. interface {methods: HRESULT func1([in] inputvar, [out] outvar); HRESULT func2([in] inputvar, [out] outvar); ...
25 Mar 2011 by Abhi Lahare
Hope this helps, but not sure how much.http://msdn.microsoft.com/en-us/library/aa366773%28v=vs.85%29.aspx[^]
6 Feb 2011 by samad_najjar
Hi,I would like to draw a graph in C++ from a matrix. And I would like to do this in a Win32 console application. Any ideas or pointers are welcome. Thanks.
6 Feb 2011 by #realJSOP
You can't draw a graph in a console application.
6 Feb 2011 by Nish Nishant
In the old Borland and Turbo C++ for DOS days, it was quite easy to use console-graphics modes. VC++ has traditionally not supported these modes. Although people have hacked around with inline assembly and direct video buffer writes to do console mode graphics from VC++ too. Modern day VC++...
6 Feb 2011 by Espen Harlinn
Since Nishant Sivakumar mentioned the "good old days" of DOS, Turbo Vision[^] is an option if you want to develop an "intuitive" console/text mode application.It now works on DOS, FreeBSD, Linux, QNX, Solaris and Win32 :)Have fun :)RegardsEspen Harlinn
18 Oct 2020 by Nick Katditsik
I tried with both languages and failed. I get a security error. I'm sure I have to add sometinh because of the WSS but i'm not sure whati is that... What I have tried: ConsoleApplication1.SrvRef.ServiceClient clientProxy = new...
28 Sep 2013 by Subrat 4708266
Is it a good idea to covert project written in C++ using builder XE(Embarcadero) to VC++?Please let me know the advantage and disadvantage of it and also if it'd be a good idea in scene of time taking for conversion.FYI: Proj is converted from BC6 to Embarcadero XE. My poj size is...
21 Jun 2012 by Gokulnath007
convert CComPtr to CComPtrconvert CComPtr office commandbar to CComPtr office __commandbars?
4 Mar 2011 by amitpatel_ld
how to create button with different shapes in VC++ in MFC Windows based application?
4 Mar 2011 by OriginalGriff
There is an article here: CRoundButton2 - A fancy graphical button[^] - it may not meet your needs exactly, but it does provide a basis.
20 Mar 2011 by Gokulnath007
I think this may help you http://www.hackchina.com/en/cont/193932[^]
16 Jun 2017 by Kyudos
I'm having a problem with my dongle heartbeat. We have been using a timer to send a heartbeat to our dongle to keep the license alive. However, if one of our processor-intensive subprocesses takes longer than the dongle license timeout, the application needs to be restarted.The subprocess in...