|
Papa: Thank for a quick reply,
I have check out that app but I dont now how to just use the disable of the keys. And I dont want to use the checkbox I just want to use it when the app starts.
Can you help me... please.
|
|
|
|
|
Then check the second link that i gave you, it has a sample program that use a small class to make this task as easy as calling DisableKeys
Just check the class
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Well I did and I get this;
LINK : fatal error LNK1104: cannot open file "Debug\TaskKeyHook.lib"
What should I do.
|
|
|
|
|
Does TaskKeyHook.lib exist in the Debug folder?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
No that whas the poblem,
But it whas in the realese folder so it works fine now.
But tht I whant to do is to set this funktion on the init dialog funk.
|
|
|
|
|
hian i creted a small program to deal with it
if you like give me your email i will send you both dll and program
I Think It will Work
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Thank,
but it works fine now.
Thank anyway.
|
|
|
|
|
look man just use the windows keyboard hook and when you detect that ctrl+alt+del was hit just return 1; /error and the keyboard will have no //effect
else
return 0; //success
gabby
|
|
|
|
|
Thank you. The cause of the assertion was exactly due to the problem u said.
I want to draw some lines to the screen ,when uses dbl clicks,but I dont have a valid DC then...
Could u give me any suggestion on this one...
|
|
|
|
|
You need to store the data for your lines some other way.
Perhaps in an array of some data class representing the drawing to be performed.
Then, when the user does something, like move the mouse, add some data to your array for the new lines, and then call Invalidate() for your window.
The OnDraw will be called because of the painting to be done, and then you can go through your list of objects and draw the lines.
Basically, you should internally represent all drawing to be done with some data classes and then transform that data to drawing function calls in the OnDraw method.
If you do nto have htis data, and user draws soemthing, then when another window covers yours, and you get a paint message (OnDraw is claled) you will probably lose all the drawing you already did.
|
|
|
|
|
|
I have inserted a dialog to my Dll and generate a class named as CTestDlg by the classview. I alse write a dllexport function:TestDlg
void __declspec(dllexport) __stdcall TestDlg()
{
CTestDlg dlg;
dlg.DoModal();
}
I have checked this dll in an application,but the dialog is not shown,why?
|
|
|
|
|
Try this (from msdn) :
You must add the AFX_MANAGE_STATE macro at the begining of all the exported functions in regular DLLs that dynamically link to MFC to set the current module state to the one for the DLL. This is done by adding the following line of code to the beginning of functions exported from the DLL:
AFX_MANAGE_STATE(AfxGetStaticModuleState( ))
rrrado
|
|
|
|
|
search this forum, somedays ago
there was a similar question.
Its because the ressources (the DLG template)
is loaded from the MainApp ressources and not
from the DLL ressources.
|
|
|
|
|
Hi Guys,
Would like to what is wrong with the following...
[1]Iam drawing to a screen the contents of a page(say, 1st page) & some rectangles as well.(Mfc application-using deviceContext)
Now,I want to load a different page(say, 2nd page) with no figures.
How will I clear everything from screen for drawing the 2nd page,so that the 2nd page doesnt overlap on the contents of the first page...
[2]
// In the MFC generated OnDraw
// m_drawer is a pointer to my defined class to which Iam passing the DC for drawing.
void CMfcTestView::OnDraw(CDC* pDC)
{
CMfcTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
m_drawer->AttachDC(pDC);
}
// Have another function to draw a line to screen on the button down action.
void CMfcTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
CView::OnLButtonDown(nFlags, point);
m_drawer->DrawLine();
}
void DrawLine()
{
CPen newPen(PS_SOLID,2,RGB(color[0],color[1],color[2]));
CPen *pOldPen = m_deviceContext->SelectObject(&newPen);
//Drawing Line
// This call gives me a assertion failure in wingdi.cpp
m_deviceContext->MoveTo(offset,initialyPos);
}
There is no assertion failure when I call "m_drawer->DrawLine()" from OnDraw().
What could be the reason of this.....
Thanks..
|
|
|
|
|
I think the DC you receive in OnDraw is the result of a lower level BeginPaint call.
The DC is released once the 'painting cycle' has completed - after your OnDraw returns, the DC is no longer valid.
You might be retaining it too long.
|
|
|
|
|
Thanks,That might be the reason.Will check that.
Could u put some light on the first part of my question...
Thanks.
|
|
|
|
|
Get the extents of your device context.
See CDC::GetWindowExt in MSDN
Create a 'solid' brush the color of the background.
See CBrush::CreateBrushIndirect in MSDN
Then fill a rectangle the size of your DC to 'erase' the background
See CDC::FillRect in MSDN or try CDC::FillSolidRect - then you do not need the brush.
|
|
|
|
|
I'm using WebBrowser control in my application in modeless dialog,
so it can download and display web page in background.
But sometimes WebBrowser set focus to this dialog and brings it to the top
when it finished downloading the page, so it will interrupt user while typing to another window.
How to prevent this ?
Thank you !
rrrado
|
|
|
|
|
I would like to make an app to secure the pc (running windows xp) with a password.
Does anybody know how to replace, or bypass with any way, the log in screen of windows XP?
Thanks in Advance,
sirtimid
|
|
|
|
|
You want to write an application that secures Windows XP by bypassing it's login security!?!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Message Closed
modified 7-Jun-22 3:31am.
|
|
|
|
|
I have seen this in windows 2000. A big company have developed that application. It is a log in security application.
they had replace the log in dialog with a similar one that they made it!!
|
|
|
|
|
ask gina, maybe she can answer your question.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
This[^] should help
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|