Answer Questions
Rush hour CDHtmlDialog and Drag and Drop
I am using a HTML dialog based application. Everything works perfectly but when anyone drops a file on it or even html page or shortcuts it works as browser. I have put in OnInitDialog the following CDHtmlDialog::m_pBrowserApp->put_RegisterAsBrowser(FALSE); CDHtmlDialog::SetHostFlags(DOCHOSTUIFLAG_DIALOG | DOCHOSTUIFLAG_SCROLL_NO | DOCHOSTUIFLAG_NO3DBORDER ); CDHtmlDialog::m_pBrowserApp->put_RegisterAsDropTarget(FALSE); but it does not help. Any possible idea's how to disable drag and drop... In our experiments, the following line, added before OnInitDialog returns, disables the drag-and-drop operations: m_pBrowserApp->put_RegisterAsDropTarget(VARIANT_FALSE); It is ...Show All
#pragma lnk2019 with PathAppend and PathCombine
I hate to ask another "LNK2019" question, but this one has me stumped. As you may expect from the subject, I'm getting an LNK2019 error with PathAppend and PathCombine. Here is the error output (I removed the parameters from the function calls because they are extremely long and, I suspect, useless information): 1>WindowsMounter.obj : error LNK2019: unresolved external symbol __imp__PathCombineA@12 referenced in function "public: virtual void __thiscall uruz::WindowsMounter::run(...) 1>WindowsMounter.obj : error LNK2019: unresolved external symbol __imp__PathAppendA@8 referenced in function "public: virtual void __thiscall uruz::WindowsMounter::run(...) 1>C:\Uruz\UruzEngine\Test\Utility.exe : ...Show All
pnp place for code
maybe this is a stupid question, but I have started microsoft visual C++ today (c++ itself also for the first time) and i dont know where to put the code. i'm making the program hello world, but it doesnt work it asks if i want to 'build' the programm and i dont know what it means. i named the program hello and i put the code in the place where it says: hello.cpp is this the right place if so, what am i doing wrong this is the code: // hello.cpp : Defines the entry point for the console application. // #include "stdafx.h" int _tmain( int argc, _TCHAR* argv[]) { return 0; } #include <iostream.h> int main() { cout << "Hello World!\n" ; return 0; } ...Show All
vande013 error LNK2001
Hi, (I saw the post on same subject but it seems to be a little different. so I'll use some word from that post!) There is a project earlier written in VC++ 6.0. I opened the same project in VS. NET 2005 and I am trying to compile. The code compiles properly (with couple of warnings) but while linking I am getting unresolved external symbol errors like this: The linker seems to have problem with seeing .obj from files in program (which are in the debug directory). It doesn't seem that the /Zl switch or the /NODEFAULTLIB are on. 1>Linking... 1>Utm.obj : error LNK2001: unresolved external symbol _RTC_Shutdown 1>Zone.obj : error LNK2001: unresolved external symbol _RTC_Shutdown 1>Zones.obj ...Show All
SparkyW How can I send commands to a particular PS2 Mouse?
(NB I have also posted this to the Gamers forum at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1052249&SiteID=1 Please, to reply: follow this link and reply on that forum. This way all replies will be on the same thread. I don't know which forum is best - there is no obvious choice I can see... Sam) I am building a project which involves connecting many TrackPoints into the computer and collecting pressure data from each. How can I send commands to a particular TrackPoint, and listen for the response A TrackPoint sits on a little circuit board two centimetres by three centimetres. this can be wired in to a PS2 Port. I have three TrackPoints; each goes through a PS2->USB converter into a USB h ...Show All
Alex2200 Linking issues
I have a MFC Dll. The issue seems to be precompiled headers. When I compile the project using the option "Create Precompiled Header," it works fine. However, when I later select "Use Precompiler Header," it doesn't link properly. I simply get a... error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" ( _AfxInitManaged@@YAHXZ) Using Visual Studio 2005 Professional. What seems to be the problem :| I never knew it was possible to do so. I did so, but I recieve another error that is unfamiliar to me: fatal error C1854: cannot overwrite information formed during creation of the precompiled header in object file: 'd:\w00t\visual studio 2005\projects\quickl ...Show All
Alastair Q Help Me Please
Hi im learnig VC++ 2005 and something wierd is goin on with my compiler.. when ever i build and run my projects an error pops up saying "This Application Has failed to start because MSVCP80D.dll was not found. Re-installing the Application may fix the problem." but here is the wierd part the file MSVCP80D.dll is present in my C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c folder i can see it but how come VS is not detecting it and i even tried re-installing the software but it doesn't seem to work can someone please help me!!! Thanks when i make a new CLR Application it runs perfectly fine but when i create a new Console Application or a new MFC Applica ...Show All
jetsetwilly Confused about Return Value Optimization
Hi everyone, The return value optimization (RVO) eliminates temporaries for functions return by value. Scott Meyers wrote about utilizing RVO in "More effective C++" and Ayman B. Shoukry wrote an article about named return value optimization (NRVO) in this article: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnvs05/html/nrvo_cpp05.asp Those articles left me wondering: in what cases is trying to utilize the RVO beneficial Is there something I have to do as a programmer to help the compiler to utilize the RVO the best way that it can Both articles suggest that I should. I've tried to put this into practise. VS 2005 does a very good job optimizing and I think if you read mr Shoukry's article, ther ...Show All
ThePope78705 Truncated?? command line arguments
It is 10 years or more since I did any programming and there seems to have been a severe reduction of brain cells since then. I have been trying to pass command line arguments to a simple console application but I only seem to get the first letter of each string . I am probably doing something obvious and idiotic but I have been trying to find the problem for a couple of days and its driving me crazy. Can anyone help Thanks. That was the problem. I was being passed 2 byte characters with high order zeros which my obsolete code saw as one character strings. Fixed (more accurately avoided) by removing Unicode character setting in Project Properties. The world is more complicated every time I look. ...Show All
av_ster How do you set the name of a thread in C++?
This is something that I've been able to do in linux development, but I have not figureed it out in Visual C++. I've noticed that the thread list contains names, however they are always the same and I cannot seem to find the way to name them. This is not an MFC application. Currently, I'm using _beginthreadex to create the thread. If you've got sufficient access to the other thread, which you should have after spawning it with CreateThread, I don't know why it could fail. You're absolutely certain that the ID is correct As an alternative you could construct a mechanism for the thread to set its own name after being created, that should work in any case. That looks promissing... I can use it to set the name of the caller thread ...Show All
JohnWiel IntelliSense out of sync - how to fix?
I changed the definition of a class and its name, but no matter what I do (including deletion of all intermediate files/folders), IntelliSense's dropdown list just won't update on this. It always displays the class's old name and old methods, which were changed days ago. This is a VC++ 2005 ATL project. When I point to the class variable type and click on "Go to Definition" in the mouse's popup menu, VS2005 either says "the symbol is not defined" if I use the new class name, or jumps to the place which I guess is where the old class was defined. Any idea how to fix it Thanks, Henry Ah, my fault! I forgot the solution-level cache files. This instantly fixed the problem, which had haunted me for over a we ...Show All
saerbawejim 'out' value-type parameters and managed/unmanaged references
WOW the area of tracking references is confusing. I have a large unmanaged COM server (C++) to which I'm adding managed interfaces. Many of my methods provide output-only value results. For example, my Image class has a method that in C or COM you would declare as PixelRange(double* pMin, double* pMax), and in C++ you would declare as PixelRange(double& min, double& max) and in C# you would have PixelRange(out double min, out double max). It seems that I must declare this interface in managed C++ as PixelRange([Runtime::InteropServices::Out] Double% min, [RuntimeInteropServices::Out] Double% max). My problem is that for each such parameter I have to create an unmanaged variable to pass to the internal function, and I have to ...Show All
tiy3 is there any lib or API for select text any where in windows ?
hi i want select text by mouse any where in windows ( desktop ,icon, menu, ...) is any lib or API in Windows You might want to have a look at the Control Spy articles from MSJ: http://www.microsoft.com/msj/0798/controlspy.aspx http://www.microsoft.com/msj/0998/control/control.aspx http://www.microsoft.com/msj/1298/controlspy3/controlspy3.aspx ...Show All
dechainelafureurnico Book Recommend.
Can anyone tell me if these books are VERY good(descriptive & understanding & lots of stuff) 1) The C Programming Language by Brian Kernighan & Dennis Ritchie. 2) Software Engineering by Ian Sommerville. I am a C programmer of low-moderate(hardly the second term!lol) level and I want to get a level higher. I know that opinions in books are subjective however experienced programmers will sure have an idea if they helped them... Thank u so much about the link!!!It really gave me a deep insight.I will also consider the options of the books u suggested me.Thanx again! The C Programming Language is a classic, so for C I'd say that's a good place to start. I would also suggest you to get a good C++ reference, to not ...Show All
Klaus Pr&#252;ckl Passing a value from one class to another class
I am have a sample Thread on a Windows Form Project. I have a button that Starts a Thread and does a simple loop. The loop is in located in a header file but i want it to update a a progressbar in form1. I understand i would need a delegate in form1 to update the progressbar but calling that delegate in form1 is what i am having problems with. Below is the entire Header. #pragma once #include "Form1.h" namespace NamespaceThread { using namespace System; ref class ThreadClass { public: static void MyThread(); }; void ThreadClass::MyThread() { for (int i = 0; i <= 100; i++) { //Delegate needs to be called to update progressBar1->Value } } } in form1.h i have a delegate like below delegate void ProgressSte ...Show All
