|
I figured out I can do it using negative arguments in my StretchBlts
|
|
|
|
|
OK...I got that working, but to complete the set of orthagonal rotations,
I need a single 90 degree rotation that I can combine with flip/mirror.
Since I'm working on NT4/2000 and higher, is SetWorldTransform the way to go?
If so, would I be able to set the transform for both mask and source images? Or would I have to operate on the transparent combined image?
|
|
|
|
|
hello!!
i want to read a CString into an not existing .txt-File:
CString MyCString = "The Text";
CStdioFile csf("FileName.txt",CFile::modeCreate | CFile::modeWrite |CFile::shareDenyNone);
csf.WriteString(MyCString);
everything works fine (special thanks to PJ Arends ), but now i will set a path. at the moment the txt is saved in my Program file (MyProgram). now the .txt-file should be saved in MyProgramm\TXT-File.
how can i do this?
thanks
sunny
|
|
|
|
|
you can put whole path into construktor(or Open function)
CStdioFile csf("c:\\path\\FileName.txt",CFile::modeCre.....
Or if you need you program path you can retrieve it by:
GetModuleFileName(NULL,... function.
viliam
|
|
|
|
|
that´s good, but i have another problem:
the filename is given from the program user:
<br />
CString FileName=m_EditFileName;<br />
FileName+=".txt";<br />
i tried this:
<br />
CStdioFile csf("TXT\\myfile1.txt", CFile::modeCreate ...);<br />
and it works perfect. (thanks).
but now i in need something like this:
CStdioFile csf("TXT\\"FileName, CFile::modeCreate ...);
but this do not work? what can i do??? what´s wrong?
thank you for reply
sunny
|
|
|
|
|
Sunnygirl wrote:
CStdioFile csf("TXT\\"FileName, CFile::modeCreate ...);
Almost right, change to:
...
CStdioFile csf("TXT\\" + FileName, CFile::modeCreate ...);
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
great, thank you very much...
sunny
|
|
|
|
|
Try it like this:
<br />
CString FileName = m_EditFileName;<br />
FileName += ".txt";<br />
CString FullName = "TXT\\";<br />
FullName += FileName;<br />
<br />
CStdioFile csf((LPCTSTR)FullName, CFile::modeCreate ...);<br />
|
|
|
|
|
great, thank you very much, too..
sunny
|
|
|
|
|
Dov Sherman wrote:
(LPCTSTR)FullName
Any reason you're doing the cast from CString to LPCTSTR here? It does an implicit cast already, eh?
I never do it, but I have seen others do it, so I'm just wondering what your reasons are?
Thanks
That's why I ramble so much. If you're short and quotable, there's a much greater danger of ending up in a sig.
[Christopher Duncan on how to prevent yourself from ending up in a sig]
|
|
|
|
|
CString MyCString = "The Text";
CStdioFile csf(".\\FileName.txt",CFile::modeCreate | CFile::modeWrite |CFile::shareDenyNone);
csf.WriteString(MyCString);
With the include headers this works...
could it be...
Hope this helps...
regards
|
|
|
|
|
Hi All,
I am opening database as
CDaoDatabase dbSql;
dbSql.Open(NULL,FALSE,FALSE,"ODBC;DSN=ITITest;UID=sa;pwd=");
CDaoRecordset rsSql;
rsSql.m_pDatabase = dbSql;
rsSql.Open(dbOpenSnapshot,"SELECT * FROM tbltest");
BOOL TRY1 = rsSql.CanUpdate();
rsSql.SetFieldValue("test1","123");
when this is executed TRY1 is 0, that means I cant update
I have to change the data in one field of tbltest at the run time for which I am using SetFieldValue of CDaoRecordset.
I am getting following error,
"operation is not supported for this type of object"
Is this approach is correct?? Can anyone explain me asap
Thanks in advance
Uday
|
|
|
|
|
I need to use IMSAdminBase in order to programatically administrate IIS. Unfortunately i get unresolved external symbol on linking phase.
Do you know what is the appropriate library file to be used?
rechi
|
|
|
|
|
What is the unresolved external?
According to the docs, IMSAdminBase only requires
#include "iadmw.h"
and
#include "iiscnfg.h"
As it is a COM interface, I wouldn't expect there to be a static library to link against.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
Michael P Butler wrote:
What is the unresolved external?
iisDlg.obj : error LNK2001: unresolved external symbol _CLSID_MSAdminBase_W
iisDlg.obj : error LNK2001: unresolved external symbol _IID_IMSAdminBase_W It's a MFC dialog-based application in DEBUG mode. I have included the headers in stdafx.h.
rechi
|
|
|
|
|
Try adding
#define INITGUID
before the #includes.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
|
Remove the includes from stdafx.h and place them in stdafx.cpp instead.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
Not a chance. It gives me compile errors and among them i've noticed:
C:\temp\t\iis\iisDlg.cpp(230) : error C2065: 'CLSID_MSAdminBase' : undeclared identifier
C:\temp\t\iis\iisDlg.cpp(231) : error C2065: 'IID_IMSAdminBase' : undeclared identifier Solving these problems is turning me back to the linking errors
rechi
|
|
|
|
|
VC++ 6.0 has a problem with templates I'm told. what is it?
Obseve everything, remember more...
|
|
|
|
|
It does not support partial template specialisation, which in particular, means you cannot do the sort of template metaprogramming which has become trendy since the 'Modern C++ Design' book came out. While it is a pain, ( and still not fixed in VC7, yet ), it really doesn't stop 95% of the dev work likely to happen using templates.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thanks.
I ask because with the free compiler DEV-C++ I had a very very basic swap function, and the code would not compile under VC++ when copied in to it.
Obseve everything, remember more...
|
|
|
|
|
Shouldn't be a proble. The best approach would be to post the code, so we can comment. Remember to tick the box under this main edit box that says 'display this message as-is (no HTML)', or anything between <> will be lost.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
lol sorry I meant I had the code - ages ago.
oh! it's still on my wall...
template<typename x>
int Temp1(X &A, X &B)
{
X Var;
Var = A + B;
return Var;
}
Obseve everything, remember more...
|
|
|
|
|
Oh, I thought you were trying to do a swap. This is an add, and I'm not sure it has any value over simply adding without the function call. It will not compile if the type in question does not have an operator +. Because your return type is 'int' it also will not compile unless the template argument is a number, and it will give warnings because it will strip floating point numbers down to an int.
Swap would look like this ( except you'd add the template arguments being stripped by the site because neither of us checked 'show message as-is' )
template
void Temp1(X &A, X &B)
{
X Var;
Var = A;
B = A;
A = Var;
}
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|