|
How can you specify a rectangle for WM_PRINTCLIENT?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
To translate an applicaion to different languages, App.rc is needed to translate the text in it. I would like someone to give me an idea or suggestion of what I might need to do with the hardcoded strings for messages through out the application( that are not part of .rc file - have like 400 of them), is there a way I can put all these messages in a file may be and use them as needed, I am just trying to find a way to make it easier later on to add more such strings that are not part of the .rc file in case of translation or anything else... what's the best way of doing this?
Thanks
sft
|
|
|
|
|
I used a .mc file containing messages such as:
MessageId = 1004
Severity = Error
SymbolicName = RAD_FCE_DRVNOTINSTALLED
Language = English
Allied Vision firewire message: Kernel mode driver not installed
which when compiled gives me a .rc and a .h
I recall that at some point I built a .dll using the resource that had one method: GetString(...)
and could just recompile the .dll when (in theory) a new language was added; which sounds like what you are looking for. I've never had cause to actually add another language though so can't advise on that.
I dropped the .dll idea eventually and now just compile the .h and .rc straight into my main code as it's easier for me.
|
|
|
|
|
Thanks for the answer, I am actually looking for something like you suggested ehere you compile .h &.rc... Can you elaborate a bit more on this idea?
Thanks
sft
|
|
|
|
|
I made a COM .dll with an object that had one interface and one method:
STDMETHOD(get_String)(LONG code, BSTR *pVal);
Though a .dll could export such a function instead of needing a COM object. Within that function handler I loaded the string, though looking now I see I used a string table rather than a message table. The info on message-tables I'm sure I found on Code-Project. I actually used the CComBSTR within the function as it had a LoadString method. (All this was done in VS6).
|
|
|
|
|
Thanks...I will try something similar in concept.
sft
|
|
|
|
|
I created one file suppose "abc.txt". I denied all access to all the users and groups for that file. (I did it by going to Security tab of property dialog of that file.). When I programmatically try to open this file by using API NtOpenFile() with access mask READ_CONTROL in user mode it succeeds. In this case I am opening the file in the user context who is creator owner of that file.
When I try to open the file in the context of other user who is not creator of that file NtOpenFile() fails with error "Access Denied". It may fails due to that user doesn’t have permissions.
Now when I try to open same file in native mode, NtOpenFile() fails with error "Access Denied". What will be the reason? How I can access the file having all permissions denied to all users in native mode?
Can anybody tell who is the user in native mode? Is it System?
|
|
|
|
|
It's impolite to repeat your question less than eight hours after first posting it. Don't do it again.
Anyway - an answer:
There is no user in native mode. Windows *DOES NOT EXIST* when in native mode. That means there's no concept of users as Windows understands them, no security sub-system etc etc etc. More importantly, I don't believe there is any concept of ACLs in native-mode, which means that READ_CONTROL is meaningless in native mode. This is reinforced by looking at the NtOpenFile[^] (and then ZwCreateFile[^]) documentation - READ_CONTROL is not a valid access mask for either of those functions.
|
|
|
|
|
Hi, I'm planning to program following:
2 connected computers (one windows one linux) would communicate between each other via UDP (User Data Protocol). Both sided will receive and send data based on input.
The question is: in UDP do I have to always configure client/server side? Can a server send data to client based on user input and the same on client side? If yes then I need to define just one IP and one port (am I right?).
thanks...
|
|
|
|
|
Why not Google [^] for?
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
[My articles]
|
|
|
|
|
I'm browsing the whole day but I got is only examples or basic specifications. I just wanted some practical information...
|
|
|
|
|
Aren't 'examples or basic specifications' some kind of 'practical information', are they?
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
[My articles]
|
|
|
|
|
Both sides can send messages to the other side, it's a two-way communication.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
karpis_miroslav wrote: The question is: in UDP do I have to always configure client/server side?
It sounds more like a peer-to-peer rather than a client/server. If you are coding both sides, then whether they need configuring would only be known by you.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
I would like bypass internet proxy using VC++. Is there any way to do it.
Thanks
SNI
SNI
|
|
|
|
|
You should read 'the little hacker manual' in order to do that.
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
[My articles]
|
|
|
|
|
Hi all,
I have implemented dialog based application and displayed icon in system tray, but still icon is coming on taskbar I dont want it plz tell me how to do this?
tha nx
|
|
|
|
|
I'm not sure what you mean but if i am right then try removing the WS_EX_APPWINDOW style from your dialog (you can do that in resource manager's dialog editor too if you don't want/need to do it programatically (i assume you are using VS), just set "Application Window" to false).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I tried your second option..bt it is not working,
and
tell me how to remove the WS_EX_APPWINDOW style from dialog
i tried ModifyStyle() in intitdialog function still it is not working.
where to put ModifyStyle()?
|
|
|
|
|
Note the EX part in WS_EX_APPWINDOW, you need to use ModifyStyleEx[^], like this:
ModifyStyleEx(WS_EX_APPWINDOW, 0, 0);
I guess your OnInitDialog is a good place to try this.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Have a search through the dialog section on codeproject. But good key words for you are stealth and WS_EX_TOOLWINDOW.
Hopefully that gets you going in the right direction!
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
//Code
private static void AddExtension(ReportViewer viewer, string name, Type extensionType)
{
const BindingFlags Flags = BindingFlags.NonPublic |
BindingFlags.Public | BindingFlags.Instance;
FieldInfo previewService =
viewer.LocalReport.GetType().GetField("m_previewService", Flags);
MethodInfo ListRenderingExtensions =
previewService.FieldType.GetMethod("ListRenderingExtensions", Flags);
IList extensions = ListRenderingExtensions.Invoke(
previewService.GetValue(viewer.LocalReport), null) as IList;
Type localRenderingExtensionInfoType = Type.GetType(
"Microsoft.Reporting.LocalRenderingExtensionInfo, " +
"Microsoft.ReportViewer.Common," +
"Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
ConstructorInfo ctor = localRenderingExtensionInfoType.GetConstructor(
Flags, null, new Type[] { typeof(string), typeof(string),
typeof(bool), typeof(Type), typeof(bool) }, null);
object instance =
ctor.Invoke(new object[] { name, name, true, extensionType, true });
extensions.Add(instance);
}
//End Of Code
http://nnhamane.googlepages.com/
|
|
|
|
|
Please don't convert it: let this bad code remain in the C# world.
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
[My articles]
|
|
|
|
|
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
You're lucky you didnt say it on the C# world.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|