-
- Thread Sleeping and Hook Callbacks
by Zyphon
- 14 Replies
- Last post
by Aleksandr Tokarev
- Hey,
I'm working on a Win32 application that doesn't have its own window, but listens to keys typed globally via a LLKeyboardHook and moves the mouse every couple of seconds. In order to keep the mouse from moving all the time, I have the thread sleep for a few seconds in between mouse moves, but during this time the hook callback doesn't execute, which makes sense because the thread is sle
-
- How to unselect the text in CRichedit control that is selected using SetSel() method
by Suneel VLN
- 2 Replies
- Last post
by Zinkyu
- How to unselect the text in CRichedit control that is selected using SetSel() method
-
- removing more than 1 data items from the set
by ku19832001
- 1 Replies
- Last post
by Viorel.
- Hi all,
I have a set which contains a bunch of ip address. Now my application tries
to connect to that ip address and if the connection fails then it removes
that ip address from the set("stale ip")......Now how do i achieve this
Here is the loop
set<CString>::iterator itr = remotenodeip.begin();
while(itr != remotenodeip.end())
{
CString ip_addr = *itr;
CStr
-
- Variable Problems at Runtime
by DominicJudd
- 6 Replies
- Last post
by DominicJudd
- I have a set of variable set up as follows
POINT ptNewPosition, ptSpriteSize, ptBoundsSize;
Is there any reason why ptSpriteSize would work correctly, while ptNewPosition and ptBoundsSize give
CXX0017: Error: symbol "ptNewPosition" not found
and
CXX0017: Error: symbol "ptBoundsSize" not found
Any help would be appreciated, especially as the code wo
-
- Application can't create a new file while running in Debug Mode
by Flo_Mumbai
- 9 Replies
- Last post
by Simple Samples
- Helle, my program needs to create an Output file. This work when I create a Release File and then run the exe. But when I run my code in Debugging mode, it opens the console window but stops at the point, where the output file should be created and returns an error in form of fp=NULL. this is the concerned part of the code: fp=fopen(filename,"w"); if(fp==NULL) { p
-
- String cannot use this type here without a top-level '^'
by Philly
- 2 Replies
- Last post
by Philly
- hi,
im converting my c# project to c++ (managed)
the c++ project is mixed with managed and unmanaged code.
basicly when using the below i get this error:
error C3149: 'System: tring' : cannot use this type here without a top-level '^'
but when using String^ i get:
Error 1 error LNK2020: unresolved token (06000001) CoolDrive.RS232::.ctor
can anyone help me o
-
- 4 threads created by CFileDialog::DoModal
by VoiceOfExperience
- 4 Replies
- Last post
by VikasKumar
- With VS2005/MFC in a dialog, I am using a file open common dialog to allow the user to select a file. The code for this is
char fileTypes[]=_T( "My files (*.fil)|*.fil|All files|*.*||" );
CFileDialog dlg(TRUE,_T( "fil" ),_T( "*.fil" ),OFN_CREATEPROMPT|OFN_HIDEREADONLY|OFN_EXPLORER,fileTypes);
dlg.m_ofn.lpstrTitle=title;
dlg.m_ofn.lpstrInitialDir=start
-
- Some novice questions....
by _mAyDaY_
- 4 Replies
- Last post
by _mAyDaY_
- Hey everyone.... , just started using MS Visual Studio recently for an
application i'm making... and hit some problems, so any help would be
very usefull :)
(to Mods - if this is in a wrong thread, please move the post)
first question is button related....
i have a button , which needs to be kind of ON/OFF style...
(also have 2 procedures for those states - buttonClick1 & buttonCl
-
- Upgrade to VS2005 Gives compile time error
by ravi_nilesh
- 5 Replies
- Last post
by aao123
- Hi All,
I have the following code.
// socket state structure struct _tagFTSocketState { DWORD dwFlags; DWORD dwState; DWORD dwUser; HANDLE hMutex; SOCKET socket; WSAOVERLAPPED Overlapped; WSABUF wsabuf; XFERCALLBACK cbfnCallback; _tagLargestFTPkt data; _tagXferInfo XferInfo; };
typedef _tagFTSocketState STFTSocketState; typedef std::vector<STFTSocketState *>
-
- Need HELP please "C programing"
by UGURMURAT
- 4 Replies
- Last post
by UGURMURAT
- Sorry if i have posted it to wrong section any way iam trying create a program so it loops mostly i have created to basic programs one is if statement and the other is like using scanf("%d",&w) so the numbers are allowed to change... the problem is i want to combine these together but i get two errors that i just couldn't solve or maybe even if i do so i gusee it wont work as i hop
-
- VS2005 professional 2005 and Vista
by sam_pro
- 2 Replies
- Last post
by sam_pro
- i compiled a lib with vs 2005 express on mswindows xp pro and i use it with a VS2005 professional on mswindows vista. VS2005 professional shows me an error "the lib was compiled with an older compiler". Do you know why
-
- MSVC++ Optimizer Produces Incorrect Output
by evouga
- 1 Replies
- Last post
by flymuck
- I'm using MSVC 2005 with SP1. In my code I have the following class:
Code Snippet
class tune { public: char title[20]; //20 long start; long loop_start; long loop_end; //32 short loop; short volume; byte flags; // 37 void *data; // 41 byte format; tune(char _title[20], long _start, long _loop_start, long _loop_end, short _loop,short _volume, void *_data, b
-
- DLL does not load in NT
by Jason Callas
- 2 Replies
- Last post
by Simple Samples
- Using Visual Studio 2005 I create a custom password filter library to be used on an NT 4.0 domain controller. (I know... I cry also when I think about the fact that we are still running NT 4.0...) Anyways. The dll loads when I test it on my XP system. I have confirmed this using SysInternals Process Explorer. But when I put it on my NT system it does not load. I see no errors in the Event Viewer.
-
- "The system cannot execute the specified program"
by ChrisNorval
- 4 Replies
- Last post
by richard.broadhurst
- Hi, I'm currently having a problem with using Visual C++ express. I'm a student at Dundee University and we're starting C++ this year using Visual Studio, I grabbed C++ express off the microsoft site and apart from a few problems with the .exe file not creating (which I discovered how to fix) and the few missing features I had no problem with using both, however when I started my current assignmen
-
- calculating the avredge score
by Kateryna
- 11 Replies
- Last post
by Simple Samples
- I need to right a program that reads the information from a file and calculate the average score for the soccer teams. I wanted to add the scores first and then devide them by their number. here is what I tried to do: #include <iostream> #include <fstream> #include <string>
using namespace std;
int main()
{ int score; int sum = 0; int count ={0};
fstream infile
-
- Using multiple threading on multiple-CPU computer
by Liu Lei
- 11 Replies
- Last post
by Liu Lei
- hi, ppl
I am currently using C++ (Visual Studio .Net 2003) for a software design.
The objective is to distribute work among multiple CPU so as to improve efficiency. The code I deployed is as follows:
Thread1 = new Thread( new ThreadStart( this , &Form1::FreezeProcess));
Thread2 = new Thread( new ThreadStart( this , &Form1::BlockinessProcess));
Thread3 = new
-
- cool-looking .exe files (images)
by Jerry584894
- 5 Replies
- Last post
by Jerry
- How do I assign an image (any type) to an .exe file
(you know, like warcraft symbol, Internet explorer, etc.)
-
- typecasting using templates
by Software Engineer
- 1 Replies
- Last post
by Software Engineer
- Hi,
The following is the sample code I am using to convert values from one datatype to another. In this case, converting from string to float value.
Code Snippet
#include "stdafx.h"
#include <sstream>
using namespace std;
template < typename type1, typename type2>
type1 user_defined_cast(type2 const & source)
{
type
-
- VS .Net 2005, how to disable intellisense...
by ChandraP
- 28 Replies
- Last post
by ChandraP
- Hi I am really frustrated with the performance of VS .Net 2005. This is because I always see at the bottom "updating intellisense..." and it uses 60% to 70% of CPU. How to disable this updating of intellisense... Please this is making Visual studio unusable. Thanks Chandra
-
- Md5 code changes from VS 2003 to VS 2005
by glcjr
- 5 Replies
- Last post
by glcjr
- A year or so ago I converted the c# code found at http://msdn2.microsoft.com/en-us/library/system.security.cryptography.md5.aspx into c++ code for Visual Studio 2003. But in Visual Studio 2005, it no longer works.
Here's the code that works in 2003.
static String* getMd5Hash(String *input) { // Create a new instance of the MD5CryptoServiceProvider object. MD5 *md5Hasher = MD5::Crea
-
- build output missing in output window (vs 2005)
by Marc.A.
- 8 Replies
- Last post
by Dennis Volodomanov
- Hi,
I've been tinkering around with this problem now for a while..
When building any C++ solution with my VS2005 Team Suite SP1 I get no output of the compilation process at my output window,
only "Build started" and then something like: "========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="
but no error messages, the error doesn't appear in t
-
- Marshall Multidimensional Array Using C++ Interop
by Ben_N_Athens
- 8 Replies
- Last post
by Rick Edwards
- I have code that needs to marshal a two dimensional array of doubles to unmanaged code. I have been working with an example from the MSDN that demonstrates marshalling a one-dimensional array. http://msdn2.microsoft.com/en-us/library/9b1fy41s(VS.80).aspx When I try to follow the example and pass a pointer to the two dimensional array, the unmanaged code only sees the first dimension. I think I c
-
- visual c++ 2005 programs distribut
by mirror2003
- 1 Replies
- Last post
by Bite Qiu - MSFT
- Hi.
I want distribut program (FORM) and i don't know what i must install on PC where i haven't visual studio.
Thanks for help
-
- Class Interrelationship
by petpan24
- 6 Replies
- Last post
by einaros
- I have the following problem in an application I'm writing
I have two classes, WGMenu and WGSubMenu, where WGSubMenu has as baseclass WGMenu. WGMenu defines a member, hThis.
WGMenu has a function which requires a WGSubMenu as argument, and inside the function it uses the hThis member of this class (which it got through the relationship with WGMenu). However, I have no idea how to get
-
- cannot convert from 'const char [7]' to 'char'
by prashant kumar sharma
- 3 Replies
- Last post
by einaros
- I was just tryin to write a smalll code in c++ ad i was getting this error ,can any one tell me how to remove this error