-
- Class View Properties adds wrong code for NM_CUSTOMDRAW
by VoiceOfExperience
- 2 Replies
- Last post
by VoiceOfExperience
- A dialog contains a CListCtrl. To add a message map entry and handler for NM_CUSTOMDRAW, I selected the dialog in Class View, Properties, Events, chose the IDC for the list control, NM_CUSTOMDRAW, and "add code". This created a message map entry, function prototype, and function, with the line of code
LPNMCUSTOMDRAW pNMCD = reinterpret_cast <LPNMCUSTOMDRAW>(pNMHDR);
However,
-
- Monitoring the folder
by Ifahad
- 1 Replies
- Last post
by Bruno van Dooren
- HI, I m looking for some sort of code or library which I can use to monitor any specified folder. When ever new file is added in the folder I want to run a specific function. Plz help me Thanx
-
- 'View' contents get lost
by sud_avr
- 8 Replies
- Last post
by Simple Samples
- Hi all, I am newbie to all this. This is what I am trying to do by creating n MFC application. Display a window with a view. Write some text to the view. But each time I minimize the window and restore it, I see that my view contents are lost. I tried using the functions UpdateWindow() and Invalidate() on the view. This is a function associated with the message map of my view. LRESULT CTe
-
- HELP. Convert TCHAR array to std::string
by peter.Yan
- 4 Replies
- Last post
by peter.Yan
- Hi all, the following is a fragment of my program. The problem is how to convert the TCHAR array to std: tring. There is one error, convert from 'TCHAR [1024]' to 'std: tring'. std: tring matLabFilename TCHAR currentDirectory[1024]; GetCurrentDirectory(1024, currentDirectory); matLabFilename = std: tring(currentDirectory) +'\\' + matLabFilename; Any suggestion or advice are appreciated. Than
-
- How to get ip address of client machine?
by Purusothaman A
- 2 Replies
- Last post
by Brian Kramer
- Hi all, I am implementing Client/Server using CAsyncSocket. In Server side implementation, I want to get client machine's IP address. How to get ip address of client machine :) Purusothaman A
-
- stdio.h errors in Visual Studio 2005
by Death_oClock
- 14 Replies
- Last post
by Brian Kramer
- I just finished installing VS 2005 (is it that hard for microsoft to just let people download like, a zip file of it, rather than an img file, which i had no idea what to do with at first ) and tried the following code:
#include <stdio.h> // include the standard input/output header file void main(void) // our program starts here { printf("Hello Worl
-
- Calling C++ function from VB.NET getting an error "Attempted to read or write protected memory"
by KannanPV
- 1 Replies
- Last post
by Bite Qiu - MSFT
- I am trying to call a C++ function (written in VS 2003) which is referenced as an Interop library from a VB.NET tool but getting the following error. Any help is really appreciated. Thanks in advance
AccessViolationError
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt"
Relevant Sample code:
C++ (Solution -- gp
-
- Help with Thread scheduling
by anantvemuri
- 4 Replies
- Last post
by anantvemuri
- Hello, I am trying to create two threads such that Thread-1 runs every 20milliseconds and Thread-2 runs all the time. Thread-2 is basically preempted or suspended till Thread-1 completes operation and again gets resumes operation. I am new to using threads, but based on some sample code I have managed to create threads. But I don't know how to schedule them in the above fashion. Its necessary that
-
- Cannot open include file: 'gdiplus.h': No such file or directory
by nimm
- 1 Replies
- Last post
by Naveen R
- Hi, I aam doing some enhancements to a code written in vc 6. So i tried to build the code and debugg it. foll comple error occurs Cannot open include file: 'gdiplus.h': No such file or directory I tried searching the system for the file but its not there.
-
- Serialport sending bytes > 127
by Sam Wane
- 14 Replies
- Last post
by Simple Samples
- Hi,
I'm trying to send bytes in the range 0-255 to the serial port in VC++ 2005.
I have tried the following code but it will not send characters >127, I think the problem is in the ToChar conversion. Can a string have 'illegal' characters (e.g. 255). Could anyone help
unsigned int ch1=200;
unsigned int ch2=251;
unsigned int ch3=252;
char op1=Convert::ToChar(ch
-
- linking debug binaries with the release binaries
by Axyz123
- 4 Replies
- Last post
by Axyz123
- Hi,
What is the problem if I link a release binary with a debug binary My application uses a third party utility. The third party company has provided me only with the release binaries ( .lib and .dll ). Because of that, I am forced to use release environment while developing my application.
All inputs is greatly appreciated.
-
- coloring a window control
by cadouthat
- 3 Replies
- Last post
by Bite Qiu - MSFT
- i dont know if this is the right section, but how would i go about coloring the background of a button, static, edit, listbox, ect.
can someone give me some example code to get me started
thanks in advance
-
- MFC Picture Control - Cannot load .jpg images
by Predoni Traian
- 2 Replies
- Last post
by Nishant Sivakumar
- Hello, I have a small test that do not work. It is a simple Dialog Based application. I have a CDialog and on that dialog is standard MFC Picture Control. Is working when I try to load resources like icons and bitmaps but if I try to load a simple file like C:\Bluehills.jpg is not working. I tried standard examples from microsoft like loading metafiles but is not working. Off course I did not load
-
- Building the same code ==> different output
by TomFr
- 9 Replies
- Last post
by TomFr
- Hi,
is there anybody from the C++ Compiler / linker team that can answer the following question.
We build our product using VS2003 (C++ Code / Release build). After the product is released we
transfered the code to a different machine for maintenance. We then build the software again using the same version of the tools . To make sure that we can reproduce the original build we did a b
-
- Deployment to system folder
by CTStiff
- 5 Replies
- Last post
by Simple Samples
- I have set up an installer in Visual Studio 205 that deploys my C++ dll on the C: drive of the target computer. It works fine, however, I still have two questions:
1. Since C: is not necessarily the system drive on everyone's computer, how would I change my installer to detect the target computer's system drive and then install my program
2. My dll is called from an EXCEL VBA progr
-
- Problem Creating a Class
by Zero_
- 11 Replies
- Last post
by Zero_
- Hi folks,
I'm trying to add a garbage collected Class to my WinForm app I'm writing using VS C++ 2005. At the moment, the compiler is telling me that there is no appropriate default constructor available when I attempt to create an instance of my class.
At the begining of my Form1.h file I have the following:
ref class UpdateResults;
Later on, I have a BGWorker who's
-
- How to create a "standard" DLL
by mjsalvador
- 9 Replies
- Last post
by Shakje
- Hello,
I am having problems with creating a DLL to be used in another application. I am using VS2003. I would like to export some classes in this DLL, and use them afterwards.
First, which type of proyect should I create "MFC DLL" I create a "MFC DLL" proyect, add the files (.h and .cpp) which have these classes to the proyect, and declare the classes with the AFX_EXT_
-
- RegSetValue problem, don't know how to use byte datatype
by Jessy D. Exum
- 3 Replies
- Last post
by TilakGopi
- I learned C++ really quickly and don't know as much about all the data types as I should. I don't know how to use RegSetValue correctly because the data it takes in is type BYTE*. I need to put three values in different locations: DWORD:0x00000001 An IP address And a path to an executable The problem with this is that I have no idea how to assign these values to a byte, and I am not really even s
-
- Linking mixed-mode DLL from native code
by DaveSmith
- 6 Replies
- Last post
by DaveSmith
- I've often used native code from unmanaged code (writing managed wrappers and the link), but now I'm doing the opposite and I'm a bit confused. I'm working on a library to load map imagery, and it has been purely native C++ up to now. I decided that the .NET image manipulation classes would be handy and would help me avoid introducing new external dependencies, so I decided to try that for actuall
-
- private in the unnamed union/structure treated as public.
by Mag pie
- 5 Replies
- Last post
by einaros
- Code Snippet
class Hello { union { unsigned char bbb[8]; struct { int x; int y; }; }; };
Hello helloness;
helloness.bbb[0] = 0; // error C2248: 'Hello::bbb' : cannot access private member declared in class 'Hello'
helloness.x = 0; // works.
I think it has something to do with unnamed structure and sructure's member being public.
though, with
-
- plot Library?
by Surezsu
- 1 Replies
- Last post
by einaros
- Hi all I need to plot values on a graph. Say for example I have an two integer vector 4,2,3,5,6,7 0.564,0.656,1.6456; now i want to plot these values. What's the best way to do that I saw a
Plot Graphic Library on this webpage
"http://www.codeproject.com/miscctrl/pgllib.asp" but it not work with in VS2005, it will give some error. error C2923: 'std::list' : 'std::vector<hull
-
- CHtmlView without visible borders
by MsOngame
- 2 Replies
- Last post
by MsOngame
- I am using a CHtmlView derived control to provide web-browsing capabilities in CFrameWnd-derived windows running "game like" software (it should look a bit fancy) So far, I've been using these components in a pretty normal way. My problem now is that the new requirements I have received from the graphical department calls for the component to be fully integrated within the frame window.
-
- [Help!!] Deploying mfc app(VC++6.0) on XP SP2
by soorya_j
- 6 Replies
- Last post
by soorya_j
- Hi,
I face an issue which is faced by many mfc programmers. I read most of the links which talks of deployement but couldn't find any solution to my problem...
I use VC ++ 6.0 Enterprise Edition and I have an mfc application (mfc is linked as shared dll) which I want to run in a machine where VC is not installed. The target system is Windows XP SP2. After verification of dependencies
-
- Finding all methods from CLSID
by ahelpyguy
- 12 Replies
- Last post
by Aleksandr Tokarev
- Hi, I need to write one small application. Where i need to find all methods and properties of a activex control. like, 1) Take CLSID or Prog ID 2) Find all methods How to start in vc++, Does anyone have the sample code or any docs Thanks
-
- C++ datetime
by rahulsk19471
- 5 Replies
- Last post
by einaros
- Hi,i am a c++ beginer(*not C++.net*).i am using the visual studio 2003 comand prompt compiler.
I wan't to write program that prints the current date and time.
Can some one tell me the code/statement that would do print the date and time
Thanx