|
Sounds like you need a "masked" edit control.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David, eVC++4 & CE doesn't support masked edit control. So, Is their any other better way to deal with the issue.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: eVC++4 & CE doesn't support masked edit control.
How so?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David, check out this:
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.compactframework/2005-01/0499.html[^]
At first I checked in eVC4 help, din't find any thing like that. In the Control Box, can't find any control for Masked edit.
On searching for "Masked Edit CE" in google found links where people complain for masked edit not working or not working properly.
Other than the above, I have reached on CE & found that masked edit controls are not compatible with all smart devices.
Based on these resources I am telling that eVc4 & Ce doesn't support Masked.
If you have any way out, I would defintly try for one but not third party.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: In the Control Box, can't find any control for Masked edit.
It's not a built-in control. You'll have to roll your own. CP has dozens of examples.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I do programming using Visual C/C++. A friend wanted a couple very simple functions his small hand held phone/PC could perform. He said his device was Windows CE compatible. Basically, he wanted two things. Ability to enter some data via the keypad and have a simple math result calculated and displayed, and also the ability to send data to his phone and have a simple math result displayed when selected.
I don't understand what the best development tool would be for something like this, and what things I should be wary of.
I would like to do the initial development using my Visual C++ 6.0 on my desk top PC, and then transform the code to move to the Windows CE environment.
Any suggestions?
Thanks!
|
|
|
|
|
Hi everybody,
i want to draw an effect on a view, which seems like the view is locked.
The whole view should be dark.
Till now, i made it this way:
<pre>void MyView::OnDraw(CDC* pDC)
{
for(int lin=0; lin<height; lin+=2) {
for(int col=0; col<width; col+=2 {
pDC->SetPixel(col,lin,RGB(0,0,0));
}
}
}</pre>
it works for the background, but the controls on the view are drawn correctly.
It's logical that only the background is "colored" this way.
But how is it possible to draw on the entire view with'in the controls?
Big thanks for any help
|
|
|
|
|
Well that's not the fastest code to erase view area with a given color.
As for controls, each control is a window, hence you have to handle the draw of all of them (see WM_CTLCOLOR message on MSDN [^]).
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
|
|
|
|
|
Thanks for your answer
So i place a locked variable into my view
And the derived controls (for example MyTextBox) have to handle the drawing if the locked-variable of the parent is set to TRUE. You mean it this way?
So that each control on the view draws itself the shadow?
Thanks
|
|
|
|
|
Yes.
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
|
|
|
|
|
Two suggestions: CDC::FillSolidRect () is a more efficient way to make a solid rectangle on your view. Also using an owner-drawn button would allow you to make any color or shadow you want.
|
|
|
|
|
Thanks for your suggestions.
But i want a half-colored rectangle. A FillSolidRect would color the entire view in black.
I want to color each second pixel, so the user can still see the view with the controls, but it's
dark and "seems locked"
Owner-draw buttons are a good idea, but i think it takes to much time to place them on the view.
I need to produce a lot of views, if i need to place each control via x and y values
it takes too long
But thanks anyway
|
|
|
|
|
OK, I see what you're trying to do. I think it can still be done in one graphics operation.
Create a black bitmap with every second pixel white. Then use CDC::BitBlt() http://msdn.microsoft.com/en-us/library/aa293654(VS.60).aspx[^] to color the area with the dwRop parameter set to SRCAND. This will black out the area except for every second pixel.
|
|
|
|
|
Great!
Exactly what i'm looking for, so i can manipulate the whole bitmap in one stop and not in 300x200 steps LOL
I still need to find out how to draw it even on the controls, or how exactly to draw the specific controls.
For example actually in textboxes i do this in the OnPaint()
But in several cases the control's client is still drawn without the shadow.
Thanks Alan
|
|
|
|
|
For the controls you can derive your own class from the control's class, and override OnPaint () to draw the shadow. You have to use SubclassDlgItem () in your OnInitDialog () or OnInitialUpdate () to route Windows messages to your derived class.
|
|
|
|
|
For controls you can derived your class of that classes and you will be more control on color of that controls.
|
|
|
|
|
Hi,
I posted the question of saving the bitmap to a file. initially it was not drawing. Not i am able to draw. My requirement is i should able to capture images for one minute even when the user presses clt+alt+del. i set up a timer and calling the bitmap capturing for one minute. it is working fine as long it is in focus. but when i press clt+alt+del it is failing saying invalid handle.
I am getting window handle.
after going this site, i came to know that this is a problem in xp. But how to modify my program so that it can work in 2003
http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.gdi/2004-03/0037.html[^]
Any suggestions
modified on Thursday, June 5, 2008 9:52 AM
|
|
|
|
|
Not i am able to draw.
...this must be: "NOW I am able to draw",...otherwise the question doesn't make much sense.
You don't tell us what the source is that you are attempting to capture, when the user selects the CTRL-ALT-DLT, but you could just automatically save the image to memory when it initially appears (I assume that it is being displayed in your app window), even though the user has not selected it.
The following information is from Wikipedia[^]:
"In Windows NT, and thus on its successors, including Windows 2000, Windows XP, Windows Server 2003, Windows Vista and Windows Server 2008, this keystroke combination is recognized (as a special system-wide "keyboard hook") by the Winlogon process, which in response instructs GINA to perform one of the following tasks:
(1) If nobody is logged in, bringing up the login dialog to allow the user to log in. Also used when the computer is locked to bring up the unlock dialog.
(2) If the computer is configured as a part of a domain or it runs Windows 2000, the combination brings up the "Windows Security" dialog, where the user can lock the computer, change their password, log out, shut the computer down, or invoke the Task Manager. This is the default behavior in Windows Vista and Windows Server 2008, regardless of whether or not the computer is part of a domain. The options presented can be controlled through the use of Group Policy.
(3) If Windows XP is not connected to a domain...
and the Welcome Screen and fast user switching are turned on, Ctrl-Alt-Del directly invokes the Task Manager.
and the Welcome Screen and fast user switching are turned off, Ctrl-Alt-Del will open the Windows Security Dialog, as described above.
Windows NT is designed so that, unless security is already compromised in some other way, only the WinLogon process, a trusted system process, can receive notification of this keystroke combination. This is because the kernel remembers the Process ID of the WinLogon process, and allows only that process to receive the notification. This keystroke combination is thus called the Secure Attention Sequence. A user pressing Control-Alt-Delete can be sure that it is the operating system (specifically the WinLogon process), rather than a third party program, that is responding to the key combination, and that it is therefore safe to enter a password. It was chosen as the secure attention key in Windows (instead of, for example, the System Request key), because on the PC platform no program could reasonably expect to redefine this keystroke combination for its own purposes.
It is also a reliable method for bringing up the Task Manager (in Windows Server 2003 and older). All other keystroke combinations could potentially be exclusively tied up by a process that is stuck, but a user process is not able to intercept the Control-Alt-Delete sequence. It can be however disabled by Windows Group Policies. Ctrl+Shift+Esc also brings up the task manager in all Windows NT versions starting with NT 4.0, even if pressing Ctrl+Alt+Del is set to bring up the Windows Security dialog".
There is an article about disabling the Secure Attention Sequence, by Paul DiLascia[^], in which he explains all the important Windows System details. The answer you want is probably there.
|
|
|
|
|
Your answer was perfect I give you 5.
|
|
|
|
|
Hello,
I have a client application that uses dll.Now I want to debug this application but even if I press F11 the control doesn't
'step into' the dll porogram.
How can I get the conrol into my DLL program?
Pritha
|
|
|
|
|
Start debugging from yor dll project: open your project and press F5. VC will ask you to provide the path to the executable that uses your dll. Be carfull that the dll which is used by your exe (so, probably in the same dir as the exe) is the same as the dll you built.
|
|
|
|
|
If you want to debug your dll than open your dll workspace and use client application as an executable file.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hello,
Thanks for the replies
I tried debugging the dll but I get the following message.
"This application has failed to start because BaseClassesDLL.dll was not found."
I have the dll in the directory where I mentioned in my Settings for the client program.
Pritha
|
|
|
|
|
Is the path of DLL that you build and the DLL that is used by client application is same? Please check it.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|