Answer Questions
George Abraham yet another dwmapi.dll/IE7 issue
There have been several threads concerning dwmapi.dll and IE7. Here's another one: I've created an MFC DLL that is being accessed by a Ruby script, something like: MyFunction = Win32API.new(mydll,"MyFunction",["P"],"V") On an IE7-installed machine, the Ruby script hangs (or, with the debug version of the DLL, the DLL fails to load). Running depends on the DLL indicates dwmapi.dll is missing. Earlier versions of my DLL which also had this delayed dependency didn't cause the Ruby script to hang, but when I added functionality to the DLL (functionality that must eventually depend on dwmapi.dll), the Ruby script started to hang. As with other threads related to this issue, uninstalling IE7 fixes the problem sinc ...Show All
Espresso74 about Visual Studio mobile development simulator
Hello everyone, I am wondering whether the generated binary code on Visual Studio integrated mobile simulator is the same as that of real device (for example, real HP ARM iPAD) Is the answer to the question (binary code on simulator is the same as that of read device) the same to all Microsoft mobile development IDE -- embedded VC 3/4 and Visual Studio 2005 thanks in advance, George yes it is... whether it is HP ARM or iMate ARM based. just the platform must be the same (CPU architecture) Thank you saju, saju wrote: yes it is... whether it is HP ARM or iMate ARM based. just the platform must be the same (CPU architecture) I am a littl ...Show All
dbeau first steps
Hi Im just starting out to learn VC++, I have previous expericience of c, Java and SmallTalk. I have the VC++ 2005 compiler and the book 'MicrosoftR Visual C++R .NET Step by Step--Version 2003, the first exercise is 'Hello World' to give you the idea...which compiles and runs ok, My question is will I run into lots of problems working through this book...or maybe translating the code will aid my learning I realise its not the best way to start off, but my budget wont stretch to buying another book, Some feedback would be appreciated That thread doesnt seem to mention any books regarding VC++ 2005, and the last post is about 10 month old I bought 'Enterprise Application Development with V ...Show All
root85 associated file icons in vc .net
for the past 3 days i am struggling to get the list of file icons in a listview in VC.Net Most of the examples on the net are in c# or vb .net I want to display the file associated icons in a list view using vc.net hImageList = SHGetFileInfo(ffd.cFileName, 0, &shfi, sizeof(SHFILEINFO), SHGFI_SMALLICON | SHGFI_SYSICONINDEX); MyIcon = ImageList_GetIcon(hImageList, shfi.iIcon, ILD_NORMAL); System::Drawing::Icon *myIcon = System::Drawing::Icon::FromHandle(shinfo::hIcon); imageList1::Images->Add(myIcon); listview->SubItems->Add((filelist ->CreationTime).ToString()); listview->SubItems->Add((filelist ->LastWriteTime).ToString()); listViewFolders->Items->Add(listview); ...Show All
Daikoku Unmanaged C++ and VS2005: Hidden .NET Requirements?
Hi everyone. While developing some unmanaged C++ DLL that uses COM and ATL, I've been having issues with deploying the DLL to other machines - those without .NET Framework v2. I've found out after some digging that changing the runtime library from its default to one of the debug libraries (and none of the DLL ones) removed this dependency, but introduced some crashes that im not entirely sure are related to my own application's logic. What is the proper way of creating unmanaged c++ DLLs in VC++2005, Who use ATL and COM Thanks in advance. And if you decide to create your DLL with the static linkable CRT version you can ship your CRT without other dependencies. .NET Framework is not required.  ...Show All
Emz21 C2555 error in VS C++
I received error C2555 when trying to compile my VS 2005 C++ code. I found the following reference and it said under STATUS it has been fixed in Visual C++ .NET version. http://support.microsoft.com/kb/240862/ Should I not be getting this error anymore or am I missing something I am running Microsoft Visual Studio 2005 Version 8.0.50727.42, .Net 2.0.50727, Visual C++ 2005. Thank you both for the help. I have seen code snippet where the template argument OptionType of the base template does not even have to be specified when declaring the derived template, like below. Is this just a compiler-dependent thing or something else template <class OptionType> class OptionFactoryTemplat ...Show All
vgt918cs WSAStringToAddress rejecting some IPs
Hi, this is my first time to post here, I hope I am doing so in the correct forum. In a current project I am parsing some IPs and WSAStringToAddress is rejecting what appear to be valid IPs while accepting others. Here is some sample code but I have tried a lot of other small tweaks hoping to coax it into not giving me an error. string ipaddr = "004.002.145.096"; const char* src = ipaddr.c_str(); sockaddr address; int address_length = sizeof(sockaddr); memset(&address, 0, address_length); reinterpret_cast<sockaddr_in*>(&address)->sin_family = AF_INET; &nb ...Show All
fiddlesticks I Want to simulate the button clicks on a desktop icon.But I can't get the right position of cursor.HELP!!!
My code is: #include "Windows.h" void main() { POINT pos; GetCursorPos(&pos); SendMessage(HWND_BROADCAST, WM_RBUTTONDOWN, pos.x,pos.y); SendMessage( HWND_BROADCAST, WM_RBUTTONUP, pos.x,pos.y ); } Hi, The wParam passed to SendMessage is wrong. The co-ordinates are specified in lParam The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area. The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area. Regards Sudeesh. Do you know what to write instead of HWND_B ...Show All
QianChen creating C files
hi..how can i create C files in VC++ 2005 express edition. . thansk moreover how do i debug and run the program It seems to me that you did not create a project. You must create a project before adding files, compiling, running and debugging. Go to File/New/New Project and from Visual C++ pick something like Win32 Console Application. A wizard will show up, leave all the setting as they are and just press finish. The wizard generates a file that contains the main function. It's a cpp file but you can rename it to have a c extension if you wish. You can start the project in the debugger from the Debug menu, Start Debugging (or F5 key). ...Show All
nil130180 winnt.h(222): Error C2146 ...
All, line 222 in winnt.h reads like this: typedef void * POINTER_64 PVOID64; and creates the error message Error C2146: syntax error: missing ';' before identifier PVOID64. I am trying to throw VC++ 2005 Express on Windows 2000 Pro SP4 at a modifed version of the amcap sample program of DirectShow. This is the version I have downloaded with DirectX 9.0b on 11 Oct. 2004 and have successfully used with VC++ 6 SP5 on the same program. (The DXSDK involved is (one of) the last issue of DirectX that included DirectShow.) I have the platform SDK downloaded, and putting its include directory before or after the baseclasses and DXSDK include directories does not change a ...Show All
SnakeSV time_t to displayable format?
Hi How do I cast time_t into a format that I can print out I want to store the value of a time_t into the registry, but I was given the error unable to cast the type into LPCSTR. I tried to wrap it in a CString and got the same error. I also tried to cast it by using (LPCSTR) (tTime) but it failed too. Likewise, I have a DWORD which contains a number but I was unable to cast them to either a std::string or CString to print it out. What should I do Will using reinteprete_cast<> work Once you are using MFC, you can avoid all that rope dancing by searching for time_t_to_human_radable_string_CRTs or cool_STL_stuff_that_can_do_everything . Well, let's say we have a time_t value. Both MFC classes CTime and COleDateTime have ...Show All
Erik Pedersen Trouble with TreeView Label Editing
Hi, I'm Dan. I'm fairly new to Win32 programming but have been doing it for several months now (independant, no classes/books/etc) and am starting to grasp it. I have been trying to, as a learning experience, create a game design program that would allow for easy PC game creation with little coding experience (similar to GameMaker if any are familiar). Anyway, I am currently trying to implement a TreeView to display resources that the game designer adds into the project (sprites, objects, etc). Before I begin delving into more critical details of the program, I am trying to first establish the overall environment. I have recently allowed the user to add resources (though they do nothing so far) and have put in context menus for the resourc ...Show All
Grant McElroy static const member variable initialization
Hi, I want to initialize a member variable of a class by calling RegisterWindowMessage and i want to keep this variable as static so that this variable is initialized only once during the execution of the program. When i declare the variable as static, i am getting an error which says that only const static variables can be initialized within a class. When i make the variable as static const, i get the following error - Error 11 error C2057: expected constant expression I think this is because the value i am assigning to the variable is the value which the function RegisterWindowMessage will return and this will not be a const value. Could anyone please suggest a way out of this. Thanks in Anticipation, With regards, ...Show All
MingMa How to Reduce Memory Leaks in DotNet
Hi all, Can anyone plz suggest me how to reduce the memory leaks in dotnet What all steps can i take while coding for this If you are using visual c++, you might try this. http://www.codeproject.com/tools/visualleakdetector.asp or some other memory leak detector. In pure .NET application memory leaks are impossible. If you allocate your own unmanaged resources, you need to release them. Every class which allocates unmanaged resource, must have destructor and finalizer, and release unmanaged resources there. What memory leaks do you have Please describe your problem with more details. ...Show All
R Raghu Calculating the angle of an arc in a cartesien grid
I have a problem where I need to calculate the angle of an arc where I know the start Point, end Point, center point and direction. The arc is on a cartesien grid, so the points are defined as X, Y. The are can start/ stop in any of the four quadrants. The angle needs to be expressed in degrees. Can anyone help Thanks; Hi, Following code'll help u out. #include <Math.h> #include <iostream> using namespace std; int _tmain( int argc, _TCHAR* argv[]) { double sx,sy,cx,cy,ex,ey; double Slope1,Slope2,Deg1,Deg2,ArcAngle; //Initialize the values here //sx,sy - starting point x,y //cx,cy - center point x,y //ex,ey - end point x,y //I ...Show All
