|
Yes, thanks but Now window or View behind the dialog box is get flickering..not ListCtrl by using LockWindowUpdate()
Anu
|
|
|
|
|
Check the OnTimer() for unwanted InvalidateRect() or function like that which generates WM_PAINT message. That can be the reason for your dialog flicker.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Any sample code in vc++ to take a snapshot of video stream played in a vlc control or any useful link in codeproject for the same?
|
|
|
|
|
See here[^] but im not sure its helpfuls for you or no?
|
|
|
|
|
I write a program to capture window controls. I used global mouse hook to catch mouse message.
I want that when I move my mouse to a control, there's a rectangle around that control. I got the handle of the control, drew the rectangle but my problem is when I move to another control, the previous rectangle hasn't disappeared yet. I tried RedrawWindow() like this but there was no effect :
CDC *hScrDC;
hScrDC = CDC::FromHandle ( ::GetDCEx(NULL, NULL, 0));
Tmp->RedrawWindow(NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
RECT rect;
Tmp->GetWindowRect(&rect);
int nX = rect.left;
int nY = rect.top;
int nX2 = rect.right;
int nY2 = rect.bottom;
hScrDC->Rectangle(nX, nY, nX2, nY2);
Some one plz help me
|
|
|
|
|
If you draw the border around the button, you draw on his parent so try to made an InvalidateRect on his parent, thinks to increst the rect from the border width and use ClientToScreen ScreenToClient to adjust position of rect on parent.
Bye...
...
|
|
|
|
|
capint wrote: RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
Try combining these two flags RDW_ERASENOW, RDW_UPDATENOW along with above ones.
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
|
|
|
|
|
Thanks so much Nibu babu thomas, I got it
|
|
|
|
|
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!"
|
|
|
|