|
Patje wrote:
Even if our application is running in e.g. German or Italian, the strings in the common control (and common dialogs) remain in English.
Commctrls are part of the OS, and thus are localized with the same language than your OS language.
You have more freedom when it comes with MFC controls, where you have a MFC42xxxloc.dll DLL to choose for redistribution (see MSDEV CD for more).
Patje wrote:
From the MSDN documentation I found that there is a function InitMUILanguage than you can use to change the language of common controls. I used it as follows...But apparently, it does not seem to work.
So you think each OS installation features all controls in all possible languages. Of course not.
MUI is a totally different thing. It's introduced with XP only, and it's a set of system dlls aimed to "enhance" dynamic language switch by hooking ::LoadLibrary. It works with the installation of localized MUI dlls (which you have to install on top of your OS anyway, on a language-by-language basis).
|
|
|
|
|
.S.Rod. wrote:
MUI is a totally different thing. It's introduced with XP only
Strange, according to the MSDN documentation:
The common controls have built-in support for national languages. These features simplify the implementation of localized applications.
And it works as long as I change the 'locale' in the control Panel. I have a standard Windows 2000. Setting the language to German gives me german month names and a 'Heute' button (instead of Today). And I'm sure I'm using normal common controls, no MFC controls.
.S.Rod. wrote:
Commctrls are part of the OS, and thus are localized with the same language than your OS language.
According to the documentation of InitMUILanguage:
Enables an application to specify a language to be used with the common controls that is different than the system language. and
Windows NT/2000: Requires Windows 2000 (or Windows NT 4 with Internet Explorer 5 or later installed).
Not a word about XP required.
What am I missing ?
<marquee>Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
are there any known issues with dispatching VARIANTs from one app to another in VS.NET?
when dispatching BSTRs and the like, everything goes fine. i tried some older applications (compiled under VS6) on my computer and they do work properly (using VARIANT as a paramter through automation).
i built the very easiest example of one server-app exporting one function VARIANT Test(VARIANT var); and one client using this function through automation. when debugging the client, the server gets properly loaded and the mfc-dispatchwrappers all do their job well (at the and of F11-ing the client the VARIANT-argument is ok as i constructed it). but when i debug the server, the VARIANT-argument getting in there is crap. moreover: it is different for each debugging-session.
as the proper functions get called, i assume, there's everything ok with registring the component and that stuff.
is there anything known about this issue? any hints and ideas are greatly appreciated...
thx.
:wq
|
|
|
|
|
it even doesn't work, when i compile the server as a dll.
in that case, everything is running in the same process and i can debug each and every step. just before the server-function is called, there are some fancy stack-creation and inline-assembler thingies in the code.
when the function is called then, there's crap on the stack!
ah. just found one more: even the return address seems to be corrupt. when i return from the server-function into the mfc-wrapper-code i end up higher than i started!
the result is: the server-function is entered again and afterwards that inline-assembler-code wants to derefence a NULL-pointer. bang!
maybe there's an error in the VC++.NET implementation of that code?
or maybe i have some wrong settings in my project?
weird!
:wq
|
|
|
|
|
ok. i cross-checked that thing with VS6 and the following turns out:
the VS6-client crashes when using the VS.NET server
the VS.NET-client crashes when using the VS.NET server
the VS6-client works correctly with the VS6 server
the VS.NET-client works correctly with the VS6 server
so i believe there is a bug in the VS.NET automation-server MFC-implementation when using a VARIANT-parameter. and now? how can i report this.
or maybe i made a mistake somewhere, but i don't know where...
:wq
|
|
|
|
|
I draw a transparent ownerdraw button.
So I did override OnEraseBkgnd() and draw my stuff in DrawItem(), with strange result. If I use device context from LPDRAWITEMSTRUCT the result is strange... if I use my own DC then all looks fine.
Can someone explain this behaviour to me? Am I doing something terribly wrong or bad? Thanks for help!
void CMyButton::DrawItem(LPDRAWITEMSTRUCT lpDIS)
{
CClientDC dc(this);
CRect rect = lpDIS->rcItem;
DrawMyGrafic(&rect, &dc);
}
BOOL CMyButton::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
|
|
|
|
|
I am using Web browser control in my program. The control ID is IDC_EXPLORER1. So now i want to hide this control at start up and display it on button click. So to hide , i am using GetDlgItem(IDC_EXPLORER1)->ShowWindow(SW_HIDE); and to show it in button click i am writing GetDlgItem(IDC_EXPLORER1)->ShowWindow(SW_SHOW); When i am using this, i am getting run time errors and the debugger is pointing to ShowWindow function of CWnd. So can anyone tell me how to hide n show this control. I also tried using a member variable for this control n using the function SetVisible of CWebBrowser wrapper class. So Just i wanna know how to show n hide the Web control.
Never postpone today's work for tomorrow
|
|
|
|
|
give a variable to this control, and VS will create a wrap class for it,then use this variable to ShowWindow
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
I have done all that. I assigned a variable with name m_browser. Now in my application am using it. Like m_browser.ShowWindow(SW_SHOW) and m_browser.ShowWindow(SW_HIDE). But it is not working and i have tried for other Microsoft registered active X controls also. It's giving run time error and the debugger is taking me to ShowWindow function.
Never postpone today's work for tomorrow
|
|
|
|
|
You can use any of those techniques (the control variable is probably best) but you need to make sure the control has been created before you try to send it messages or use its window handle in any other way. You will get run-time errors or asserts if you use any of the wrapper classes on a control with an invalid window handle (such as before the window is created or after it is destroyed).
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
If I have these coordinates
(51,74),(98,59),(74,36)
I want to display window. In this window have a rectangle which size is 256x256 and have a black frame. I want to show red point at (51,74),(98,59),(74,36) and if I want to draw black line from (98,59) to (74,36). Do you know how to do that?
Thank you for your reply.
|
|
|
|
|
In OnPaint, check out SetPixel, MoveTo and LineTo.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
i want to create a dialog based MFC Application which has just one dialog box with->
1) no taskbar icon
2) a system tray icon with a menu
3) no minimize, maximize button on the dialog
how do i go 'bout it?
can any1 help me?
rishabhs
|
|
|
|
|
|
but that has minimize and maximize icons.
also it shows up in the taskbar before being minimized.
how can it stay off taskbar? and remain in system tray.
|
|
|
|
|
See this[^] article. Btw, it's impolite to shout.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
With 32 bits adresses the total adress space is 4 GB. From what I've heard Windows reserves 2 GB. It is then useless install more than 2GB RAM. Is there any way around this so you can make use of more than 2GB RAM if necessary?
Regards, Haakon S.
|
|
|
|
|
Windows can run more than one process simultaneously and each process has its own address space, so Windows can make use of more than 2GB physical RAM.
|
|
|
|
|
See Microsoft Knowledge Base article Q170756 (sorry I don't have a direct link to it; I found it in my copy of the MSDN). There is a BOOT.INI option to enable 3 GB addressing for user mode programs running under Windows NT Advanced Server and DataCenter Server.
Software Zen: delete this;
|
|
|
|
|
We must indicate the size of date when using Recevie() function, but how to peek the data size of input queue? sometimes we don't know what size is that current queue head data.
|
|
|
|
|
hi
you can use ioctlsocket function to find out how much data is available to read.
|
|
|
|
|
I split a window into two parts(left and right)using CSplitterWnd .I want to dynamically changing right view. I have a method, but it must destory last view and create the view i want.how can i change the right view and don't destory the view before
thanks!!!!!
|
|
|
|
|
|
i tried DeleteFile
it didnt work - perhaps it's just meant for "files" - not directory
norm
|
|
|
|
|
How about ::RemoveDirectory() ?
B.
|
|
|
|