|
Users from windows or from your application?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Users from windows or from your application? A bit more info would be good
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Your question is a bit too vague. What permissions are you referring to?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I would guess he's talking about windows ....
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
for the windows system(xp and above)
|
|
|
|
|
I want my application to detect whether it runs on a cluster or not. How can i do this using Cluster API ?
BEST REGARDS
|
|
|
|
|
If I compile the code as a UNICODE built , which compilation would it be UTF-8
, UTF-16 or some other .
I mean to say what support it would be UTF-8 or UTF-16.
and If nothing what can be done to make it utf-8 if I am using wcstombs ,_wcslen functions ?
Using MultiByteToWideChar is the solution ?
|
|
|
|
|
Internal a LPCWSTR/CStringW is in UTF-16 LE, a CString also when you compile in UNICODE.
Converting UTF-16 LE to UTF-8 you should use WideCharToMultiByte( CP_UTF8, 0, stringw, BYTE* );
When you want a Unicode file, you should first write an encoding tag.
|
|
|
|
|
I'm using Visual studio 6.0 and MFC.
I add a menu resource to my application and define all required names.
Menu produces its IDs automatically (e.g. ID_HELP_ABOUT) I use class wizard to add a handler for the command message. Every things OK. But when I revisit my menu and decide to add another handler for another item, a few days later, I see all those IDs turned to numbers (e.g. 32792) I then have to find the ID and retype it to be able to use the class wizard to add a handler.
I know how to add a handler manually, but it's a pain in my ...;P
Is there any way to return all IDs back? (I hope it's not deleting .clw file, it's even more pain to reassign all those classes, etc.)
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Actually in your "resources.h" you should have a relation of IDs and assigned int values. But it is the first time I hear about what you are saying. Maybe is there an option somewhere where you choose about seeing IDs in number or in name, but not sure about
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hamed Mosavi wrote: ...a few days later, I see all those IDs turned to numbers (e.g. 32792)
At this point, what does the project's resource.h file look like?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Nothing especial, except some resources have similar IDs
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Same here with VC.NET 2003:
The resources in the resource-editor and %PROJECT%.rc -file are the (correct) numbers, whereas the resource.h file has the (correct) ID-to-number table.
Annoying, but I could live with it. But as you mention it...
Failure is not an option - it's built right in.
|
|
|
|
|
If you use another "standard" IDs or Windows constants like windows styles (WS_MAXIMIZE) or attributes for some classes (PS_SOLID) and so on... are they ok? or have been transformed in their equivalent numbers too?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Sorry, I misunderstood what you mentioned.
Yes they are ok. I mean other resources like those I use for dialogs will be shown OK in "Resource view".
Everything OK, but menus.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Then, Sorry... but i dont understand what happens. All or none, but not some :S
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Nelek wrote: All or none, but not some
I'm sorry, Englilsh is not my native language. I don't understand this sentence.
Anyway, the problem remained; IDs of my menus turn to numbers, and just menus have this behavior.
Thank you for your effort
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
I made a programm that compare two txt files. If they are different then a=1 otherwise a=0.
Here is the first txt file:
T18 DB2 CCI00002 <br />
C03CLI NYNR48400000 01100000002 00<br />
C03RES NYNR48400000 00500000015 00
Here is the seconde one:
T18 DB2 CCI00009 <br />
C03CLI NYNR48400000 01100000002 00<br />
C03RES NYNR48400000 00500000015 00
They are diferent only because of the bold underlined character.
But the value return is 0.
The programme used is:
int a=0;<br />
char c;<br />
char t;<br />
fstream file1;<br />
file1.open("file1.txt",ios::in);<br />
fstream file2<br />
file2.open("file2.txt",ios::in);<br />
while (i<114) {<br />
file1>>c;<br />
i=i+1;<br />
file2>>t;<br />
if (c!=t) <br />
{a=1;}<br />
}
it´s i<114 because i don´t want to compare the whole text file.
Does anyone have an idea of the reason why the returned value is 0 even if the files are different?
|
|
|
|
|
have you tried debugging and going trhough step by step? Take a look on the contents of every char in every loop of the while. You will maybe have a surprise
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
ok i will try that way, thank you!
|
|
|
|
|
Why use an int if you plainly want a bool ?
why increment i in the middle, which makes the code harder to read ?
have you tried stepping through the code to see what values are being read into c and t ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Why use an int if you plainly want a bool ?
because this is only a part of the main programm, there is another thing that can change the value of a into 2.
Christian Graus wrote: why increment i in the middle, which makes the code harder to read ?
You are right i should put it at the beginning
Christian Graus wrote: have you tried stepping through the code to see what values are being read into c and t ?
I am about to do it, maybe i should have done that before posting a message.
Thank you for your advise!
|
|
|
|
|
Where is the variable i initialized???
- NS -
|
|
|
|
|
It´s initialisated at the beginning of the programme, i only quote the pertinent part of the programme.
|
|
|
|
|
From your replies, I think you need to do a line by line comparison. If so you may have to skip white spaces and blank lines.
- NS -
|
|
|
|