-
- Visual ignore modification in header file
by Olizit
- 5 Replies
- Last post
by Olizit
- Hello,
When i modify a header file, visual doesn't recompile the project and prompt "project up-to-date". Otherwise when i modify the source file associate with this header file visual recompile the project.
Olivier
-
- VC+VFP+ADO+filter
by boldeagle
- 2 Replies
- Last post
by Brian Kramer
- why "filter "attribute not support wildcard "%" in the frontŁ¬but it is ok for those not prefix with"%": str.Replace(' ','%'); str.Insert(0,'%'); sqlStr.Format("comment like '%s'",str); m_pRecordset->Filter=(_bstr_t)sqlStr;
-
- getline() headaches...
by jmac
- 4 Replies
- Last post
by jmac
- Code Snippet
//Begin code section for item number 1
cout << "Enter item 1: " ;
getline(cin,sitemone);
cout << "Enter a price for " << sitemone << ": $" ;
cin >> dpriceone;
cout << endl;
Code Snippet
//Begin code section for item number 2
cout << "Enter item 2: "
-
- getting user input from message box
by splinterx7
- 12 Replies
- Last post
by Simple Samples
- Hello, I'm trying to get my application to react to whether the user clicks yes or no on my message box however when i use the below code
if ( MessageBox : how( "Do you want to exit " , "My Application" , MessageBoxButtons::YesNo, MessageBoxIcon::Question) == DialogResult::Yes) { Application::Exit(); }
i get this error message
1>
-
- LNK2019 Error
by Atomic Ramen
- 5 Replies
- Last post
by Nishant Sivakumar
- I am recieving a LNK2019 error on 4 functions that I defined in another file that I included. The setup I have is:
"Graphics.h"
(This file also has an inclusion guard I forgot to write in)
Code Snippet
class arc
{
public :
// Constructors and such
void Set( float ixpos, float iypos, float iradius, float istartangle, float iendangle, COLORR
-
- Logical drive copying using CreateFile - Please help
by Software Engineer
- 2 Replies
- Last post
by Damien Watkins - MSFT
- Hi, In the following code i am copying the contents of logical drive F to G and then after that, from G to H. After the program execution completes, the contents of the drives g and h are not updated in windows explorer, even after pressing F5. If I executed chkdsk on G and H drives the content sync up with that of F. This problem is reproducable on NTFS but is not there on FAT32 partit
-
- I need help about multithreading in TCPListener ...
by Noreturn
- 11 Replies
- Last post
by TilakGopi
- In a TCPListener program I've coded, I used the sample codes about TCPListener I found in MSDN Library. But, when I execute this program, the interface doesn't give any response to other events such as clicking buttons, since the continuous loop prevents the other codes to be run. I know that I must do multithreading, but I don't know how to do. . Meanwhile, I also tried to use "B
-
- unsigned short vs. wchar_t in SAX2 API
by jimgong
- 6 Replies
- Last post
by Jim at HK
- Hi all, I am writing some codes to parse XML document using SAX2. The program works well in vc6 but can not compile in vs2005. I define a class CIndexHandler to parse the XML, here is definition: class CIndexHandler : public SAXContentHandlerImpl ... class SAXContentHandlerImpl : public ISAXContentHandler ... The problem is that, some functions in class ISAXContentHandler have parameter type &quo
-
- error C2059: syntax error : 'end of file'
by kevinhcj
- 3 Replies
- Last post
by Simple Samples
- hi, all, i'am encountered a unbelievable problem, happened in (no at the end of) a file say a.h, which has no problem along or being included in other files. i've checked many times but found no suspicious.
Cslice_iter(valarray<T>* vv, slice ss) : v(vv), s(ss), curr(0) {}
// In a declaration of a class
// f:\workdirect\foacc\foacc\mathematics\tmatrix.h(78) : error C2059: syn
-
- Question about accepting strings of European format
by Lee3305
- 8 Replies
- Last post
by Lee3305
- A friend of mine from the UK was testing a program I wrote in which there are parts where the user needs to input a double, almost always a decimal. Since he is from the UK, he has his regional setting on Windows set to European, thus, our decimal points are commas for them. Since my program is looking for decimal points, it crashes when it sees a comma used in that manner. Of course, when he set
-
- sprintf_s is not a member of global namespace
by dginley
- 9 Replies
- Last post
by Simple Samples
- I have a fairly small project that builds and runs under VS 2003. But when I convert it to VS 2005, it no longer builds. I'm now getting error C2039: 'sprintf_s' : is not a member of "global namespace" The message points to line 966 in a file named xlocnum in C:\Program Files\Microsoft Visual Studio 8\VC\include. I searched the equivalent file in the VS 2003 folder, and there is no menti
-
- Building the source code problem
by MotoMoto
- 5 Replies
- Last post
by soumya30680
- I get this error when i tried building my source code : Linking... .\Release\mcd.res : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt Error executing link.exe. CCalc.exe - 1 error(s), 0 warning(s) Im not sure what it means but when i tried to rebuild all, i get this error message instead Compiling resources... Error executing rc.exe. CCalc.exe - 1 erro
-
- Best structure to store collection of data
by REspawn
- 3 Replies
- Last post
by Simple Samples
- Hi,
I have a my own class which i created and i have a few hundred instances of this class to use in my application. I will need to add and remove at random from and within this collection.
Is the best way for me to store these as an array and then rebuild each time i add / extract from it or should i use another type of storage
Thanks for any help,
-Dave
-
- ActiveX control (OCX) and multi threads: Marshalling ?
by Fran&#38;&#35;
- 2 Replies
- Last post
by François
- Hi All,
I have to fill an OCX control (FlexGrid) in a second different thread. I have an error in the following MFC source afxtls.cpp :
// special version of CThreadSlotData::GetData that only works with
// thread local storage (and not process local storage)
// this version is inlined and simplified for speed
inline void * CThreadSlotData::GetThreadValue( int nSlot)
-
- Printing strings of TCHAR[] into a file
by tester_abc
- 3 Replies
- Last post
by Giovanni Dicanio (C++ MVP)
- Hi, I'm having difficulty printing strings of TCHAR[] arrays into a file using CreateFile & WriteFile. When I try to write TEXT("1234567") to a file using WriteFile, the result looks like this in the file when opened with notepad or wordpad: 1 2 3 4 5 6 7 There is a space between every character, which makes sense since I'm using UNICODE character sets, but I don't want it to look l
-
- Link all object files from one project in another
by john554585
- 4 Replies
- Last post
by john
- I have 2 projects in a solution - one is a DLL used by an external program ("ADll"), and the other is a executable project for unit testing ("ATest"). ATest needs to include the .obj files from ADll into its executable. Is there a way I can easily link all the modules from "ADll" into "ATest"
I began putting the required .obj files in the "Linke
-
- Small Linker Problem
by chris_14
- 14 Replies
- Last post
by TilakGopi
- Hi folks, Would you please be so kind to have a quick look at my code I'm trying to compile code for the WinCE platform using Visual C++ 6, but I always get a linker error. The Windows CE SDK has been installed, as project I've selected a simple WinCE Application in Visual C++. This is the source code, found at http://www.codeguru.com/cpp/w-p/ce/embeddedvisualc/print.php/c9799__1/ #include <m
-
- include file for PROCESS_QUERY_LIMITED_INFORMATION ?
by Blackcow
- 3 Replies
- Last post
by Bite Qiu - MSFT
- Hi,
I tried to use OpenProcess function on some protected process at Vista.
Following to other posts and articles in msdn, I wrote the code
hProcess = OpenProcess( PROCESS_QUERY_LIMITED_INFORMATION |
PROCESS_CREATE_THREAD | // For CreateRemoteThread
PROCESS_VM_OPERATION | // For VirtualAllocEx/VirtualFreeEx
PROCESS_VM_WRITE | // For WriteProcessMemory
PROCESS_
-
- can i have an array of inherited classes?
by HinDRAncE
- 4 Replies
- Last post
by Marius Bancila
- with the following code as example:
#include "stdafx.h" #include <string.h> #include <string> #include<iostream> #include<iostream.h> using std::string;
class Person { public: string m_name; int age; };
class Student : public Person { public: int m_grade; };
class Worker :public Person { public: int m_wage; };
can i have an array that contains both
-
- Mixed dll link successfully in win32 but fail in x64
by Tiebe
- 8 Replies
- Last post
by Tiebe
- I have a unmanaged and managed mixed dll project which builds well in win 32 but throws link errors in x64.
The code is mostly same as below:
// AeccDotNetUtils.h
class __ declspec(dllexport) AeccDotNetUtils
{
public :
static bool Execute( const wchar_t * assemblyFullName, const wchar_t * className, const wchar_t * funcName);
static bool Verify( const
-
- get User Objects/Handles for a process
by Nikolay Georgiev
- 1 Replies
- Last post
by Nikolay Georgiev
- Hello,
I'm new to using the windows libraries and I try to figure out how can I found the user objects (handles) for some process (like in the task manager). I've searched two days in MSDN, but couldn't find something useful. So far I understood, that using the PSAPI.dll I can iterate over the processes, so I can get the process ids of the current running processes. I can't make the next step -
-
- How to get this resource?
by bucz
- 3 Replies
- Last post
by bucz
- I have added to my solution (MySolution) a resource file (MyResource.resx), it has appeared in Resource Files section. Now, how to use this resource I have some Forms in my solution and they have no problems with refering to their own resources, e.g.: System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid)); this->butt
-
- GetActivePane no longer works in VC++ 2005
by ted944
- 2 Replies
- Last post
by ted944
- I used the CSplitterWnd::GetActivePane(int&, int&) function and it worked fine with VC++ 6.0. Recently I started the process of moving the code to the new VC++ 2005. Under VC++ 2005, the code compiled OK but it does not run because the GetActivePane function is somehow made obsolete (see afxext.inl). Any idea why So how do I get this function back or any ways to get around of this proble
-
- Handling child-window messages?
by Sephiroth
- 4 Replies
- Last post
by Sdi
- Alright, I want to figure out how to determine where a message came from when my parent window recieves it. For instance, my project contains a static window with the SS_BITMAP style. When the user clicks his/her mouse in that window, I will want to place a bitmap image at that location. The problem is, my parent window recieves click notifications when you click in ANY window, including the paren
-
- CDialog based app is crashing on exit at AFX_MODULE_STATE::~AFX_MODULE_STATE()
by nick78
- 14 Replies
- Last post
by Simple Samples
- Hi,
I have a Cdialog based modal dialog application that is crashing on exit in release only. I do nothing with the dialog except open it and then close it by using the "x" of windows. it's an mfc project using dynamically linked dlls.
The app is a global object, and a modal dialog is created in its initInstance.
the app crashes at the line delete m_pDaoState;(in afxsta