visual-c++

Using the Windows SetTimer() function

i am getting confuse in SetTimer() Function. SetTimer() Function takes three parameters eg; 1) SetTimer(1,2000,Timerflow); SetTimer() Function takes four parameters eg; 2) SetTimer(NULL,1,2000,Timerflow); What is the difference between these two functions. i know SetTimer() Three parameters.but when i try the four parameter Set...

code snippet for vc++[code snippet manager]?

Where can I get a code snippets for VC++ that can be used with the code snippet manager in Visual Studio 2008? I have SnippetEditor installed how to create snippet for VC++. ...

How to set up MS Visual Studio 2005 project dependencies for efficient compiling (c++)?

How do I set up MS Visual Studio 2005 project dependencies such that making a change in a higher level project does not force a recompile of all other projects it depends on. If I have 5 dll projects, which are related in various ways... Under the 'Project'->'Dependencies' I have identified the next project down, but only down one level...

same plugin(ATL COM DLL) should work in Mozilla ( rite now it is working in IExplorer )

I have a ATL COM DLL that work as plugin for IExplorer. Which basically enhance the download functionality of IExplorer.When we click to download a file its pop up my dialog instead of default IExplorer. I want that same dll will work for Firefox Mozilla. What I have to do for it. I found on net that it is possible, but did not get an...

Is it possible to use VS2008 built libraries from a VS2003 solution?

Hi, How can I use DLLs and libraries compiled with Visual Studio 2008 from within a Visual Studio 2003 project? Thanks, Dan ...

A question about windows iocp.

When I write a program about IO completion port in Windows Vista, the first sample didn't work and the GetQueuedCompletionStatus() can not get any OVERLAPPED structures. So I put the OVERLAPPED structure in global scope,and it works amazingly. Why is that? CODE1: int main() { OVERLAPPED o; .. CreateIoCompletionPort(....);...

Is this program running Asynchronous or synchrounous?

When I run this program OVERLAPPED o; int main() { .. CreateIoCompletionPort(....); for (int i = 0; i<10; i++) { WriteFile(..,&o); OVERLAPPED* po; GetQueuedCompletionStatus(..,&po); } } it seems that the WriteFile didn't return until the writing job is done. At the same time , GetQueuedC...

Pushing data into async RPC pipe causes Access Violation

I'm trying to invoke an asynchronous RPC call with a pipe parameter. I call RpcAsyncInitializeHandle(), start the call and then call the "push" function of the pipe in a loop. This works fine on Win2k and WinXP, but not on Vista. On Vista regardless of the buffer length passed exactly the 34th call to the "push" function causes an AV in...

How do I make a button caption bold in MFC?

I have a button on an MFC dialog. How can I make the text bold? ...

How to send files b/w two machines through socket programming?

Hi, I have requirement to send all the files in the directory to a different machines, the directory may internally contain child directories. Is there any help available on this? One more doubt is: I also heard that we can send the files using FTP, if so which is the best between the two. Is there any help available for this? I nee...

Migrating from old Borland C++ to Visual C++ Express

At the risk of appearing a dinosaur, I have some old C++ code, compiled with Borland C++, which sets registers, and interfaces to an Assembler module, which I would like to modernize. I have just installed MS VC++ Express, and needless to say a lot of things don't work! The default seems to be Win32, which is fine, so I have blanked out...

What is the method for optimizing individual functions in a file in GCC 4.1.1?

Various C / C++ compilers have #pragmas to control optimization. For example: CodeWarrior #pragma optimization_level 0 void func_no_opt() { // Some Work - not optimized } #pragma optimization_level 3 void func_full_opt() { // Some Work - optimized } MSVC #pragma optimize("g", off) void func_no_opt() { // Some Work - no...

Problems with Static Initialization

I'm having some weird issues with static initalization. I'm using a code generator to generate structs and serialization code for a message passing system I wrote. In order to have a way of easily allocating a message based on it's message id I have my code generator ouput something similar to the following for each message type: Messag...

Visual Studio 6.0 to Visual Studio 2008

When version VC++ 6.0 application is converted to VC++ 2008, there are LINK2001 / LNK2019 linkage errors. But the same code compiled and linked and runs without any problem in VC++ 6.0 How can I resolve this? ...

Use NMAKE to make all source in a directory?

Using nmake, is it possible to have the makefile build all the .cpp files in the current directory automatically, without having to specify them individually? So, instead of something like: O = $(OBJ_DIR)/main.obj {$(SOURCE_DIR)}.cpp{$(OBJ_DIR)}.obj: ---COMPILE $< HERE--- I'd like to avoid having to specify each obj to make. Can...

What might prevent a DLL from loading with LoadLibrary?

I have a JD Edwards business function, which is written in Microsoft Visual C++ as a C module. I'm using LoadLibrary to access a third party DLL. In a standalone test program, the code runs just fine. When I run it from within JDE, LoadLibrary returns NULL and GetLastError returns 126, which means The specified module could not be found ...

Unresolved external symbol link error

i have a project where i need mouse hooks to be used, so i have added a MOUSE HOOK DLL project to my solution...on rebuild..i am getting the follwoing errors Error 3 error LNK2005: "struct HHOOK__ * MyHook" (?MyHook@@3PAUHHOOK__@@A) already defined in projdialog.obj projdialogDlg.obj Error 4 error LNK2005: "struct HINSTA...

How do I get my ATL COM DLL IE plugin to work in Mozilla?

I have COM DLL(ATL Project) which handles the download dialog in IExplorer. I want that same DLL to work in Mozilla. What do I have to do for this? Is it possible? ...

Pixel manipulation in Bitmap image using MFC

hi i created a dialogbox using MFC dialog.. using below url i displayed a bitmap picture in a dialog box. http://www.functionx.com/visualc/applications/displaybitmap.htm i have not write any code for that.i just added the bitmap Picture into import picture dialog box and used picture control and followed the tutorial... when i run my ...

Which one to use c++ stl container or the MFC container?

For every stl container there is a MFC container available in visual c++.Which is better than the other one in what sense and what do you use? I always use STL container is that wrong? ...