|
I did as you said. A clw file got built. I reloaded the project. It still doesnt want to load any class info!! Inciedntally this is the project that was crashing intermittently while exiting with the right cross system menu (dont know why yet - waiting for an answer to my thread on how to debug an empty WM_SYSCOMMAND handler!!). MAybe theres a connection?
Anyways the classes stubbornly wont load in the Class View pane....
|
|
|
|
|
ns wrote:
Inciedntally this is the project that was crashing intermittently while exiting with the right cross system menu (dont know why yet - waiting for an answer to my thread on how to debug an empty WM_SYSCOMMAND handler!!)
Close MsDEv and then try running the task manager. You probably have an instance of MSDEV.EXE running. End that process and start MsDev again and load the project..
--------------------------------------------------
|
|
|
|
|
The CLW file is rebuilt when you envoke ClassWizard. Just do a Ctrl+W and it should be rebuilt.
Roger Allen
Sonork 100.10016
He dodges, he weaves, and he never gets enough sleep. He is kind to small animals. - Chris maunder.
You can tell from his picture he doesn't sleep, and what kind of things does he weave?
|
|
|
|
|
The .clw file has nothing to do with the ClassView. You may have a corrupt .ncb file. Try deleting the .ncb file before you start VC++.
|
|
|
|
|
Remove the "Read Only" attribute from the .ncb file.
Did you put that file into source safe? It is not a good idea. When putting the files of a project into VSS, do it via VC++. If this is not the case, I apologize.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I was wondering how one goes about debugging windows services? Any pointers to tutorials would be greatly appreciated.
|
|
|
|
|
For a start, check KB article Q98890.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
The biggest problem with a service is, that you can not launch it from inside VStudio debugger because it has to be launched by the SCM. However, it is still possible to debug it:
If the service already has been started, you can connect a debugger via the task manager (right click on the process name and choose "Debug") or from the Debug/Attach to Process menu in VStudio. You can then load the source files and set breakpoints into the source.
However, if you have to debug the service startup code the above technique does not work because the service stops running even before you had a chance to attach the debugger. In this case it is useful to put a hardcoded breakpoint into the code, e.g. at beginning of your ServiceMain(). A hardcoded breakpoint is an software interrupt 3:
#define BREAK __asm int 3
Just put the BREAK statement at an appropriate place in your code. If the service is started via SCM an "unhandled exception" message appears. Choose cancel to start the debugger and voila - execution is halted at the position of BREAK.
On thing to keep into mind, because it may be confusing: If the service runs under another user account or LocalSystem (as almost any service), the debugger (VStudio) instance is also started under this user account. Therefore it might be that your user defined settings (shortcuts, toolbars, keyboard mapping, etc.) are not available.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Hi,
I've been developing an application in eMbedded Visual C++ to run on a Handheld PC, but someone has expressed a desire to use the application on a desktop PC. Is there any quick way of transferring the code for the application across to the desktop IDE (Visual Studio I presume)?
Thanks in advance.
Graham
|
|
|
|
|
You will have to recompile it for the desktop because the processors are not the same.
|
|
|
|
|
When you say recompile it for the desktop, I take it this means I will have to Copy and Paste my code into a different IDE (Visual Studio).
Thanks,
Graham
|
|
|
|
|
Yes. Just crate a new project with VC++6 (or whatever compiler you use) and copy the files into it. You may have to make some code changes if the program uses any WinCE-specific API calls. Also, you may also have to make some minor changes to string literals, depending on how you coded them for WinCE. For example, if you did this
[code]
CString something = L"Hello World";
[/code]
instead of this
[code]
CString something = _TEXT("Hello World");
[/code]
|
|
|
|
|
Anybody, Knows where I can find information how I can export to Excel, and Powerpoint whitout using OleAutomation?????....
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hello...
Can anyone help me? I need to change my CFileDialog file type/filter on runtime in this dialog.
It will work like this: When i press a button it will change the actual type with another one and refresh the list, so it only appears the right kind of files...
I'm a newbie in this so a little of code will be helpfull.
Thanks in advance..
|
|
|
|
|
How do you move an object quickly and fluidly? For example a game character that needs to do a 20 pixels jump, does it ever move more than 1 pixel? But then you should use a high-resolution timer for quick ticks?
Vitaly Belman
|
|
|
|
|
Don't move sprites per frame coz you'll get different motion on different CPUs. The game should implement a game timer which ticks @ 20HZ and update the character per game tick. Thus if the frame-rate moves around the character will still travel the same distance.
Hi-res timing is important. Use either QueryPerfomanceCounter() or use the Intel RDTSC assembly instruction. RDTSC is better as it has low overhead but there are some tips you should follow.
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
For maximum fluidity, you should synchronize with the vertical refresh rate, which isn't easy under Windows. If your target machine has DX7 or better, you may use IDirectDraw::WaitForVerticalBlank.
If you're not using DX, then ensure that you have backbuffering and keep some steady rate with QueryPerformanceCounter or timeBeginPeriod(1).
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
The general point to regard with animation is that you should give your sprite a velocity, measured in distance/time units, NOT distance/loop iteration.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
How do I check if a file exists or not? I have tried the following:
<br />
CString f, msg;<br />
<br />
f = __argv[i];<br />
ifstream infile(f);<br />
<br />
if(!infile)<br />
{<br />
msg.Format("Could not open: %s",f);<br />
AfxMessageBox(msg);<br />
}<br />
<br />
else<br />
AfxMessageBox("file opened");
But if the file doesn't exist, it just makes one!!! Any input is appreciated. Thanks!
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Check the code below if you don't mind using Win32 API:
bool FileExists(LPCTSTR szFilename)
{
WIN32_FIND_DATA findFileData;
HANDLE hFind = FindFirstFile(szFilename, &findFileData);
if (hFind == INVALID_HANDLE_VALUE)
{
return false;
}
VERIFY(FindClose(hFind));
return true;
}
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Cool! You guys rock!!! One day I'm gonna grow up to be a knowledgable programmer just like you!
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
I usually use next approach
bool is_file_exist(const char * szFilePath)<br />
{<br />
DWORD Code=::GetFileAttributes(szFilePath);<br />
return (long(Code)!=-1) && (!((FILE_ATTRIBUTE_DIRECTORY) & Code));<br />
}
|
|
|
|
|
As you're using MFC, I use this:
CFileStatus status;
if( CFile::GetStatus( "test.dat", status ) )
{
// file exists
}
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
The problem is clear. Some solutions have already been mentioned but the easiest way to do it is
ifstream inFile("text.dat", ios::nocreate); The default value is ios::in
|
|
|
|
|
here's yet another way:
#include >io.h>
...
...
bool bFileExists = (_access(inFile, 0)==0);
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|