|
hi...
I have no clue in my troubles.
I hope somebody can help me.
Question: How can I prevent from capturing a screen capture utilities or PrintScrn key?
thanks in advance!
|
|
|
|
|
basically you can prevent Printscrn keystoke using the Windows Keyborad hook.
there is dozens of pretty gud article on hook at cp just find using keyword "hooks"
|
|
|
|
|
thanks for your reply.
I understand what you mean.
If i hook the key stroke for print screen, i will prevent from screen capture. OK.
But, I still have a question.
How can i prevent from screen capturing by image capture utilities?
|
|
|
|
|
In my application there are two threads running.
One is main thread which is handled in GUI(front end) another one is
backend thread which is running in the background.
There is a result structure which will be filled by the backend thread and displayed in the gui by main thread.
Each time the new result will be added to the previous one. like iteration info1, 2....10 like that.
When backend thread fills info 1 it generates an event to main thread to display that in gui, and it starts reading/calculating for the second iteration info.
Any iteration info can be displayed only when it is completely filled.
But here i am getting exception as the event for the second one is invoked before the first one is not displayed completely.
Please let me know how to handle this using mutex.
vidya
|
|
|
|
|
You can create two buffers, the thread doing filling fills an alternate buffer each time, the main gui reads from the one NOT being filled.
If you fill faster than you read, however, then you need a thread-safe queue.
The mutex would be locked when you are reading and element from or writing and element to the queue.
|
|
|
|
|
hi,
I m capotruing a video using VC++ and DirectX.
i want to magnify it ,,in running mode Means to say that wil preview / Capturing it.
or in second sense zoom it.
but better word i think is to magnfiy it ,same as when u r getting picture from ur digittal camera u cam zoom / magnify it .
any hint or sample
thanx
Regards.
|
|
|
|
|
Look at source code for ZoomIn developer utility ships with Visual C++.
|
|
|
|
|
hi,
Where can i get this xource code of Zoom in utility of VC++.
plz tell ,
and i want to use zoom in for video previewing that i m building with VC++ and directshow ....
thanx for help
Regards.
|
|
|
|
|
The ZoomIn is a utility that ships with visual Studio 6.0.
I am pretty sure the source code is available from the MSDN library.
Also take a look at PJ's code here:
http://www.codeproject.com/tools/imageviewer.asp
It has ability to zoom in as well.
|
|
|
|
|
Hi,
In our project @ work we have a flex grid component. When you double click a cell you get in 'edit mode' and a dialog appears so you can type a value and if you press OK the cell gets this value. (They probably had their reasons to do it like that )
I derived a class from this one with some extra features, but now it seems I have to click on the dialog again to get the focus on the dialog (after doubleclick) setting the focus to another cell in the grid! (if you would press OK the WRONG cell gets the value)
I have checked my code against the base class and there is nothing I can see that is significantly different.
In the OnInitDialog from the called dialog I set the focus to a control.
Question: How can I put focus ON the dialog and OFF the grid without an extra click? (which will set focus to another cell)
1 more note: I can type in my control no problem, so If you would press enter everything would be fine. It's just as if the mouse doesn't get there?
I hope somebody can help me, tnx in advance!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
OK, I found it:
<br />
SendMessage(WM_LBUTTONDOWN);<br />
SendMessage(WM_LBUTTONUP);<br />
and it seems to work. (pfew )
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Hi!
In a dialog based application with a multiline edit box I’m trying to count the number of enter hits. I tried to use code like this:
void CNanoDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if(nChar==VK_RETURN)
{
counter++;
}
CDialog::OnChar(nChar, nRepCnt, nFlags);
}
The code doesn’t work.
Any Ideas?
Thanks in advance.
|
|
|
|
|
Do this:
message map:
<br />
ON_WM_GETDLGCODE() <br />
header file:
<br />
afx_msg UINT OnGetDlgCode( );<br />
in code:
<br />
UINT CtrlFlexArray::OnGetDlgCode(){<br />
return DLGC_WANTALLKEYS;<br />
}
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
I almost got it. But when I press enter or any different key in the edit box the function OnGetDlgCode()
returns always the same result so I’m not able to count enter hits. Am I missing something?
Regards.
|
|
|
|
|
I dunno,
Do you handle your keystrokes in OnKeyDown (or Up) messagehandler?
in message map:
ON_WM_KEYDOWN()
in header:
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
in code:
void yourclas::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags){<br />
}
if you do have this I wouldn't know, what you could have forgotten.
Hope this helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
The code that you wrote works fine in SDI or MDI application. But I have dialog based application with edit box in which I want to count enter hits.
|
|
|
|
|
Try adding a button to your dialog,
set it as default button and make it invisible.
(note: it could take the ESC button too)
(note: if it doesn't work, set it's focus explicitly)
just an idea, hope it works.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
HI,
Plz tell me differnce between Win32 and MFC programming
thanx
Regards.
|
|
|
|
|
Win32 is the programming interface to Windows, including all the Windows functions.
MFC is an application framework that includes much of the Win32 functionality, and a lot more.
|
|
|
|
|
thanx
but i want to know
When we use File ->New(PRoject tab)
there r options many ....
wts there differece win32 application and MFC wizard,
is that we can not use MFC classes in Win32 application or some else
thanx
Regards.
|
|
|
|
|
Check the following links
FOR MFC:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_overview.3a_.creating_an_mfc_exe_program.asp
FOR WIN32:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcgrfoverviewwin32appwizard.asp
|
|
|
|
|
Per MSDN:
MFC is an "application framework" for programming in Microsoft Windows. Written in C++, MFC provides much of the code necessary for managing windows, menus, and dialog boxes; performing basic input/output; storing collections of data objects; and so on. All you need to do is add your application-specific code into this framework. The MFC framework is a powerful approach that lets you build upon the work of expert programmers for Windows. MFC shortens development time; makes code more portable; provides tremendous support without reducing programming freedom and flexibility; and gives easy access to "hard to program" user-interface elements and technologies.
The Win32 application programming interface (API) defines the 32-bit members of the Windows operating system family from the programmer's point of view. Some members of the Windows family use the entire Win32 API, while others use subsets. MFC encapsulates, or "wraps," much of (but not all of) the Win32 API. In general, MFC supplies classes representing key Windows objects, such as windows, dialog boxes, brushes, pens, and fonts. The member functions of these classes wrap most of the important Win32 API functions associated with the encapsulated object. That is, the MFC class member function calls the Win32 API function.
With Visual C++, you can program for Windows using either C or C++ and the Win32 API, or using C++ and MFC.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Actually,let me explain the diffence between them in wasy way.
i think you know dosbased c and c++ before going for the MFC and win32 api.
here is the solution,
you can win32 api as windows based c and mFC as Windows Based c++.
basically as dos based c is more close to system same way win32 are more close to system and dos based c++ is oops based same way the mfc is oops based.
and as you know c++ use wrappper of c to provide easy handlling of function ,same way mfc provide wrapper some commonly used win32 api function,i think that enough.
if you want more search CP
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hello,
I have a group of files, how do I check the integrity of the files with a the given value which summarize the files content. For a single files, I know there are CRC. But how about a group files?
Any proven methods?
thanks
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
The only way I have seen a group of files checked is with an additional SFV file.
I believe it uses CRCs for each file in the set. A search for SFV on google may help you out.
Sorry I can not be any more help as I have not used them myself.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|