Answer Questions
Larry N OnTimer() not being fired up.
hey guys, i have timer set like follows: UINT TimerVal; TimerVal = SetTimer(406, 50, NULL); and i added in header file: afx_msg void OnTimer(UINT nIDEvent); and in cpp file i have: void CEditorDlg::OnTimer(UINT nIDEvent) { char finalFps[100]; strcpy(finalFps, NConvert::IntToChar( _entityEngine->getFPS() )); m_lblFPS.SetWindowText( _T( finalFps ) ); CDialog::OnTimer(nIDEvent); } and : ON_WM_TIMER(). so when i put a break point int he ...Show All
John R. Durant - MSFT need to create a .exe using vc++ without runtime files ?
Hello All I need to create an application Suppose if I use VC++ do I need to include any big runtime files Say for example the Dot net runtime Suppose If I use Visual C++ Express Edition to create application do I need to include Runtime files like the Dot net runtime Thanks Steven No if you native (not managed code) and use the static CRT version. When you did File -> New -> Project, you we ...Show All
GWILSON1981 friend class question
Hi I was working on a project that required a linked list for a class. I thought that adding another variable to the node class would be helpful during the project to keep track of something but the way I have implemented it seems to not be working. I was under the impression that friend classes can see the private data of the class it is friends with. My linked list class even displays this working with the data variable (show ...Show All
Ruepen build won't generate an 'exe' file for my simple console app (non-CLR)
In the Visual Studio 2003 days, I could generate a simple console application and build a .exe file. For some reason in VS 2005, I can't seem to generate an exe. Instead, I get manifest files. Can you tell me how to get the exe to be created I build without errors, there is just no exe generated. -su Here's the build log. Thanks! Yes, I'm sure I don't have the exe on my machine. -su Build Log Build started: P ...Show All
MikeZ visual C++ tutorials?
Does anyone on these forums know a decent site for visual C++ tutorials. I personally hate the ones on the microsoft site so please can you help me =) The problem with buying one of these books is that im only 14 so it'll be pretty hard to get them. Thanks for trying to help though. Its much appreciated =) I ...Show All
azfar dllexport and function templates specializations
Let's say I have the following template function: Template <typename T> void Fun(T t); I'd like to be able to implement some specializations of Fun in a first DLL (DLL_1), some other specializations in a second (DLL_2), and still some other in a third (DLL_3), but DLL_2 and DLL_3 may make use of specializations implemented in DLL_1. So in DLL_2, Fun<T> may be both imported and exported, depending on T. I somehow managed ...Show All
Preston Park Unlinking the CRT...
Here's a fun question: how do I get the CRT out of a project, utterly and completely The project in question is a mixed-mode C++ DLL. /NODEFAULTLIB leaves me with dozens of link errors to CRT functions that I'm not calling from my code so I'm assuming the compiler is sneaking stuff in on my behalf (how very kind of it). What functions do I need to implement on my own and how do I do that Some of the more obvious ones like atexit I've already ta ...Show All
AnaC Managed C++/CLI wrapper returning COM interface?
I have a Managed C++/CLI clas that contains unmanaged initialization code that ends up with an unmanaged COM interface pointer. I would like to return this pointer back to the 'managed world' as a reference. I have a COM interop dll that defines this interface (generated with tlbimp.exe) but of course the type of the pointer that the unmanaged code has comes from the .h file that midl.exe generated based on the IDL file. What would be the mos ...Show All
_Donnie-Darko_ C2664 cannot convert from 'System::String ^' to '_bstr_t'
This may seem silly, but how do you convert from a managed System::String to BSTR or _bstr_t or ANY other string (const char *, etc.). This would be required to call an old COM interface from a managed C++ app. If this has already been answered I apologize. I searched but did not find anything. Helper functions have been known to help. Helper functions and constr ...Show All
John Cutsinger error C3861: 'exit': identifier not found
Hi, I'm trying to build an old code (main.cpp) where I'm using SDL. This is my first time using Visual Studio 2005 . I have included the following: #include <SDL/SDL.h> #include <stdio.h> #include <stdlib.h> int main( int argc, char *argv[]) { if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) //SDL_Init will return -1 if it could not initialize { printf( "Unable to in ...Show All
Robert Is the /GS switch working as expected in Beta 2?
Something appears a little broken in VS 2005 Beta 2. The code below will produce the expected buffer overrun dialog box when compiled retail in VS 2003 but does not in VS 2005 unless I set optimization to /Od. void causeAnOverrun( _TCHAR *badName ) { _TCHAR myNameBuffer[5] = {0}; _tcscpy( myNameBuffer, badName ); } int _tmain( int argc, _TCHAR* argv[]) { _TCHAR *name = _T("Long Name"); causeAnOverrun( name ); _tprintf( _T("I got ...Show All
ovmidori use mannaged classes as a friend
Hello everyone how can i correct this code segment public __gc class a { } ; public __gc class b { . . friend class a ; //Error } ; Doooh. Thanks for the correction I really forgot it. Thanks for your reply and your time But I need to decl ...Show All
Andrew174 online download
I'm using VS 2003 Pro so I think the code should be just about the same as 2005. You guys dont have a forum for older versions! Now in my program I want my users to be able to type in a url of a picture and have the program download it and put it in there 'My Pictures' folder. I don't know if there is a control needed or if I add a reference or if it just code. But I know it can't be to hard. Take a lo ...Show All
Lynn33 Can't link with _SAMPLE_.DLL (CRT) VS2005Pro
I recompile CRT and try link my program with recompiled version of CRT, but got errors on link. I configure project to not use default libraries and for debug version put _SAMPLED_.LIB and _SAMPLE_.LIB for release. I can compile simple programs with this version of CRT, but when I try compile big project, I got errors on linking. Functions stricmp, strdup, _fileno... exported from _SAMPLE(D)_.DLL(LIB) but linker can't find them. What ...Show All
SJINDAL is it possible that a cpp file will "recognize" a c file from another project ?
Hi everyone, I have a console application project which I wrote in c , this project uses the lame encoder written in C. Now my Boss has asked me to rewrite this project in c++, unfortunattelly after I turned each c file into cpp file , I got linkage errors since apparently the c++compiler of visual studio 6.0 doesn't recognize the c code of the lame project. any idea anyone what I should do next regards, Uri ...Show All
