|
capint wrote: Thanks so much Nibu babu thomas, I got it
Welcome!
FYI
Reason for above behavior...
From MSDN: The system sends this message when there are no other messages in the application's message queue.
So we here just forced a paint by adding those flags! Another way to do this will be to first call Invalidate() and then call UpdateWindow() which is similar to what we did!
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
We want to use different interfaces supported by VC++ inorder to retrieve information from outlook. We want to use COM.What are the steps do I need to follow inorder to use this interfaces. Do I need to create The .idl file with the these interfaces mentioned in msdn or I can use it anyway.
Here is the link to msdn
http://msdn.microsoft.com/en-us/library/aa203843(office.11).aspx[^]
|
|
|
|
|
Hi all,
I just want to know is that is possible.
I have a int variable.
int temp = 12;
I want to pass temp as a wstring to another method, whose take a wstring as parameters.
Can you give me a clue. I've search on the web but no luck.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
I try th following but give an error.
<br />
int temp = m_bWRState;<br />
wstring st;<br />
_itow(temp, st, 10);<br />
'_itow' : cannot convert parameter 2 from 'std::wstring' to 'wchar_t *'
I appreciate your help all the time...
CodingLover
|
|
|
|
|
The second parameter that the function accepts is a wchar array, not a wstring. It is totally different: a wstring is a specific class, and a wchar is a basic type (unsigned short). If you want it to work, you first have to create a wchar array, then pass it to the function and then store it in your string (it has an = operator to do that).
Anyway, this method is more a C approach than a C++ approach. If you use a wstring, I suggest that you also use a wstringstream, but that's just a matter of opinion .
|
|
|
|
|
Get the point Cedric.
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You have to check if this works or not (didn't try it myself):
std::wstringstream streamVal;
streamVal << temp;
std::wstring strVal = streamVal.str();
Don't forget to #include <sstream> .
|
|
|
|
|
Yep, it's work. Thanks a lot.
Can you tel me what is wrong with my previous attempt, Naveen directed me.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi,
I have a main dialog that is shown when my application starts running.It consists of a VLCplayer control that streams the live video and plays it.I have another dialog with a second VLCcontrol which is displayed when I select a menu item.What I have to do is play the same live video in the second dialog too.But it doesn't work.I have added variables for the controls.Any ideas?
|
|
|
|
|
Why it doesnt work did you get any error?
|
|
|
|
|
thanks for your response.it worked after sometime.but now the problem is the first vlc plyer in the main dialog displays nothing after returning from the second.the second dialog too is programmed to play the video.i have a stop button in the second dialog .in that i have written code to stop the display in the second dialog.
|
|
|
|
|
Hi all,
If from a CString variable we want to get 3 characters from right we can use Right(3) api but for getting 3 characters from right in a TCHAR variable what function we should use.....
Can anybody help me in this....
Thanks in advance
|
|
|
|
|
CString cs = _T("Some string");
TCHAR tcBuf[4] = {0};
_tcsncpy( tcBuf, (LPCTSTR)cs.Right(3), 3 );
modified on Wednesday, June 11, 2008 6:10 AM
|
|
|
|
|
TCHAR * szSource = _T("Hello world!");
TCHAR szTarget[4];
size_t len = _tcslen(szSource);
_tcscpy(szTarget, &szSource[len-3]);
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
|
|
|
|
|
FYI, VS does come with the source for MFC. Try looking in the CString source to see what CString::Right does.
Judy
|
|
|
|
|
Sometime I am getting the error message saying:
"Unhandled exception at 0x00000000 in MyApplication.exe: 0xC0000005: Access violation reading location 0x00000000." but it is not pointing to the source code line caused this violation.
If I break, callstack is pointing "00000000()".
In this case is there any setting in VC++ to detect the line which caused exception.
Otherwise I will debug manually to find out the place..
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
If you start your debugger, it should bring you to the problem (or to assembly code if no source can be found). From there, use the call stack to come back into your own code.
|
|
|
|
|
Hi Cedric Moonen,
Thanks for your help!!
Sorry I modified the question, I am using debugger but callstack not showing source line.
Disassembly is showing address 00000000 and there are only question marks "????".
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
How does your call stack look like. It seems that you are confusing call stack with something else... The call stack shows all the functions that have been called to reach the current point in the code. By walking the callstack, you can 'travel' back to where the problem is coming from.
For VC2005: "Debug" menu -> "Windows" -> "Call stack" (or Alt + 7) will display the call stack window if you are in debug mode and on a breakpoint.
|
|
|
|
|
I used to look at callstack to trace the error always, but some cases like this, callstack is not showing any function but the arrow pointing to "00000000()" in callstack.
I think it means something out of callstack scope, or we have change some setting to break and show this exception in callstack
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
The error is making your call stack unreadable, so you need a different method to find the error. Use breakpoints to find the last statement executed before the error occurs. I'm predicting you're trying to use a NULL pointer.
|
|
|
|
|
In the Debug Menu
Exceptions
do modification to some setting over there...
|
|
|
|
|
I am using WM_PRINT to print the control. But it is copying the content of the control not the screen shot of the control. I tried to use PrintWindow. But as i am working on VC6.0, not able to use.
Any help is appreciated.
|
|
|
|
|
subramanyeswari wrote: But it is copying the content of the control not the screen shot of the control.
Sorry, I coudn't understand the diifference...What do you mean by "content of the contol" and "screen shot of the control".
subramanyeswari wrote: I tried to use PrintWindow. But as i am working on VC6.0, not able to use.
In VC6 also you can use this function. For this either you have to import this function dynamically or you should install latest platform SDK( it is free ).
|
|
|
|