|
Hi, thanks again.
since it is an mfc project i just cast it to CString instead.
func((CString)LPWSTR)
i think this should be ok... ???
me
|
|
|
|
|
ginjikun wrote: i think this should be ok... ???
That works thanks to temporary CString object's constructor
(it perforforms the conversion).
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
|
|
|
|
|
ginjikun wrote: 1) CString str="something";
func(str);
ok.
ginjikun wrote: 2) LPWSTR str="something"; <-- just a sample, not sure how to set a LPWSTR type
LPWSTR str = L"something";
LPCWSTR str = L"something";
ginjikun wrote: func((LPCTSTR)str);
requires care. in this case if your project is unicode, it is safe.
|
|
|
|
|
hi Rajkumar R, what if the project is compile with _MBCS? will it still be ok?
thanks
|
|
|
|
|
No, it is not ok. My previous statements is still correct.
func((LPCTSTR)str);
requires care. in this case if your project is unicode, it is safe.
ginjikun wrote: what if the project is compile with _MBCS? will it still be ok?
with the project settings, whenever the LPCTSTR is defined as LPCWSTR it is safe, as the str is of type LPWSTR. AFAIK, MBCS is not wide character, so passing wide character to function taking MBCS is not safe.
mostly, Wide character and single character is used without any precautions simply using generic text mapping functions, but MBCS requires additional handling like (You must keep track of which bytes are lead bytes).
|
|
|
|
|
|
Hi,
I want to implement 'Spell Check' option in my application. I don't know how to do this ?? Can any one please tell me how to do this or provide me some links for this.
Thanks in advance
Sanjeeva K.
|
|
|
|
|
Sanjeeva Kumar K wrote: provide me some links
links[^]
led mike
|
|
|
|
|
I want to implement 'View' option in my application. I don't know how to do this ?? Can any one please tell me how to do this or provide me some links for this.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sanjeeva Kumar K wrote: I don't know how to do this ??
You could start by using CP's search facility.
http://www.codeproject.com/info/search.aspx?artkw=spell+check&sbo=kw[^]
"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
|
|
|
|
|
Hi,
I want to implement 'Bookmark' option in my application. I don't know how to do this ?? Can any one please tell me how to do this or provide me some links for this.
Thanks in advance
Sanjeeva K.
|
|
|
|
|
Sanjeeva Kumar K wrote: I want to implement 'Bookmark' option in my application. I don't know how to do this ?? Can any one please tell me how to do this
Start by defining the functionality required for this "Bookmark option". (HINT: These are called functional requirements)
led mike
|
|
|
|
|
Sanjeeva Kumar K wrote: I want to implement 'Bookmark' option in my application.
Care to explain?
"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
|
|
|
|
|
Iam using 2 processes A and B of which B creates a dialog.
Process A runs an infinite loop until the dialog is destroyed by B.
Iam using the FindWindow() to see if the dialog is present in A ,it is succeding even after the dialog is destroyed by B.
Can anyone let me know the way to completely destroy the dialog?
|
|
|
|
|
krishnan.s wrote: Can anyone let me know the way to completely destroy the dialog?
Send it a WM_CLOSE message.
"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
|
|
|
|
|
krishnan.s wrote: Can anyone let me know the way to completely destroy the dialog?
Use a big hammer.
BTW how do you know that process A was effectively terminated?
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
|
|
|
|
|
CPallini wrote: Use a big hammer.
lol !!!
|
|
|
|
|
Are playing with or really have any real application.
|
|
|
|
|
Im agree with David did you send WM_CLOSE to it?
|
|
|
|
|
|
|
Hi,
I am writing an application in VC6 that has a database, which needs to be updated periodically. The database is going to be .mdb, using DAO to interact with the program (I know this is supposed to be obsolete, but... i like it).
To do this, I plan to get the program to connect to a web server where the new database is hosted, download it and replace the old one that is on the user’s computer.
Please can you tell me if my approach is correct? Or, is there a better way to do this?
How do MS Office, Adobe, win XP… etc update their programs?
Thanks
Fortitudine Vincimus!
|
|
|
|
|
Tara14 r, is there a better way to do this?
Can't you just connect directly to the database on the remote machine?
You might consider fixing your user id. The <font> tag is messing replies up.
"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
|
|
|
|
|
DavidCrow wrote: Can't you just connect directly to the database on the remote machine?
I guess for that, the user would need to be connected to the internet to work with the program. I don't want it that way. Bacically, I just need to update the prices of items in the database.
Something like : User selects "Update price list" item in the program's menu - a dialog appears saying 'connecting...' - on establishing a connecting dialog says 'Updateing pirces..' and closes.
Thanks,
Tara
Fortitudine Vincimus!
|
|
|
|
|
So the machines are not on the same intranet? If not, then FTP should be a viable solution.
"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
|
|
|
|