Quantcast
Channel: Visual C forum
Browsing all 15302 articles
Browse latest View live

volatile changes declaration

Windows 7, Visual Studio 2008, C++Begin with a declaration of a structure:st_common_data m_common_data;OnInitDialog() hasmemset( &m_common_data, 0, sizeof( m_common_data ) );Then I realized that...

View Article


How to implement stub for custom marshaling

Hi,In my project I need to implement custom marshaling. As per msdn document to support custom marshaling IMarshal interface to be implemented. This IMarshal is used to get the proxy interface id and...

View Article


Porting C code from Solaris/Linux to Windows Server 2012

Hi, The requirement is to port a legacy C code (~1.5 million LOC)  running on Solaris/Linux to Windows Server 2012.  1. The C code is making a lot of underlying Linux system calls, Linux IPC...

View Article

Adding menus dynamically

I tried adding sub menu items to an existing menu.First time when I do it it works fine ,but next time when I try to add another menu item to the one that I previously added it is getting crashed.Here...

View Article

Get Media and recorder speeds separately in IMAPI

In my application I have used  IMAPI IDiscFormat2Data::get_SupportedWriteSpeeds() to get the write speed of the media.This API returns write speed considering both recorder and media.Problem is that,...

View Article


Capture screenshot of specific window without monitor

Hi,I'm trying to capture window with below code. HDC hdcSource = GetDC(hWnd); HBITMAP bitmap = NULL; HDC hdcTarget = CreateCompatibleDC(hdcSource); if(hdcTarget) { RECT rect; GetClientRect(hWnd,...

View Article

I wrote code in Visual C++ express edition 2010 and a LINK ERROR [1207]...

Hi:Months ago I wrote code in Visual C++ (2010 express edition) and somehow I used Windows Forms (and it was also clr compatible). Sorry if it seems a mess (perhaps it was), however the code was...

View Article

How to create a movable menu bar in Win32

I need to create a movable menu barin Win32  that you can use the mouse to drag, it does not show by click right mouse button,I do not know how to  implement, please post a sample code, thank you!妆台秋思

View Article


How to save ink to png image?

Here I have write an ink app using COM, now I want to save the ink data to a png image. But  only an empty png file is created, maybe there is something wrong in my code, please help me! The code is...

View Article


Direct2d - C++ stroke using bitmap

I have created a bitmap brush using an image. I have used the bitmap brush to draw a rect usingm_pRenderTarget->DrawRectangle(&rcBrushRect, m_pStitchBitmapBrush, 10, NULL);and of course the...

View Article

Fatal error (1017) invalid integer constant expression in ctype.h during...

While migrating VC++ code from VS6 (1998) to VS5(later year) I had to remove __STDC__ from project properties->Preprocessors. It fix lot of 'tagVariant' related errors. Next what happened is...

View Article

Windows 8.1 / Windows SDK & Visual Express 2013 for desktop

Hello, Is possible to include directx3d 11 to visual studio express 2013 for desktop ? I was trying install it, but it wasn't work. Can someone help me ?

View Article

Is there a tool to check for problems in code?

Hey guys,I have a code that was ported from x86 to x64 but for some reason not all the x64 features are working properly, is there a tool that allows me to check the code for what's making this happen...

View Article


How to write simple program in C++ using Visual Studio 2013

This is my simple program.But Visual Studio cannot recognize simple COUT statement#include<iostream.h> void main() { //Standard Ouput Statement cout << "My First C++ Program"; // Wait For...

View Article

How to find only visible portion of the window?

Hi,I had put lot of controls in form window and some dialog's also embedded. Suppose if I want to know whether my mouse pointer coordinates in side the dialog or not.I am using PtInRect function by...

View Article


Trouble Linking To Boost.

Hi Folks:   I've just retired my development machine and I'm having problems getting compiles through my new PC.    After a successful compile, I'm getting this error:      LINK : fatal error LNK1104:...

View Article

Is it possible to add 64bit file support (stat64, lstat64, etc.) to legacy VS...

I have a legacy VS 6 C/C++ project that builds cleanly and runs cleanly on Windows versions from XP to 8.1.  However, it's limited when accessing files over 2GB.  I understand that this is related to...

View Article


EventHandlers as delegate inside a loop

Hi,I have a code in c# that I am porting to c++/clr winform. C# code isVideoStreamer[] vs; int num = 20; vs = new VideoStreamer[num]; for (int i=0; i < num; i++){ vs[i] = new VideStreamer();...

View Article

Get Value of CMFCPropertyGridCtrl/CMFCPropertyGridProperty

I can't find it in the MSDN docs or anywhere on the net. How do I get the value of the selected item (combobox) in a CMFCPropertyGridCtrl/CMFCPropertyGridProperty in MFC?I searched MSDN until my head...

View Article

get_time bug

There appear to be several bugs preventing std::get_time() from working. Specifically using specifiers %p and %X. From what I can tell, the source of the problem is in xloctime::do_get(...)When I try...

View Article
Browsing all 15302 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>