|
CrocodileBuck wrote: Hi Nathan & Mike,
many thx for your answers, I solved the problem like this :
CComBSTR (LPCWSTR(arrRelease[k].c_str()));
Bad move. The LPCWSTR cast causes the pointer to be interpreted as a pointer to unicode characters, but it doesn't actually convert the ansi characters to unicode. You can convert the actual string using MultibyteToWideChar, but it is fairly complicated to use.
Nathan
|
|
|
|
|
Does anyone know how to solve the error LNK1152?
|
|
|
|
|
If given enough information probably yes. But there it is quite doubtfull.
Anyway, I saw your other post about "linking" several projects and I think you don't understand what you are doing.
So please explain your problem in an understanble way and define exactly what you mean by "linking" the two projects.
If you would like to execute another executable (so, a stand-alone program which is not part of your application), then the solution that were already given are the way to go (ShellExecute or CreateProcess).
If you simply want to add existing source files into your project and call some functions from them, then you should explain what you did more in details. This two approaches are completely different so be sure upfront that the way you are choosing is the correct one.
|
|
|
|
|
I paint a Ellipse on a bitmap,but when I move the window the ellipse will disappear.
My application is dialog based,so I havn't use "OnDraw" to paint.
Who can help me..thank you...
|
|
|
|
|
Do u'r drawings in OnPaint ().
Come online at:-
jubinc@skype
|
|
|
|
|
Don Box ,hi.
my applition is fivechess,so I want when I pull mouseLButtonDown that the ellispe will appear the bitmap.
if my drawings in Onpaint(),I needn't pull mouse there will a ellispe appear the bitmap.
Can you answer me again..?
Thank you..
|
|
|
|
|
Plz write in full detail.
Come online at:-
jubinc@skype
|
|
|
|
|
I paste a bitmap in the OnPaint.And I press mouselbutton,there will a ellispe on the bitmap.I write the drawing function,when I press mouselbutton(OnLbutttonDown) the drawing function will be called.But when the other window move on my applition's window,the ellispe will disappear.How can I do..?
|
|
|
|
|
gggwb wrote: I paste a bitmap in the OnPaint.And I press mouselbutton,there will a ellispe on the bitmap.I write the drawing function,when I press mouselbutton(OnLbutttonDown) the drawing function will be called.But when the other window move on my applition's window,the ellispe will disappear.How can I do..?
Add an OnPaint message handler to your dialog (or whatever window you are drawing the ellipse to). Then the body should be something like
{
CPaintDC dc(this);
<draw to dc>
}
If I'm mistaken, and you aren't drawing an ellipse on a window, then how are you seeing the elipse?
Nathan
|
|
|
|
|
You draw in response to a mouse message. When a window is moved across
your window, your window gets a WM_PAINT message for the invalidated region
of the window. This means your drawing needs to be the same for WM_PAINT
as when you draw in response to the mouse message.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Can i get some sample code to build a touch screen application
Saadhinchaali
|
|
|
|
|
Ermm, don;t they just act like a mouse?
Just ignore WM_MOUSEMOVE when a button isn't pressed, and it should be the same as a normal PC.
Iain.
|
|
|
|
|
Normally you have only to worry on the special design (bigger buttons...) but the applications don't need to be in any way modified. We have developed lots of them here and when you touch the screen is like a click on the left button of the mouse.
If you want to create the driver of one touch screen, then this is a whole different story. But there are several touch screens out there that are not expensive.
Hope this helps.
|
|
|
|
|
I have an Activex control which has already been published. I need to add some new features to it. It shouldn't affect the applications that are already using it. How do I go about it?
The control exposes 4 interfaces. Is it better to write a new interface? I also need to use previous 4 interfaces. Should the activex control's CLSID and version be changed?
|
|
|
|
|
sv14 wrote: Is it better to write a new interface?
Just add a new interface to the existing ones. Don't change the CLSID , change the version.
(at least this is my advise)
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.
[my articles]
|
|
|
|
|
Thank you very much for your reply.
But, I also need to modify the previous interfaces.It is basically an MFC Activex control(developed as a reusable component)
Ex: Consider that the control exposes two interfaces,
IExample1 - CSample1
IExample2 - CExample2
Now, There are new requirements that needs to be implemented. Basically, new functionality should be added to CSample1 and CSample2.
If I go for a new interface. The methods of this new interface should use the classes CExample1 and CExample2.
If I change the version and if this OCX is copied to the client machine, what will happen to the previous OCX and if I try to insert the OCX in a new application will there be a distinction between the new version and the old one.
I hope I'm not asking too many questions I would really appreciate any help.
Thanks
|
|
|
|
|
sv14 wrote: But, I also need to modify the previous interfaces
No. Interfaces must not change (It's the first COM commandment) otherwise client applications will be broken.
sv14 wrote: Now, There are new requirements that needs to be implemented. Basically, new functionality should be added to CSample1 and CSample2.
This is good and feasible.
sv14 wrote: If I go for a new interface. The methods of this new interface should use the classes CExample1 and CExample2.
Yes, and you can do it.
sv14 wrote: f I change the version and if this OCX is copied to the client machine, what will happen to the previous OCX and if I try to insert the OCX in a new application will there be a distinction between the new version and the old one.
I think that you should replace the previous version of the OCX with the new one.
Anyway I'm not an expert on COM DLL versioning, try also to ask the COM forum.
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.
[my articles]
|
|
|
|
|
Hi All,
I am developing BHO (Browser Helper Object)in vc++ and till upto date it works fine.But I want to catch the event when any new explorer window is opened ,means if user opens any new explorer window at that time I want catch that event. SO I tried to use DISPID_WINDOWACTIVATE which do not catch this event. I also tried DISPID_NEWWINDOW2 but it catches event only when any new window is generated from the already opened explorer window.
Do you have any idea or any suggetion where I am making mistake??
Thanks in advance.
Ashish Bhatt,
System Developer,
Avinashi System Pvt. Ltd.
|
|
|
|
|
U mean u wanna be notified when the user hits Alt + N or opens new explorer window (Not the window opened by Javascript)?
Come online at:-
jubinc@skype
|
|
|
|
|
Thanks for the very quick reply.
Yaa, I want the notification when any new window is opened.( By whatever Atl + N or Ctl + T for new tab window)
Thanks.
Ashish Bhatt,
System Developer,
Avinashi System Pvt. Ltd.
|
|
|
|
|
Then the ideal way is, create an Event Object with any Unique name (unique name can be generated using GuidGen) in a worker thread at specified interval of time. Then check its GetLastError() value. If the returned valued is ERROR_ALREADY_EXISTS, means new window has been opened. Open successful creation, remember to close the handle.
Come online at:-
jubinc@skype
|
|
|
|
|
Thanks for replying.
But this not the perfact solution I will have to continuously check for the new window at regular time interval. Is that no other inbiult event that will generate when new window is opened during BHO imlpementation???
I will try your suggetion. If you have any other suggetion then plz reply me.
Thanks.
Ashish Bhatt,
System Developer,
Avinashi System Pvt. Ltd.
|
|
|
|
|
There r no such events. The events u r getting, such as BEFORENAVIGATE, NAVIGATIONCOMPLETE, belongs to the Web Browser ActiveX Control. So the Web Browser ActiveX Control doesn't monitor how many instances of it r running.
As far as I know, there's no such feature in IE.
Come online at:-
jubinc@skype
|
|
|
|
|
Sorry for the very late.
May I ask One thing that when DISPID_WINDOWACTIVATE is generated in BHO ?HOw can I catch this event in my application??
Thanks.
Ashish Bhatt,
System Developer,
Avinashi System Pvt. Ltd.
|
|
|
|
|
ashishbhatt wrote: Yaa, I want the notification when any new window is opened.(
Each time IE is opened, doesn't an instance of your BHO also get created?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|