|
This can be done by creating a GINA.DLL.
And I don't remember exactly how, but modifying some registry keys was possible also to achieve that.
I'm sure that there are other ways to do that, some of them have been explained here in the CP.
hope this helps.
|
|
|
|
|
You can prevent task manager but CTRL+ALT+DELETE will always go to windows. Additionally, you must not do such a thing.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: you must not do such a thing
What if you implement proprietary systems and the user must only use your app in the computer that is embedded inside that system? if the user can it ctrl+alt+del then he can go into the OS and harm something...
I'm sure that there are lots of reasons to need this. In my case, for example, I make machines that are controlled by PC's... those machines can hurt people... I must be sure that people wont be able to touch something that is "delicate" and use only my app with all it's restrictions...
|
|
|
|
|
I am sure you can do it – but do not do that – enough said.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
Is it possible to destroy a domodal dialog once a child dialog appears on button click of the domodal dialog.
To be more specific,
Lets say in a dialog based application there 3 dialogs: Dlg1, Dlg2, Dlg3 and lets assume a button is there in Dlg1 and Dlg2,Now on button click on Dlg1 I am trying to invoke DoModal dialog Dlg2, and on button click of Dlg2 I am trying to invoke another DoModal dialog Dlg3, and my question is on invoking DoModal dialog Dlg3, can we destroy Dlg2??
|
|
|
|
|
why don't you send a wm_close message?
|
|
|
|
|
Super Hornet wrote: Lets say in a dialog based application there 3 dialogs: Dlg1, Dlg2, Dlg3 and lets assume a button is there in Dlg1 and Dlg2,Now on button click on Dlg1 I am trying to invoke DoModal dialog Dlg2, and on button click of Dlg2 I am trying to invoke another DoModal dialog Dlg3, and my question is on invoking DoModal dialog Dlg3, can we destroy Dlg2??
No. If the parent is window is destroyed, the child windows will be destroyed too.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Super Hornet wrote: my question is on invoking DoModal dialog Dlg3, can we destroy Dlg2??
Doing it FROM Dlg3 kinda goes against the grain for the concept of "modal".
An alternative is, when the button is clicked in a modal dialog that should make that dialog go
away, do something like -
In Dlg2, call EndDialog(some_return_code) in response to the button click.
In Dlg1, check the return code from DoModal for Dlg2
If the return code is "some_return_code" then create a Dlg3 and call its DoModal.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks Mark I will try your method.
|
|
|
|
|
how to find adapter is exixts in system or not.
|
|
|
|
|
Is GetAdaptersInfo helpfuls ?
|
|
|
|
|
I have a server app which is connected to a client applicatio through tcp/ip using CSocket derived classes in both. I want to be intimated in the server when the lan connection of the system in which client application is running goes off.
Is it possible?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
|
class B derived from CDialog and use dialog-box template resource:
<br />
class AFX_EXT_CLASS B : public CDialog<br />
{<br />
B:B(CWnd* pParent = NULL) : CDialog(B::IDD, pParent){};<br />
...<br />
enum { IDD = IDD_XXXX };<br />
...<br />
};<br />
<br />
class AFX_EXT_CLASS A : public ...<br />
{<br />
...<br />
B b;<br />
...<br />
};<br />
now, use the dll in an exe program, when constructing A::b, B::IDD will be treated as a resource ID in the exe, not the dll, so it brings errors!
will some one please give me some suggestion?
best regard
|
|
|
|
|
I want to ask could the point's size be set when I call SetPixel()?
|
|
|
|
|
Do you want to set color of pixels on the screen with SetPixel
|
|
|
|
|
Chen-XuNuo wrote: could the point's size be set when I call SetPixel()?
What point?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Even though CDC::SetPixel takes a logical coordinate, it does not behave like the other drawing primitives in mapping modes (like MM_ISOTROPIC, MM_ANISOTROPIC, MM_HIMETRIC, etc...) in the sense of having a metrically translated "size". CDC::SetPixel will adapt it's coordinates correctly based upon the viewport and window extents (i.e. it's position will scale correctly relative to other drawing primitives like lines, rectangles, circles, and even text) but it will always remain a tiny little "dot" no matter how far you zoom in while the other drawing primitives and text grow.
If you want a logical "dot" to scale, you will likely need to perform a MoveTo/LineTo with the appropriate start and end coordinates or maybe a filled rectangle with no border with the appropriate size or even some blit pattern all defined appropriately in the logical world. Then as you change the viewport and window extents, you will get the effect you are trying to achieve.
However, use this method sparingly since drawing a "dot" to a device context is horribly expensive if your attempting to draw thousands, tens of thousands, or even millions of them as would be the case if your goal is to manipulate a bitmap or something to that effect. If this happens to be the context your in, consider getting the "bits" from a bitmap and working on those strictly in logical coordinates and later "blit" these to a device context to get the effects of the mapping mode metric translations.
Look up MM_ANISOTROPIC and MM_ISOTROPIC in MSDN as these are the most versatile mapping modes available since they don't lock in the viewport and window extents like MM_HIMETRIC, MM_HIENGLISH, and all the rest do.
I may be reading too much into what you asked but my gut reaction to any question regarding SetPixel/GetPixel is to assume the programmer is trying to manipulate bitmap bits as opposed to rendering drawing primitives. Either way, I hope my response helps somehow.
|
|
|
|
|
Wow – overkill. If they ask a question like that I doubt they would understand your answer. I understand the answer, but I really do not understand the question.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I kinda realized that I was reading way too much into one sentence after I had it all typed out.
But I figured why waste all that typing...
|
|
|
|
|
I understand – I have trouble keeping my answers short too!
But I am learning.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Haha~ ,so many people don't understand my question.What I want to ask is that when I call the SetPixel function,a dot appear in where I click the mouse,and I want to change the size of the dot.
In addition,I explain what function I want to perform.I open a bitmap which content is showing clothes in client area,and I want to get the border of the clothes through drawing manually.So I call the SetPixel in MouseMove to get each point I draw.
If I use MoveTo/LineTo I can't get the each point I draw.I can only get the begin and the end point.
I appreciate your suggestions.
|
|
|
|
|
Chen-XuNuo wrote: What I want to ask is that when I call the SetPixel function,a dot appear in where I click the mouse,and I want to change the size of the dot.
I had a feeling that's what you meant.
You can't change the size of a screen pixel. The size of one pixel on the screen is detemined by
the video resolution set for the monitor. All the pixels for a given resolution are the same
size.
That said, you can only go so small. For bigger "dots" you need to draw a cluster of pixels.
An easy way to do this is in Windows GDI is to use a pen with a thickness the desired size.
I'm not sure what's going wrong with your MoveTo/LineTo code. You'll need to post an example
of how you set up the DC and make the calls so we can better help you.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have developed an Windows socket application. It is being compiled successfully. But when I built it, it shows following errors which are related to winsock2.h file. I have included that file in the Include files path, and also the library file ws2_32.lib is there in the library path. The settings seem to be OK. Then also following error comes.
1>Linking...
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "unsigned long __cdecl GetHostAddress(char const *)" (?GetHostAddress@@YAKPBD@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "void __cdecl SendString(unsigned int,char const *)" (?SendString@@YAXIPBD@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>.\Debug/HTTPRequesttry.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://e:\ProgramFiles2\Microsoft Visual Studio\myprojects\HTTPRequesttry\Debug\BuildLog.htm"
1>HTTPRequesttry - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If anyone knows the solution please help me.
Thanks for the prompt reply.
Dhaval
|
|
|
|
|