|
Hi,
I used VC6 earlier.In which i was able to see the Last error by placing "@err,hr" on the watch window.i.e the value returned by GetLastError() function.
But now im using VC2005, the statement will not evaluate in VC2005 at all..
Is there any methods to get the Last error in watch window of VC2005?
Regards,
Mohammed Asif
|
|
|
|
|
It is still there. You must be missing something very obvious.
Prasad
MS MVP - VC++
|
|
|
|
|
Hi Prasad,
Well i couldn figure it out what im missing to get the value evaluated in VC2005.VC2005 is freshly installled in my system.Is any settings to be done to get the same?
Regards,
Mohammed Asif
|
|
|
|
|
No, setting needs to be done. I hope, you are puting @err,hr in quotes("@err,hr" .
Prasad
MS MVP - VC++
|
|
|
|
|
Hi Prasad,
Yep.Im putting it inside quotes.
In watch window it display "@err,hr" under _Name_ coloumn, "@er,hr" in _Value_ column and wchar_* in _Type_ coloumn.It does not display Last errors value anywhere.
|
|
|
|
|
I want to retrive the Handle of the child window. But facing a problem.Threre are two child window with same name and when I use the Function FindWindowEx() I got the Handle of the First child. And don't know how to get the handle of second child.
It is hierarchy in Spy++ is as below. And I want to retrive the Handle of TExRichEdit
The code I am using Is like this.
HWND hChat= FindWindow(_T("TfrmChat"),0);<br />
hChat = FindWindowEx(hChat,0,_T("TPanel"),0);
- Window 000E03A2 ""TfrmChat
|
- Window 000903D8 ""Tpanel
| |
| -Window 001903D4 ""Tpanel
|
- Window 000803C4 ""Tpanel
|
-Window 001903D4 ""TExRichEdit
|
|
|
|
|
HWND hChat= FindWindow(_T("TfrmChat"),0);
HWND hPanel = FindWindow(_T("TPanel"),0);
hPanel = FindWindowEx(hChat,hPanel,_T("TPanel"),0);
Of course you might want to check that the first TPanel doesnt actually have the TExRichEdit as its child before looking for the second panel.
|
|
|
|
|
|
This should work
HWND hParent = FindWindow(_T("TfrmChat"),0);
HWND hChild = FindWindowEx(hParent,0,_T("TPanel"),0);
hParent = FindWindowEx(hParent,hChild,_T("TPanel"),0);
hChild = FindWindowEx(hParent,0,_T("TExRichEdit"),0);
|
|
|
|
|
|
try FindWindowEx
static CWnd* FindWindowEx(
HWND hwndParent,
HWND hwndChildAfter,
LPCTSTR lpszClass,
LPCTSTR lpszWindow
);
Sreedhar DV
[Real success is having courage to meet failure without being defeated.]
|
|
|
|
|
Hey guys,
I have to make an application in which i have to search on google.com for some search keyword and display the forst three links.
i am new to internet programming, if anybody can help me or suggest me any article i'll be very thankful.
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
|
I have do the following: (1) create a GraphicsPath; (2) create a second GraphicsPath, (3) create Regions for each path; (4) intersect these two regions getting a Region*.
Now the question: how to construct a GraphicsPath around this intersection region?
|
|
|
|
|
Probally you need a custom class:
you can neme it MyDC , you have to link to it a DC and then specify the rectangle that sets its position.
Then you can create 2 DC ( points 1), 2) and 3) ).
The point 4) require that you prepare a function like
MyDC GetIntersect(MyDC dc1, MYDC dc2){...}
to create the new DC.
This function will extract the rectangle that describes the intersection (if exists), and it has to prepare the contents of the DC. To do this you can work pixel per pixel to get the color of the new pixel according on your intersection logic.
Remember that the function CDC::BitBlt[^] can help you here (look also the Binary Raster Operations[^])
Russell
|
|
|
|
|
i am new to vc++ and i havent worked in active X.. so can anybody help me how to create a gantt chart from vc++
thanks in advance
|
|
|
|
|
First: Read this[^]
Second: Try google or using "search in forum" or read some articles in this website. There is a lot of info
Third: If you try it and put the code where you are having problems you will have more help than now
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Someone would like to tell me how to check a directory is existed or not?
I use GetFileAttributes().
But it need a wide character set string as its paramter,otherwise,it does not work.
Now,I want to using one byte char string as the path,how should I do?(in pure C style)
Thanks.
GOOD LUCK.
|
|
|
|
|
|
You can check using the following code -
bool bPathExist = true;
CFileException Ex;
if (!File.Open (FileName, CFile::modeCreate, &Ex))
{
if (Ex.m_cause == CFileException::badPath)
{
bPathExist = false;
}
}
and to make sure that each directory exist in the whole path, use Api -
::MakeSureDirectoryPathExists
|
|
|
|
|
|
Unfortunately there is no POSIX or standard method for doing this. boost::filesystem is as close as it gets.
However you may try using this:
http://msdn2.microsoft.com/en-us/library/1w06ktdy(VS.80).aspx[^]
example usage:
TCHAR *file = _T("c:\\test.txt");
if((-1 != _access(file, 0)))
_stprintf(_T("%s file exists.\n"), file);
else
_stprintf(_T("%s file does not exist.\n"), file);
Best Wishes,
-Randor (David Delaune)
|
|
|
|
|
but I will use it in a .c file.
When the codes were compiled,it would post an error,that ATL only can be used in .cpp file!
|
|
|
|
|
I will have a try imediately.
Thank you very much.
|
|
|
|
|
try PathIsDirectory()
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|