-
- AfxBeginThread failure cause?
by VoiceOfExperience
- 14 Replies
- Last post
by VoiceOfExperience
- Under certain circumstances, AfxBeginThread returns NULL, apparently having failed to create a new thread. How can I get more information about why the failure occurred GetLastError() returns 0.
-
- Error while compiling C++ classes
by Participant
- 3 Replies
- Last post
by Participant
- Hi there, I am facing a problem with C++ class library. I have the source code of C++ classes and I want to build a Class Library Solution. Whenever I compile the project, it gives me the following error: Error result 1 returned from 'E:\WINDOWS\system32\cmd.exe'. I have searched for the problem and came up with various solutions including: 1) Changing the name of AutoRun in the registry 2) Makin
-
- How do I compile?
by Heat
- 8 Replies
- Last post
by Heat
- I am new to C++, I was running VS 6.0 and had to upgrade to 2005 version since it was giving me compability issues. So now I am lost again.
I am trying to build and execute/compile this:
Code Snippet #include < stdio.h> void main() { printf("\nHello World\n"); }
I started by going to file>new>file>C++ file (.cpp)
I get new blank p
-
- InvalidateRect and GetClipBox
by alunlee
- 4 Replies
- Last post
by alunlee
- I invalidate a rectangle of the client area in OnUpdate like this:
Code Snippet
CRect rect(10, 20, 30, 40);
ClientDC dc(this);
OnPrepareDC(&dc);
dc.LPToDP(&rect);
InvalidateRect(rect);
However, I can¡¯t get the rectangle in OnDraw like this:
Code Snippet
CRect rect;
pDC->GetClipBox(&rect);
-
- Allways Compiling all files
by NyAw
- 1 Replies
- Last post
by Simple Samples
- Hi, I'm having problems with Visual Studio 2003 .NET. When I try to compile a solution the compiler always build all the solution even if I have no modified any file. I have tried to enable "minimum regeneration" from "C/C++" properties and enabled "Incremental linking" in "Linker" properties. When I try to debug the application I have the same problem, it says if I would like to generate the appl
-
- Image Cursor
by Cassiopeiaxy
- 1 Replies
- Last post
by Ayman Shoukry - MSFT
- Hi,
I am not sure if i am posting in the right forum, kindly direct me to the correct one if i make a mistake.
I am coding in C programming compiled in vs.net 2005. I wanna write a program such that it constantly detect the cursor position by using "GetCursorPos" function. If the cursor is moving upwards, it should display a "compass pointing to north" image. If the curso
-
- Problem with x64 hello world app...
by Balthasar
- 10 Replies
- Last post
by Ben Anderson MSFT
- Hi all, I've been trying to port a 32bit app to 64bit these past days, and finally got the thing to compile and link after a long struggle. needless to say, the thing refuses to run on my x64 XP machine, it's missing a number of libraries (assemblies, or whatever the term en vogue these days may be. God, does anybody remember the days when code was just code Sigh.) Anyhow.... I thus am now trying
-
- Please give me a project to start
by Mr_Info
- 3 Replies
- Last post
by Damien Watkins - MSFT
- hi everybody
i begin to read about VC++ 6 and i need practice and exercise to be strong in practical dimension. if you have simple project that fit in my need please tell me.
thank you
-
- How to Create a new GUID
by David N.4117
- 14 Replies
- Last post
by JKnife
- Hi All,
I am developing in unmanaged C++, ATL, Win32. The .Net Framework has a function to get a new GUID. How do I create a new GUID without using .Net function call
Thanks
-
- Xor encryption
by JohnCPLUS
- 5 Replies
- Last post
by Ramkrishna Pawar
- Hi everyone. Im working on a encryption program using Xor.
My code so far:
.cpp
Code Block
#include <windows.h> #include "TriEncryptHeader.h" #include <iostream> #include <fstream> #include <math.h> #include "debugpriv.h" #include <time.h> #include <stdlib.h>
/************Includes**************/
const ch
-
- exiting a user-interface thread
by jbwitt
- 3 Replies
- Last post
by Simple Samples
- I have a user-interface thread that creates a dialog box:
BOOL tcMyThreadClass::InitInstance() { mCMyDialog = new tcMyDialog; m_pMainWnd = mCMyDialog;
.....
return TRUE; }
I want to terminate this thread (call its ExitInstance()) whenever mCMyDialog::OnCancel() is called. But I can not get mCMyDialog to post the WM_QUIT message to this thread. It will on
-
- Which One(Managed C++ or Native C++)
by TPECI
- 9 Replies
- Last post
by Han Qiao
- Hi everybody i am starting a new project and i ma in doubt about my programming language, should i use native c++ managed c++. i should use following thing in my project: wlan communication. direct input. direct show ( previewing) direct sound (capture wave) using usb. so know please tell me which one give me more freedom to do my project.
-
- MSVCRT vs. MSVCR*?
by Rafael &#40;Live Butte
- 14 Replies
- Last post
by Bite Qiu - MSFT
- Can someone explain or point me in the right direction regarding the difference between MSVCRT and MSVCR* libraries and why applications (i.e. Notepad) are linked to MSVCRT.dll Does MSVCRT.dll just stub out all exports and handle manifests
-
- Maybe wrong implementation of IMPLEMENT_RUNTIMECLASS_T
by BERNARD38
- 4 Replies
- Last post
by BERNARD38
- Hi, I think there is a wrong implementation of the IMPLEMENT_RUNTIMECLASS_T macro
Here is your implementation
#define IMPLEMENT_RUNTIMECLASS_T(class_name, T1, base_class_name, wSchema, pfnNew, class_init) \
AFX_COMDAT const CRuntimeClass class_name<T1>:: class# #class_name = { \
#class_name, sizeof ( class class_name<T1>), wSchema, pfnNew, \
&base_class_
-
- VC8 LoadLibrary access violation
by Alex1st
- 9 Replies
- Last post
by Alex1st
- I am doing load library but getting access violation
CString strModule(_T( "MyWatch.dll" ));
HINSTANCE hModule = ::AfxLoadLibrary(strModule);
DWORD dwErr = ::GetLastError(); //998 Access violation in one of the dependent module
but when I preload them like
HMODULE hModule0 = ::LoadLibrary(_T( "gadgetd.dll" ));
HMODULE hModule1 = ::LoadLibrary(_T( "g
-
- How does virtual functions are called ?
by Jafar Kumarkiri
- 1 Replies
- Last post
by Bruno van Dooren
- Hi, While reading the concept of virtual function I came to know that, their is one hidden member in each object of class in which at least one virtual function is declared; that is VPTR(vtable pointer) ,which is array of function pointer. My question is by using VPTR how the correct function is resolved. Thanks
-
- Managed C++ - Unable to new more than 4K in a VC++6 lib
by Kelbob
- 7 Replies
- Last post
by Holger Grund
- Hi, I have created a managed C++ wrapper in VS2005 which uses a lib in written using VC++ 6. When calling a function that fails when newing anything more than 4K. Heres' the Lib code: void Newit() { void* p = new char[4096]; // Succeeds } void Newit2() { void* p = new char[4097]; // Fails } Anyone any ideas . The code is built in release mode. Regards John
-
- Having both Microsoft Visual C++ 6.0 and Microsoft Visual C++ 2005 Express Edition
by euridika
- 2 Replies
- Last post
by Marius Bancila
- Will having Visual C++ 6.0 (Japanese) affect Visual C++ 2005 Express Edition's (in English) performance (in a Japanese Windows 2000 OS environment)
-
- Unresolved external symbol when using __inline in implementation file
by Terence Lee
- 3 Replies
- Last post
by Holger Grund
- Hi,
I am new to C++. Could somebody please explain why when I include __inline in the implementation file, some functions caused "Unresolved external symbol" error but not all.
XCString.h ==========================
class XCString { private: LPWSTR Buf; // Buffer. int Len; // Length; public: WCHAR operator[](int loc); // Operator [] overloading. XCString& operato
-
- AfxGetApp() returns NULL in DLL
by dezhur
- 12 Replies
- Last post
by dezhur
- Hello!
I have next function inside the MFC shared DLL library:
BOOL CMyBasic::CheckMessageQueue() { MSG msg; while (: eekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { if (msg.message == WM_QUIT) { return(FALSE); } else { ::GetMessage(&msg, NULL, 0, 0); ::TranslateMessage(&msg); : ispatchMessage(&msg); } } AfxGetApp()->RestoreWaitCursor(); // <-- AfxGetApp()
-
- Regarding File searching APIs
by CoolJammy
- 8 Replies
- Last post
by Andreas Masur
- Hi,
We have a set of APIs for Registry Search APIs available in MSDN.( http://www.windowsitlibrary.com/Content/595/1.html)
Can any one help me in getting all the APIs which help the developers to implement File searching operations in MSDN.
I would be very thankful to you if you can help me in this regard.
Regards,
Ravi Kumar.
-
- Question to VC compiler Team ...
by Man-Nag
- 7 Replies
- Last post
by Holger Grund
- VC compiler team:
"Is there any Way to tell the LINKER to link all the global symbols first and for all the other non-available
symbols to include the relevant libraries"
This works fine in VC++6.0 but the same does notwork in Visual Studio 2005.
What was the reason for maintaining the backward compatibility
Is there any Reason to do this, if so what' the r
-
- only have 1 under win32 projects
by BrianWalker
- 4 Replies
- Last post
by BrianWalker
- I am only seeing one template under the win32 project which is Win32 Console App. and in my sample book is telling me to choose the win32 App which is not showing under the Win32 project for Visual C++ 2005. What are my options
-
- possible bug in std::map::find?
by electrikAdic
- 3 Replies
- Last post
by einaros
- Hi, I have an object X in which I've overloaded operator== and operator<. I am using X as the key into a map. The implementation for Visual Studio's stl find looks like this: iterator find(const key_type& _Keyval)
{ // find an element in mutable sequence that matches _Keyval
iterator _Where = lower_bound(_Keyval);
return (_Where == end()
|| _DEBUG_LT_PRED(this->com
-
- afx and afxwin and libraries
by Jerry584894
- 5 Replies
- Last post
by Jerry
- When I include <afx.h> or <afxwin.h> it says I'm missing the 'nafxcwd.lib'
1>LINK : fatal error LNK1104: cannot open file 'nafxcwd.lib'
So then naturally I go to tools->options->directories
to add the directory in the ia platform of the SDK... after which it says that it doesn't open the ia because the program targets X86 programs...
help please.