|
|
use " SetForegroundWindow" no effect
thank you
|
|
|
|
|
|
As i do implement my software for several platforms, i am using different IDEs / SDKs on the PC, not all of them have the STL or infact C procedures like strtok or strchr implemented.
As i do not want to reinvent all of this again, i would like to ask, if there is open / free STL source which i could include for those projects which base on let say a C++ Compiler with not relying on standard procedures (like strcpy).
I found a product called STLport. Would i be able to adapt this for my needs.
Compilers used are the VC6, VS2005 and gcc.
|
|
|
|
|
AFAIK all the compilers you mentioned provide STL support.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi i am creating a component ,
but having some linking error . I have commented this "OBJECT_ENTRY_AUTO(CLSID , uuid(***))" and my code is building , Please tell me will there any impact of this later.
what is the use of OBJECT_ENTRY_AUTO
|
|
|
|
|
Usually, before commenting out a line of code, it is wise to have a look at the error message.
As about OBJECT_ENTRY_AUTO , it is a ATL secret [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am wondering who can help me.
if((fp=fopen("E456.cpp","r"))!=NULL)
{
while(!feof(fp))
{
int i=0;
char ch;
while((ch=fgetc(fp))!='\n' && ch!=EOF)
buff[i++]=ch;
::TextOut(hdc,cx,cy*nLineNumber,buff,i);
nLineNumber++;
}
fclose(fp);
}
The above is my code ,I want to find the '\t',and then i can print the file content out with some space.but i just can't.Where is the key? Is there are some people to help me?
modified on Saturday, February 21, 2009 10:26 PM
|
|
|
|
|
if (ch == '\t')<br />
{<br />
buff[i++] = ' ';<br />
buff[i++] = ' ';<br />
buff[i++] = ' ';<br />
buff[i++] = ' ';<br />
}<br />
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thank you very much,You are very friendly,and helpful.
|
|
|
|
|
Hi Guys,
I am wondering if anyone can give me the scoop on this.
I am developing a dll file and I have some very good developers telling me that if I develop the dll in Visual Studio 2005/2008 in win32 unmanaged c++ that the dll will not work on win98/me and that it will be dependant on MSVCP80.DLL. They tell me that if I develop the dll in Visual Studio 6.0 that it will work on older operating systems like win98/me and it wont be dependant on MSVCP80.DLL.
Now is this true? and if so is there anyway that I can develop the dll using visual studio 2005/2008 so that it will still work on win98/me and NOT be dependant on MSVCP80.DLL?
Thanks,
Greg
|
|
|
|
|
The only way to develop using VS2005/8 and not be dependent on the C/C++ runtime library is to avoid any references to it.
How important is it to maintain support for Win98/ME?
|
|
|
|
|
Dependencies are inevitable.
That's why an installation package is created to distribute an application.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I believe you can statically link the C and C++ run-times into your DLL, so it won't try and load the VS2005/2008 DLLs when it's used.
If you do this, you need to take care with memory management of objects passed back from your DLL.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I need a c++ source code that will create a simple triangle in an x-y plane so that scaling, rotation and translational transformations can be carried out on it... any help before thurs, Please? thnx
|
|
|
|
|
On Windows using the Win32 API you can start looking at the SetWorldTransform[^] function.
Steve
|
|
|
|
|
I'm not sure what you're after.
To draw a triangle, you need a drawing surface, so if you're using MFC, you need a view class.
For your actual question, you just need to store 3 sets of X/Y coordinates however you like.
For a code sample, have a look at:
http://www.codeproject.com/KB/recipes/CoordWarp.aspx[^]
It's got lots of points making up long lines - but you can use just 3 if you like...
(Hint, Polygon, with n = 3)
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I'm developing a small app for WM5 and it is using FindFirstFile() and FindNextFile().
These work just great in the WM5 emulator in debug mode.
I created a CAB file and ran it on my Axim, but it didn't work correctly.
I left the state to Release, as opposed to Debug and ran it in the WM5 emulator, and got similar problems.
I think this is working differently for more then just these, but I'm not sure.
The code I am having problems with is looking for a specific file by pattern, and then looking to see if there are others that follow the same pattern; I'm looking for the newest dated version of the file that fills the pattern.
like \Windows\abc*.txt
it works great in debug mode on the emulator,
but not so on my Axim or in release mode on the emulator.
Does anyone know what is happening here?
|
|
|
|
|
OK. I figured this out.
It was a missing include file.
Kind of strange that Visual Studio in Debug mode would reconcile these without any warnings, and then just skip over these function calls when run in Release mode or on the device.
I don't know if there is some build setting to at least warn me about this; if anyone knows of a warning, let me know.
Thanks
|
|
|
|
|
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include <unistd.h> // getcwd() definition
#include <sys/param.h> // MAXPATHLEN definition
using namespace std;
int main()
{
string database;
<snip>
cout << "Select full path of Database" << endl;
cin >> database;
</snip>
How do I check the existence of a file in C++?
In perl it would be something like:
if (!database){
print "No database found\n";
exit;
}
I tried looking online for hours but all the suggestions didnt work so far..
Thanks in advance!
|
|
|
|
|
do a seatch for PathFileExists.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
PathFileExists is a windows API and I am running C++ in linux so it doesnt work as far as I know and have been trying unless I goofed up...
|
|
|
|
|
I think you should be able to use _findfirst and _findnext on 'nix, I can't remember. They're in io.h
Or you could try to open the file and look at the function result....
|
|
|
|
|
After a lot of wrong examples from googling the web, I finally find something that works:
myFileName = file;
inp.open(myFileName.c_str(), ifstream::in);
inp.close();
if(inp.fail())
{
inp.clear(ios::failbit);
cout << "No File found " << myFileName.c_str() << endl;
exit(5);
}
else
{
cout << "Found File" << myFileName.c_str() << endl;
}
Thanks, hope this might help someone else...
Bye the way is this board only for Visual C++ or can someone working on Linux with C++ ask Qs?
|
|
|
|
|
meixiang6 wrote: Bye the way is this board only for Visual C++ or can someone working on Linux with C++ ask Qs?
We pretty much assume Visual C++ here, mostly even MFC is assumed to be used. Just in case you hadn't noticed the name of this board, it is MFC/C++.
You can ask C++ on Unix/Linux questions here, but you must let us know of it when posting your question.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|