Click here to Skip to main content
15,888,461 members
Everything / Programming Languages / VC++

VC++

VisualC++

Great Reads

by Eugene Balabanov
A tiny sandbox primer
by jurhas
A small simulator for a 6 axis articulated robot
by Marius Bancila
Using managed COM objects in C++ without registering the server in Windows Registry
by Petrov Vladimir
Weiler-Atherton algorithm in MFC codes demo implementation

Latest Articles

by Ștefan-Mihai MOGA
Task Manager shows you the programs, processes, and services that are currently running on your computer. You can use Task Manager to monitor your computer’s performance or to close a program that is not responding.
by Ștefan-Mihai MOGA
This article is about the IntelliFile application which is a free alternative Windows version to Total Commander and uses many components that have been published on CodeProject.
by Ștefan-Mihai MOGA
You can use IntelliPort to transfer large files from a computer onto your portable computer using a serial port rather than going through the process of setting up your portable computer on a network.
by Tough Developer
How to compile WinQEMU v0.10.2 in VS2008 and VS2012

All Articles

Sort by Title

VC++ 

24 Sep 2012 by Member 7909353
Hi,In Visual Studio 2008 -> Visual C++, I create a simple dialog. Afterwards I right click on the project in solution explorer and select "Add Class...", and then the MFC Add Class Wizard pops up. I want my dialog to be a "CMFCPropertySheet", but the Base Class field does not allow me to do...
24 Sep 2012 by Richard MacCutchan
See the note here[^] that states: This page is specific to Microsoft Visual Studio 2012/.NET Framework 4.5
25 Sep 2012 by Member 7909353
CMFCPropertySheet class is avialable in vs 2010,2012 not in vs 2008
23 Aug 2011 by Ruchira Patel
hello,I am using semaphore. and i have written following code to create semaphore HANDLE m_deviceStatusChanged; m_deviceStatusChanged = ::CreateSemaphore(NULL,0,256,NULL); Following errors are coming while building the project 1) missing ';' before identifier...
23 Aug 2011 by Prerak Patel
See the links, check if you have included header file.http://msdn.microsoft.com/en-us/library/aa911525.aspx[^]http://msdn.microsoft.com/en-us/library/ms686946(v=VS.85).aspx[^]
7 May 2013 by m33707
I use "SetWindowPos " in Win7 by ActiveX, but it does not work well, IE is dead,it can work well in XP,Who can help me? (I am a chinese, so English is...)::SetWindowPos(ieHandle,HWND_TOPMOST, 0, 0, cxScreen, cyScreen, SWP_NOMOVE|SWP_NOSIZE);the problem is the param of "HWND_TOPMOST"...
12 Nov 2011 by Ruchira Patel
Hello, I have used xercesc and xalanc for reading XML File.But I have get the compile time error:'DOMNodeType' : ambiguous symbol and'DOMDocument' : redefinition; different basic types
12 Nov 2011 by thatraja
I don't know VC++ but found these links in web based on error message in your question so check thesePRB: Compiler Errors When You Use #import with XML in Visual C++ .NET[^]FIX: Error C2371 on Struct Typedef that Does Not Have a Tag[^]PRB: C2371 BSTR Redefinition When VFW.H Included in...
7 May 2012 by chaiein
I am gettingerror C2664: 'midiInGetErrorTextW' : cannot convert parameter 2 from 'char [128]' to 'LPWSTR' How to solve this error?
7 May 2012 by enhzflep
I had similar error message when using GDI+ in a non-unicode app. My filenames were simple char*, yet the load function needed WCHAR*You just need to use MultiByteToWideChar. WCHAR wFilename[MAX_PATH]; string fileName; char *filename; filename =...
7 May 2012 by chaiein
Change the Project properties in character set to Use Multi-Byte Character Set solved my problem
30 Sep 2012 by vaibhavbvp
Hi everybodyi have a problem in converting a audio which is in .dss format.i want to convert it in wave format through code.can anybody help me in converting it without using third party software.
1 Oct 2012 by CPallini
That's difficult, in my opinion, since DSS is a proprietary format and apparently you cannot even find free documentation.It looks you have to a third part library (e.g. Olympus Audio SDK[^]).
17 May 2013 by User 9450691
All of the DVR SDKs I've look at for DSS (or DS2) to WAV conversion use the hardware, i.e. the SDK calls a function hardcoded onto the DVR to do the decryption. So even with a licence you would still need a DVR connected.
2 May 2013 by npdev13
I am new in VC++ and MFC, I am creating one application in the MFC with VC. I found that when I build the project it create the .obj file for .cpp file in the debug folder.Now my question is when I am doing deployment of this project I require to include this .obj file? because I found that...
2 May 2013 by Ian A Davidson
No you don't need it for executing the application. It is an intermediary object file, used by the linker to make the executable. It is common practice to specify a directory for the intermediary files that is different from the output directory, in order to make clean-up and deployment...
28 Jul 2013 by P Uday kishore
Hi i need to get the file details of .url file(.ie internet explorer favorites file format).I can get the details like created date,accessed date and all but am not able to get the URL of that. Can anyone help me regarding this way???
28 Jul 2013 by Richard MacCutchan
you could start with Internet Explorer Favorites, deconstructed[^].
29 Oct 2012 by Virendra_ec10
Hello C++ Gurus,I created a 64-bit COM DLL by compiling a 32-bit application in visual studio 2010(Mode-Release, Platform-x64) and registered it successfully using Regsvr32.exe tool.I am trying to create the instance of the dll but, I am getting "Class Not registered " error in the below...
29 Oct 2012 by enhzflep
I'm still(hopefully will remain?) pretty wet-behind-the-ears with respect to COM work. Though I do note that the behaviour you report is the same as that which I observe when starting a 32bit COM server under either windows xp or 7.That is to say CLSIDFromProgId does just that - it returns...
11 Jul 2013 by Dattatraya Mengudale
Please refer..http://www.gfi.com/blog/32bit-object-64bit-environment/It will really solve your problem...
12 Jul 2013 by PrafullaVedante
If you are trying to create a COM object from a 32 bit dll/exe , then your 64 bit com object cannot be instantiated . Because Windows maintain separate entries for 32 bit and 64 bit COM objects. Hence make sure that your COM object and your container application belongs to same architecture...
10 May 2017 by Raghavendra Hosad
2D DFT for Color Image - GUI implementation
2 Dec 2012 by Member 7774084
Hi,I need a 3 position toggle switch implementation in VC++. If we are clicking in the top, the "top toggle" position should show. if middle, the position should show middle. If click low, the position should show bottom. Kindly give any sample for this.Sree
2 Dec 2012 by Richard MacCutchan
You could start by looking at the 3-state checkbox control[^].
2 Aug 2015 by migurazi
I write vc++ code with flash.I want to hooking flash because mouse right button operation and flash's transparent.In my code, use flash32*.ocx or flash64*.ocx (Active-X) reference code :1. 플래시콘 컨트롤 (FlashconAxWindow) | 마을 :: 컨텐츠 상세보기 (korean. sorry^^)2. Another new thunk...
30 Jan 2012 by chaiein
Hi I need to develop 3D shooter game. I have knowledge on visual studio c++ mfc,dark gdk,little javascript . please give me resource of sample shooter game code using any of these tools to learn. Or Please suggest me if any good game development engines that can be learnt soon and where many...
31 Jan 2012 by JackDingler
You might try Garage Games. The developers there used to work for Sierra Arts. They have a fairly mature development engine for a reasonable price.
6 Feb 2012 by chaiein
We can also develop games using Dark GDk whether its 3d or 2d and even the samples are provided which we can develop further.for more information check this site.www.thegamecreators.com
25 Jul 2011 by Vijay Pate
I am developing win base software with VC++ 6.0 with Install Pro and it requires to give user 60 days trial version in this project I have developed security page which has 3 modual and it link to KEY CODE and Product code, once product code generated and inserted in security page it...
25 Jul 2011 by #realJSOP
This is for DotNet, but you may be able to use the same general technique for C++/MFC:Application Trial Maker[^]If you find it unworkable, you could review the answers to this question[^]. Of course, you could also just use google...
25 Jul 2014 by Nish Nishant
The article goes through sevean language and IDE features in the VS 14 CTP 2 that are specific to C++ development
21 Jul 2013 by Ron Beyer
Instead of posting this AGAIN, you could just use your original question:CANNOT RUN BATCH FILE IN WINDOWS 7[^]
7 Dec 2019 by HeeMongKorea
I wish to connect Form1 and Form2. That's form1' text_Data to write Form2' textBox and Form2's text_data to write Form1's textBox. Form1 Form2 textBox1->Text ---> send textBox1-Text textBox2-Text get Text I don't know it's the way....
7 Dec 2019 by OriginalGriff
Exactly how depends on the "relationship" between the two forms. Have a look at these, one of them will fit your circumstances. The form that creates an instance of another: MyForm mf = new MyForm(); mf.Show(); Is the "parent", the other form is the "child". (This doesn't imply any formal MDI...
13 May 2014 by Paulo Zemek
This article presents a .NET like Dictionary implemented in C++, which has better performance and consumes less memory than the STL's unordered_map class.
27 Feb 2016 by John Jiyang Hou
A List data structure implementation in MASM Assembly with C function realloc
14 Jul 2015 by Zon-cpp
Hi,I need to create a combo box which shows list of Items contained string (in drop down) when user is typing in edit box of Combo control (OnEditChang).MFC CComboBox Selectes one Item that 'is started' with string is written by user But, I want a combo box that shows list of all items...
28 Jun 2016 by JohnX2015
This is a cross-platform general C++ engine, including a general runtime and a reflection engine.
29 Oct 2022 by Michael Haephrati
The progress bar snippet explained in this article, can be called or updated from different running programs.
26 Nov 2014 by Jeremy Falcon
Provides a base to use when programming OpenGL-enabled applications for the real world, rather than a simple hello world.
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.
10 Jun 2014 by Hari Mahadevan
A simple C++ class framework for writing Windows services
5 Aug 2014 by Babu_Abdulsalam
A Simple Profiler for C++ apps on x64 platform
17 Jun 2013 by Domus1919
Hi all,I have create this program to manage multiple threads multiple queues, for elaborate a series of images. Every thread pop an image from a queue, works on it, and push it in output queue.Thanks to different advices received here from other users, I have create this code, but the...
24 Sep 2018 by David Maw
A working example of a Windows client and server using TLS over TCP.
29 May 2013 by patel shital_pinky
how to create activex control in vc++?please give me small and simple program first because i am not aware about this language.so make it easy for me ....i will understand easly
29 May 2013 by CPallini
Creating an ActiveX is, generally speaking, not a trivial task (and you should be very 'aware' of the C++ language). Using MFC (see "MFC ActiveX Controls"[^]) or ATL (see "ATL Tutorial"[^]) would simplify such task.
3 Apr 2013 by peoria123
I want to call 3 .exe files on button clicked eventthey have to be populate in sequence after compliting first .exe file second will poped up.after completing 2nd exe 3rd will be poped up.if any of these 3 exe files doen't work it should populate message box (showing "error ")How...
3 Apr 2013 by Sergey Alexandrovich Kryukov
You can do it, if you use the process handle returned by each ShellExecute; then you can use the function WaitForMultipleObjects:http://msdn.microsoft.com/en-us/library/windows/desktop/ms687025%28v=vs.85%29.aspx[^].This function call will be a blocking call. Your calling thread would be...
28 Jan 2013 by cd_JoeWang
mfc80CHS.dll mfc80CHT.dll mfc80DEU.dll mfc80ENU.dll mfc80ESP.dll mfc80FRA.dll mfc80ITA.dll mfc80JPN.dll mfc80KOR.dllto experts:above files are mfclocal library, i don't know when i need them, but i want to check these files exist in my program. i can check file like atl80.dll because i can...
28 Jan 2013 by Richard MacCutchan
You can use the LoadLibraryEx function[^] to verify the presence of any DLL.
27 Jan 2013 by cd_JoeWang
my first question in codeproject...how to check pc install runtime library, such as msvcr80.dll, crt, atl and so on. if pc doesn't install runtime, in order to protect program running normally, i will install for them. but howto check? thank you all:)
27 Jan 2013 by Muthuraja Irullandi
Hi,If you develop you application (VC++) using VS2005, you need to install VCRedist runtime in the client machine. In your program , you can check the VCRedist is installed or not using its product id, which is {7299052b-02a4-4627-81f2-1818da5d550d}. This might differ other run time.So,...
28 Nov 2011 by qps
I have a dialogue box and i want to do some processing autaomatically.. after displaying the dialogue.How to do that?
28 Nov 2011 by Sergey Alexandrovich Kryukov
Do I have to explain what's the programming for? Essentially, for doing some processing automatically. Learn a bit about programming, not just about C++ and Windows, and your problem will be solved. :-)—SA
14 Dec 2011 by cnvsudheerraju
It is possible to send a message from one Windows form based application to another using socket..? if s can anyone reply to how to use sockets?
14 Dec 2011 by OriginalGriff
1) Yes.2) Google[^].
2 Oct 2011 by Member 8284929
When I create a MFC application (exe) project and build it, I get one link error.Cannot open precompiled header file: 'DebugU/MultiFiler.pch': No such file or directory.Can you give me the solution?
2 Oct 2011 by Richard MacCutchan
Try rebuilding your project, it should recreate the precompiled header.
26 May 2013 by patel shital_pinky
how to create one dialog box in another dialog box on button click event?
26 May 2013 by Richard MacCutchan
The same way you would create a dialog box in a Windows program. See http://msdn.microsoft.com/en-us/library/ms644995.aspx[^] for full details.
7 Oct 2011 by nishadamit90
Hello All,Any one please tell me how to implement vpn in our VC++ application. The application is a Windows PC softphone.Please suggest to solve the problem.
8 Oct 2011 by Mehdi Gholam
See the following links :http://cplus.about.com/b/2008/06/09/can-you-write-a-vpn.htm[^]http://stackoverflow.com/questions/4975190/want-to-implement-a-vpn-for-just-one-application[^]
11 May 2012 by Richard MacCutchan
The problem is that you are trying to use a pointer that has not been initialised, so you need to fix that bug in your code rather than trying to work round it.
11 May 2012 by anushagodavarthi
How can i set deleted pointer value to NULL but not to 0xfeeefeee as i know Heapfreeobjects are set to 0xfeeefeee in microsoft visual studio.my problem is here:EXClass *pcClass = new EXClass ();................................if (pcClass) { delete pcClass ; pcClass = NULL; }...
20 Mar 2013 by Venkat Raghvan
Hello!Here I am paste my some code snippets of cpp file. typedef int(*pFunctionPointer2)(int,HANDLE); typedef int(*pFunctionPointer3)(int,int,char*,HANDLE); typedef int(*pFunctionPointer4)(FILE*,int,int,HANDLE); typedef bool(*pFunctionPointer5)(HANDLE); ...
20 Mar 2013 by Eugen Podsypalnikov
You could use the "main focus" of all "events":// exported by DLL// BOOL DllCheckMsg(MSG*);// your.cpp/*virtual*/ BOOL CYourDlgApp::PreTranslateMessage(MSG* pMsg){ (*m_pfnDllCheckMsg)(pMsg); CWinApp(Ex)::PreTranslateMessage(pMsg);}However, the goal of the...
20 Mar 2013 by H.Brydon
In a word, no there is no shortcut to defining, casting and assigning all of the method addresses.The only way to get around this is to link to the dll in question rather than using LoadLibrary()/GetProcAddress().
18 Mar 2013 by peoria123
I Have 9 browse buttons on dlg1 (9 files) which i have to pass to dlg2 click button event.// MyTabControl.cppMyTabCtrl::MyTabCtrl(){ m_DialogID[0] =IDD_DIALOG1; m_DialogID[1] =IDD_DIALOG2; m_Dialog[0] = new MyDlg1(); m_Dialog[1] = new MyDlg2(); m_nPageCount =...
14 Mar 2013 by Maximilien
What is the relation between the 2 dialogs ?Do you create Dlg2 from Dlg1 ?for example, one way of doing it (if Dlg2 is created from within Dlg1)//...void CDlg2::SetFileName( const CString& filename ){ m_FileName = filename;}//...CString CDlg1::GetFileName( ){ ...
14 Mar 2013 by H.Brydon
Provide a GetFilename() accessor in the 'from' dialog and call it from the 'to' dialog:// Get FilenameCString CDlg1::GetFileName( ){ return m_FileName;}... or if you want to do it the other way, add a SetFilename() accessor in the 'to' dialog and call it from the 'from'...
18 Mar 2013 by nv3
When I understand your question correctly, your two dialogs do not know of each other, but are both pages of tab control. So, your question would actually be: How can I get a pointer to Dlg1 while being in a member function of Dlg2?There are several ways to do that, some more elegant than...
17 Jul 2011 by ArjunHatwar
Hi Everyone, I'm a bit new to this world. pls helpHere's the code that is to be put into VB DllPublic Interface ISATExperionPCPlugin Function StartAudit(ByVal inputFile As String) As IntegerEnd InterfacePublic Class Exp Implements ISATPCPlugin Public Function...
17 Jul 2011 by Debojyoti Majumder
You need to create an object instance in your VB code that implements ISATExperionPCPlugin the interface.you can create the instance in side GetInterface function.then in ppv you assign the address of the object instance you created and type cast the instance as...
6 Sep 2011 by kadvanimayur
Hi allI need to access shared users's contact folder in vc++ application.I haven't been able to find this data in any MAPI wrapper.It shows only the current users' folders and Public Folders. Is it possible to access shared contact folder?
16 Nov 2011 by vikky08
I have a vc++ project(suppose "driver")in WIN32.It have also a resource file(version).in 64bit machine The whole project is same except the name (Like "driverx64").Now the problem is In the version file project name is set to "driver".So when I build the project in 64bit the project name show...
16 Nov 2011 by Richard MacCutchan
Create a new empty project called "driver64".Add all the source files from the driver project to the appropriate folders (use right click, "Add existing").Build.
15 Dec 2011 by skjdante
Hi,I m using VC++ 6.0, I have to create multiple dialog with a parent dialog and all other being sister dialog.When parent dialog is moved or resized...or any other mouse operation, same should happen with sister dialog. Please suggest me some way to get dis done. Newbee here.....IF needed...
15 Dec 2011 by Resmi Anna
your parent class is CParentDlg. It has two children CChildDlg1 and CChildDlg2.Keep CChildDlg1 and CChildDlg2 pointer type as members of CParentDlg class as belowclass CParentDlg : public CDialog{.......private: CChildDlg1* m_pDlg1; CChildDlg2* m_pDlg2;.......}now from...
9 Jan 2016 by Snorri Kristjansson
Active Directory change auditing solution. A Windows Service that stores selected AD change events from the Security log of all Domain Controllers to an SQL database.
24 Nov 2013 by Fresher16
Hello Everyone,I am working on a MFC Dialog based application on Windows 8 (32 & 64 Bit) platform. I want to add Open file and Save file functionality on a Button event. For this I tried to add Common Dialog ActiveX Control but I got the error message "Control failed to Initialize properly"....
8 Jul 2013 by jothivel k
Hi Guys,I have developed the application in VC6.0 in my windows XP machine. Now I am porting into my new windows 7 machine by converted into Visual Studio 2008. Now the problem when I am opening dialog it showing the error "ActiveX controls could not be instantiated. Reinstall or register...
10 Oct 2011 by chaiein
The ActivexCommandButton should change its property BackColor when the left mouse button is clicked.How to change this property in Visual studioC++ 2010.
4 Jan 2012 by chaiein
I got the solution that is first add the new class of installed templates type(in 2008) and select mfc class for activex control and select the commandButton in the list.the header(.h) and .cpp of the commandbutton is created.create a variable/variable pointer for command button and ...
1 Apr 2015 by Lantert
Add Excel style filter function to Chris Maunder's CGridCtrl
6 Dec 2014 by Member 3892343
Hi, I have a console application in c++ that Works, but in VC++ forms application I get the following errors, any idea how to correct it?error :Error 6 error LNK2028: unresolved token (0A000013) "extern "C" struct HDC__ * __stdcall GetDC(struct HWND__ *)"...
6 Dec 2014 by Philippe Mori
Are you sure that you want to use Win API directly? One of the main advantage of WinForms is that it abstract the API so you almost never need it.I think that you can uses WinForms classes like Screen Class[^].Otherwise, you need to properly configure your project options to link the...
2 Dec 2013 by omprakash jaiswal
plz help me..how to add folders in create new database in nsf file using c source code..thanks..
18 Dec 2012 by peoria123
I want to add 40 strings to combobox. I am using dialogbased mfc applications. I have 20 comboboxes on dialog and I want to add same 40 strings to all the dialogboxes.How i can do that? I can add strings to each combobox separatly but the program will become lengthy. Is their any other...
18 Dec 2012 by Maximilien
Adding 40 strings to 20 combobox should NOT take much time; there must be some other issues somewhere.You should at least have an array with the ID of each combobox (or maybe an array of the combobox themselves) for quicker access.I just tried something like this, and it seems to be...
4 Jan 2013 by H.Brydon
You haven't stated if the strings are static information (eg. "Jan", "Feb", "Mar", ...) or dynamic information that can change each time you activate the dlg. If the information is static, you can add the strings in the resource editor for the dialog. The strings are then compiled into the...
30 Oct 2012 by Kumar 09
Hi,Is it possible to add the .xml files in to a dll using c++. I am working on a project where i am calling an .exe from the web page using javascript and in .exe file i am using the .xml files. while calling the exe from web page i am unable to display the exe file. for this...
31 Oct 2012 by bjorn_ht
I'm not entirely sure I understand the question, but maybe Bin2C is what you're looking for? http://sourceforge.net/projects/bin2c/files/[^]
26 Sep 2011 by Coder Block
Hi, I have created dialog based application in mfc without checking the context sensitive help radio button. Now I'am trying to implement context sensitive help for my dialog based application._______________________________________________________________________ALL RELATED HELP, LINK,...
26 Sep 2011 by André Kraak
I was able to find the following:Adding Context-Sensitive Help to an Existing MFC Application[^]Q149343 - HOWTO: Implement Context-Sensitive Help for Dialog Controls[^]Q241218 - HOWTO: Implement HTML Help Text Pop-Ups in an MFC Application[^]TN028: Context-Sensitive Help...
13 Nov 2011 by Debojyoti Majumder
I need to add controls (for example a edit control) in a CListControl.I have found articles describing to add stings with Icons only.Is is possible to do so.Thanks in advance.
13 Nov 2011 by వేంకటనారాయణ(venkatmakam)
Check this List Control,XListCtrl - A custom-draw list control with subitem formatting(Best)or This,Another Report List Controlor These,http://www.codeproject.com/KB/list/