|
enhzflep wrote: That'll teach me for using a 11 year old API help file..
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
|
|
|
|
|
Hello,
I have written a BHO for explorer.exe.
It is working fine with Win XP but same code is not working with Windows 2003 Server.
Does anybody has any idea about this?
Regards,
Tony
|
|
|
|
|
tony_udz wrote: but same code is not working with Windows 2003 Server.
Oh, it's not working? Well that explains a lot. Thanks for all the specific information.
led mike
|
|
|
|
|
I mean to say BHO Dll is not loaded when exlorer.exe is laucnched.
If you have any idea about this please let me know.
My concern is that is ther any significant difference between Win XP and Win 2003 Server with reference to BHo.
|
|
|
|
|
tony_udz wrote: I mean to say BHO Dll is not loaded when exlorer.exe is laucnched.
And how did you determine that?
Is it listed in the add-ons list?
led mike
|
|
|
|
|
Actually, to debug this dll i have inserted a MessageBox() in every function,
For e.g.
In windows XP flow is as follows: -
When dll is registered flow is as follows: -
1) DllMain.
2) Dll Register Server.
3) Dll Main.
When you open Explorer.exe
1) Dll Main.
2) Dll GetCLassObject.
3) SetSite.
When you close Explorer.exe
1) Dll Can Unload.
2) DllMain.
But in Windows 2003 flow is as follows: -
When dll is registered flow is as follows: -
1) DllMain.
2) Dll Register Server.
3) Dll Main.
When you open Explorer.exe
No call to DLLMain.
I dont know for few unknown reason DLLMain could not be called.
Please let me know if you have still not understood the problem.
|
|
|
|
|
I found the problem.
In Windows Server 2003, i had to enable 'Enable Third Party Browser' from
Tools-> Internet Options --> Advanced --> Enable Third Party browser extensions (requires restart).
Thanks for your help!!
|
|
|
|
|
In a textbox, I have associated a var of type CString. I want to set it as " / / " & make sure that the user can change or edit /, just add nos & done. What type of formatting should I do and plz show an small eg. if possible. Reqs is for CE.
Also, I need to show a dialog for few mins & then close it. How do I end up doing that part in CE.
Thanks
Terry
|
|
|
|
|
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
|
|
|
|