I have a couple of VS 2008 projects (C++) that are linked every time I start a build, even though nothing has changed. i.e. I select "Build Solution", it compiles and links, I select "Build Solution" again, it doesn't compile anything, but links again.
This is quite annoying and I have checked everything that might cause it to link agai...
I have created a application which copies files from hard disk to Floppy drive using the CopyFile() API.
In the middle of the copy process for a large file, if the floppy is removed from the drive then windows
system popup's up an error message.
I want to suppress this error message that is popped up by the system. I googled and read ab...
In a quest for handling events (like mouse moves and clicks) not by subclassing, one has to use installEventFilter and provide an event handler. While doing so, I've encountered a problem with RTTI support, meaning that typeid().name() gives QObject * all the time, no matter on which object event was triggered. There is, of course, anoth...
Consider this bit of code:
LARGE_INTEGER l;
size_t s;
if (s < l.QuadPart) return 1;
return 0;
When this is compiled under x64 it generates the C4018 signed/unsigned mismatch compiler warning (Ignore the uninitialized local variable warning).
The warning is fine, since QuadPart is LONGLONG which is signed and size_t is unsigned.
But ...
I'm ready to outsource the screen capture functionality of our application, because it's not our core business and I've spent too much time trying to get our code to do all the things I need. Time for a specialist, I think. My requirements, in decreasing order of importance, are below. Does anyone have experience with any commercial or f...
this is my code..
set trayicon
.......
NOTIFYICONDATA data;//this is global variable.
case WM_CREATE :
data.cbSize = sizeof(NOTIFYICONDATA);
data.hWnd =hWnd;
data.uID = IDR_MAINFRAME;
data.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
data.uCallbackMessage = ID_TRAYICON_NOTIFY;
data.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_INFO));
w...
Hello,
I am trying to create a class that implements the IUnknown interface. I have the following code in the header file.
#pragma once
#include "stdafx.h"
#include "Unknwn.h"
class Vmr9Presenter : IVMRImagePresenter9, IVMRSurfaceAllocator9
{
public:
Vmr9Presenter(void);
HRESULT Initialize(void);
~Vmr9Presenter(void);
STDMETHODIMP ...
I'm sort of new to c++ and i'm trying to create a game.
I have a 2d array RECT_GRID of rectangles.
I have a 2d array GRID of unsigned short.
I fill the rectangle array during WM_CREATE
The WM_PAINT event paints rectangles for all the elements in the array. The color of the rectangle is based on the value of GRID[x][y]
I made it so when...
I changed some parameters and now I don't remember how to "go back". I'd like to know if it's possible to reset the build settings. I don't mean the IDE settings(on tools->import/export).
Thanks
...
I'd like to know which settings should I set so I can get my C++ programs code to be as optimized as possible for speed or size. How can I do that?
Thanks
...
Hello,
I have a problem in catching an exception.
I am trying to re throw an exception and I get a message:
"There is no source code available for the current location".
The code is very simple:
#include <exception>
using namespace std;
try {
throw exception("asas");
}
catch (const exception& e) {
cout<< "Error msg"<< e.what()<< ...
Iam creating an application like resource hacker. I want to change the title bar text of a window whose handle I can find out using SPY++.
Is there any way I can make modifications to the resources of the assembly and change the title by my code, so that the change is permanent.
Are there are tools free or commercial like my program? ...
I have a 2d array grid made as int GRID[10][20];
What I want to do is remove the last row GRID[LAST][ALL] and insert a blank row at the start of the array. I tried Googleing this with no luck. Thanks
...
Hello. I'm using CreateFileA and ReadFile in Visual C++ 2008 to open and read an ASCII text file into memory. This works okay (I can view its contents in memory), but with one exception. For some reason the TAB characters (0x09) are being changed to NULLs (0x00). Needless to say, this is wreaking havoc when I try to parse the file. ...
Hi i am new to hooking..i am using wm_getmessage hook to know which menu item
is clicked.
i am using the follwing code to get identifier of the menu
WORD identifier=LOWORD(pMsg->wParam);
it is giving integer value..up to now is fine...
my problem is how to know which menu item is clicked by using this
identifier? is it possible by th...
i want to know which menuitem is clicked using WH_GETMESSAGE hook.can somebody help me please...from one week i stuck with this problem?
plz provide a way how can we achive this..using win32 dll. i am working on vc++6.0.
Thanks in advance....
...
Hi,
I can acheive the same functionality by both PostMessage and AfxBeginThread ( calling asynchrously )
So where lies the the difference between PostMessage and AfxBeginThread?
...
for visual studio 2008. sp1 is already installed.
...
HI I have a application developed in VC++6.0 ,now I want use some new features from .NET and developed a library, to develop this library I have to use the CLR-VC++ now I packaged this in a DLL.Now I need to call the routine of this DLL in my MFC application.
I tried to write a small MFC application to load this DLL, All the time the Lo...
Hi!
I have created a ActiveX control which works in all PCs except two on client's location. I have narrowed down the problem to failure of CoCreateInstance() which fails with unknown error.
What could cause this problem?
Please see the code below:
try
{
CComPtr<IDispatch> lpTDispatch;
//Following line generates an exception
H...