Answer Questions
Petchey VS8 resource can't open include
I am using VS version 8.0.50727.42 (RTM.050727-4200). I converted a VS 2003 project, and I am trying to compile. The project depends on WTL7.1, which I downloaded and set the project compilation paths to point to the appropriate WTL include directory. During compilation I get to a "pddm.rc" file that references a WTL file, like this: #include <atlres.h> When the compiler hits that line, it says: Error 1 fatal error RC1015: cannot open include file 'atlres.h'. However, my project paths are set correctly - and other header files from the same location as atlres.h are found just fine. This problem seems to be unique to an include being processed from within a resource file . Indeed, I've found someone else o ...Show All
hhewson problem while accessing odbc data
Hi while compiling the following code i get some linking problem. #include <windows.h> #include <sqlext.h> #include <stdio.h> #ifdef SQLConnect #undef SQLConnect #endif #ifdef SQLPrepare #undef SQLPrepare #endif int main(void) { HENV hEnv = NULL; HDBC hDBC = NULL; HSTMT hStmt = NULL; UCHAR szDSN[SQL_MAX_DSN_LENGTH] = "finport"; UCHAR* szUID = NULL; UCHAR* szPasswd = NULL; UCHAR szModel[128]; SDWORD cbModel; UCHAR ...Show All
fusg C++/CLI finalizer chaining in a class hierarchy
Is the finalizer ( ! ) in a C++/CLI derived ref class automatically chained to call the finalizer of its base class or do I have to manually implement this in my derived ref class The documentation in the "Destructors and Finalizers in Visual C++" topic is confusing about this. Also if the finalizer is protected rather than public will it still be called originally by the GC ref class Base { public: !Base() { /* Release unmanaged resources */ } }; ref class Derived : public Base { public: !Derived() { /* Release unmanaged resources */ // Does !Base(); have to be manually called } }; Peter Ritchie wrote: From Destructors and Finalizers in C++ : Unlike Visual C+ ...Show All
jturpin Pls Help. Urgent!!
Hi Everyone, Currently I having a problem on pass vb string into c dll. I sucessfully pass the string to the c dll and return the whole string with the codes below: c code to create dll char *ccDecrypt( char *str, char *ostr ){ return str ; } vb code Private Declare Function ccDecrypt _ Lib "C:\Documents and Settings\fpca\Desktop\dll\TestDLL\Release\TestDLL.dll" _ (ByRef str As String, _ ByRef ostr As String) As String Private Sub Command1_Click() Dim deCard As String txtDe.Text = ccDecrypt(txtEn.Text, deCard) End Sub But when i change the str in the c code to str[0], it throw me error... can anyone suggest how to solve this problem Hi, ...Show All
project2n5e0o1 Using AFX_MANAGE_STATE
I've a MFC extension DLL. My question is that when all i need to call AFX_MANAGE_STATE( AfxGetStaticModuleState()); I suppose, it needed to be called while Creating (initializing) the resources. e.g Functions which creates Dialog, Icon, Bitmap (or whatsoever in the DLL resource file) The KB Article says that we only need to call this inside the callbacks and windows procedures instead of putting in all exported functions Currently I put the manage state code in the functions which deals with resources. Am I correct or not Do I need to limit the usage of managing state to the resource creation(initialization) process Could you please put some light on this Brian, Thanks for the reply. I think the error will be spawned ev ...Show All
Rahul Singla Problem in linking the VC++ library with Borland C++
Hi, I am using the "Borland C++ Builder6" as the development platform. Recently, I got a (static) library from my partner which was built using VC++ version 6. I had problem to link the (static) library with my source. I got the error message that a function call is missing but it should be included in the (static) library from my partner. Anyone has any idea what I should do in order to link the (static) library Thanks for your help in advance. violetsnowman wrote: I am using the "Borland C++ Builder6" as the development platform. Recently, I got a (static) library from my partner which was built using VC++ version 6. If it isn't a COM dl ...Show All
Leung Hide console window
Hi, in my console application i want to exit the console and switch to a windows form. opening te form works fine, but the console window is disturbing at this time. how can i hide the console window or do i have to create a windows forms project instead thanks in advance! longwood12345 wrote: Is it possible to make it so that the console windows is never created in the first place Don't spawn a console process. That's controlled by the SubSystem setting in the configuration properties > linker > system section of the project properties. If you want an external process to not have a console window, CreateProcess has flags to control this. Look it up on MSDN. einaros wrote ...Show All
Scotty12105 move to VC++ 7.0 compiler problems
Hello! compiling Net2( http://www.gameprogrammer.com/net2/net2-1.html ) using Visual Studio 7.0 generates error: net2sets.c(61): error C2054: expected '(' to follow 'IP' code which produces the error: SETCODE(, IP, IPaddress, 10, ipEqual(a, b)); SETCODE is defined in set.h (sorry for posting the whole file contents, but I cannot pull out of it important part ): #define SETTYPE(NAME, TYPE) \ typedef struct \ { \ int itr; \ int last; \ int size; \ TYPE *set; \ } NAME##Set; #define SETFORWARD(MODIFIER, NAME, TYPE) \ \ MODIFIER int init##NAME##Set(NAME##Set *s, int size); \ MODIFIER void finit##NAME##Set(NAME##Set *s); \ MODIFIER int member##NAME##Set(NAME##Set *s, TYPE *v); \ MODIFIER TYPE *item##NAME##Set(NAME##Set ...Show All
Jim_Fort_Worth floating point error trouble
Hi, I have this really annoying problem with float data type where I get a precision error when I try to do this : float num = 0.0f; for(int i=0; i<100; ++i) { cout << num <<"\n"; num += 0.01f; } In my computer everything works fine until the 83th iteration where num should changes from 0.83 to 0.84 but instead I get 0.8399999999. Any idea how I should handle this In my real program, num is a variable from a library so changing its type to double is not an option As explained in this FAQ , IEEE 754 cannot represent accuratly decimals such as 0.1, because they are not an exact sum of inversed powers of 2. Please read the FAQ. Thank you ...Show All
maverick_majnoo executing a member function in a separate thread
hello everybody !! my new problem is that i have a class that contain a some functions and some variables i want to execute one of these functions in a separate thread using AfxBeginThread(...); and FYI this function uses some member variables of the class to do it's work any idea thnx 4 ur time and concern a.hemdan Hi, I'm new to this forum but I hope it's not a mistake to post here, being a related question. I'm kind of new to C# so please be patient with me :) I'm tring to save my path (gps coordinates from my asus a636) to a kml file as part of a bigger project. I managed to save my present location but now I want to save a set of coordinates. I have 2 buttons for this task: startRecord - should start t ...Show All
tmiller3 Cannot see the version information in the properties of an EXE.
I am building a C++ project that creates an executable. When I right click and see the properties of that executable, there is no version tab that will give me the version information of that exe. Can you please tell me what I can do so that I can see the version information of my exe. I would like to put the company information, copyright and file versions in that exe. I know you would do that in C# with AssemblyInfo.cs but I am sure about C++. Please help me out. thanks Thanks it worked. You need to insert a VERSIONINFO resource into the RC file that is part of your EXE. with the resource editor you can easily do this (right click on the RC file in the resource editor and choose "add resource" then choose "vers ...Show All
barkingdog change letter in an array
How do you change an letter in an array for example string[10] = hello; how do you change 'h' in array to a 'b' Some optimization :) you can directly write as str[0] ='a'; found answer you use char str[10]; char letter='a'; str[0] = letter; ...Show All
Brandon Tucker This code snippet makes no sense...
I've come across some code syntax I've never seen. It compiled, but I don't know how, or what it even does! I've been reading a book about DirectX, and in one of the examples, this little piece of code was present: D3DXMATRIX *D3DXMatrixIdentity(D3DXMATRIX *pout); "D3DXMATRIX" is a type, of course. And "D3DXMatrixIdentity" is a function, of course. Now I don't see how this works. Okay, to break it down, first we have a type, which is D3DXMATRIX, then we have the indirection-operator (which I assume is a pointer), and then we have a function (perhaps a call) with a new D3DXMATRIX (pointer) as it's only parameter. How the heck does this work It isn't just a regular function-call. It isn't a function-call that' ...Show All
Gavin Lilley C1083 Permission denied
Hi, I'm getting this C1083 Permission denied error when I try to build an application (console type) project A which includes files from another project B (static library type). The B project includes files from a math library C (GSL). When I build the static library B, I have no problems. The problem is when I try to build A, and it complains about having permission denied to access a folder which turns to be the folder containing the .h files of C (included by B). I hope this is clear enough, if not please tell me. I'm using XP Home Edition and files have no permissions at all. Here is the text: 1>c1xx : fatal error C1083: Cannot open source file: 'C:\Documents and Settings\Alix\My Documents\genetic context\GSL\include' ...Show All
pessi CDHTMLDilaog and Internet Explorer 7
I have an MFC application that uses CDHTMLDialog to display HTML, but when IE7 is installed on the machine, the images specified in the html page are not being displayed at all For example: <html> <style> body { background-image: url(file:bg.png); background-position: center; background-repeat: no-repeat; } </style> <BODY> This is an image: <img src="file:myimage.png"> </BODY> </HTML> This works fine on previous versions of IE but under IE 7 the images aren't displayed.. Can anybody help thanks, Ronan Maybe instead of " file: " it should be " file:// " I hope this helps. ...Show All
