|
Hey Ashish,
not sure to be honest, I've never noticed that artifact.
Guess you could just expand the border by 1 pixel with something like:
rect.top--; rect.left--; rect.right++; rect.bottom++;
Nonetheless, that's a rather interesting problem - I'll have to look into that, thanks for the heads-up.
|
|
|
|
|
Weel yes simon..And i believe expanding the border will not solve the problem...
My hunch is to select pen of particular color, say blue in my case and then redraw the borders.. But don't know how it's gonna work..
If you come to any decision. Please let me know about that..
I'm leaving now as my working hour is over.. Will see ya on Monday..
Happy Weekends..
Ta-ra..
|
|
|
|
|
Hey all..
I believe i've big prob now.. Actually i'm putting some controls on my dialog box. and i need my controls to be Transparent. i.e same color as of background.
For example i'm loading icon with the help of LoadImage and to make Transparent i'm passing "LR_LOADTRANSPARENT" as a last parameter of LoadImage.. But it actually taking black and sometimes Gray as background color... I believe that black border is creating prob...
What do you guys think?
|
|
|
|
|
Hi,
I am planning to create a new application, it is targeted to windows platform, it contains basic user controls and have a duplex communication with COM port (virtual COM port).
I am planning to use Visual C++ for it.
But I am not sure what IDE I should use.
Would Visual Studio C++ Express Edition 2008 be good?
Should I use .NET, Is there any option not to use .NET Frame work.
Thanks a lot in advance.
|
|
|
|
|
Visual C++ express edition should be enough for your purpose. If you create a Win32 application then .Net framework will not be available.
-Saurabh
|
|
|
|
|
Ok, thanks a lot, I have a little concern about the license as well, can I use this application for commercial purpose also... is there a way once I develop in Express edition or the 90 days evaluation copy (I have this) then I can buy the license for commercial purpose.
|
|
|
|
|
As far as I know you can use express editions to develop commercial application.
-Saurabh
|
|
|
|
|
KSuthar wrote: can I use this application for commercial purpose also
Yes: see, for instace, http://www.microsoft.com/express/support/faq/[^].
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]
|
|
|
|
|
In VC6.0 it's tstcon32.exe.
logics
|
|
|
|
|
|
Hi All
How can i convert CString to LPCSTR?Array Is Cstring search[100] and LPCSTR as. I want to convert search[100] to as.Plz help me
|
|
|
|
|
To convert a single object, just you need a casting like:
CString str;
LPCSTR pstr = (LPCSTR)(LPCTSTR)str;
But you can't use this technique for an entire array, you will need to create a parallel array and convert each element one by one.
Best regards,
Jaime.
|
|
|
|
|
Thanks it is working.Sir how can i convert this char *lpStr1 to LPCSTR.
Plz help me
|
|
|
|
|
Doing a double cast like that is not the proper way. Ever heard of CString::GetBuffer()?
|
|
|
|
|
PJ Arends wrote: Doing a double cast like that is not the proper way. Ever heard of CString::GetBuffer()?
That is relative, for read-only purposes, my proposal will be simpler.
Calling GetBuffer() implies calling ReleaseBuffer() later, according to MSDN configuration.
Best regards,
Jaime.
|
|
|
|
|
I am useing this code.Is it right or not.
char buffer_1[ ] = "c:\\Test\\sample.txt";
char *lpStr1;
lpStr1 = buffer_1;
CString string = _T(lpStr1);
int nLen = string.GetLength();
LPCSTR lpszBuf = string.GetBuffer(nLen);
string.ReleaseBuffer();
LPCSTR pF=lpszBuf;
|
|
|
|
|
It could be shorter:
char buffer_1[ ] = "c:\\Test\\sample.txt";
CString string = _T(buffer_1);
LPCSTR pF = (LPCSTR)string.GetBuffer(0);
string.ReleaseBuffer();
Best regards,
Jaime.
|
|
|
|
|
Thanks for reply
Can i check pF values contain any null values?
|
|
|
|
|
You can use something like:
CString string = buffer_1 ? _T(buffer_1) : _T("");
Best regards,
Jaime.
|
|
|
|
|
My new code is this
char buffer_1[ ] = "c:\\Test\\sample.txt";
char *lpStr1;
lpStr1 = buffer_1;
PathRemoveFileSpec(lpStr1);
CString string = _T(lpStr1);
int nLen = string.GetLength();
LPCSTR lpszBuf = string.GetBuffer(nLen);
string.ReleaseBuffer();
And what i change here sir.
Plz help me
|
|
|
|
|
Jaime Olivares wrote: That is relative, for read-only purposes, my proposal will be simpler.
That's true, but you must know in advance that access will be read-only.
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]
|
|
|
|
|
when i am useing these
LPCSTR lpszBuf in the file Shfileoperation as a source directory then it's not working.i am useing code this
char buffer_1[ ] = "c:\\Test\\sample.txt";
char *lpStr1;
lpStr1 = buffer_1;
PathRemoveFileSpec(lpStr1);
CString string = _T(lpStr1);
int nLen = string.GetLength();
LPCSTR lpszBuf = string.GetBuffer(nLen);
string.ReleaseBuffer();
LPCSTR pF=lpszBuf;
LPCSTR pT="c:\\Test2";
SHFILEOPSTRUCT sf;
memset(&sf,0,sizeof(sf));
sf.hwnd = 0;
sf.wFunc = FO_COPY;
sf.pFrom = pF;
sf.pTo = pT;
sf.fFlags = FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI;
int n = SHFileOperation(&sf);
if( n == 0)
{
AfxMessageBox("Success\n");
}
else
{
AfxMessageBox("Failed\n");
}
Can you tell me where i am worng.
|
|
|
|
|
What do you intend to do?
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]
|
|
|
|
|
Copy C:\\Test folder in C:\\Test2 folder.I want to take Source folder name from char buffer_1[ ].
Plz help me
Thanks in advance
|
|
|
|
|
MsmVc wrote:
Plz help me
Michael Dunn can [^].
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]
|
|
|
|