|
I switch the resource in a dialog class function, e.g. CMyChangeLanuageDialog::OnOK
<br />
...<br />
m_hResourceDLL = LoadLibrary( (LPCSTR)strDllFileName );<br />
AfxSetResourceHandle( m_hResourceDLL );<br />
...<br />
Same is done at startup in something like CMyApp::initilize(), where CMyApp is derived from CWinApp. After which the application picks the right resources when creating the UI.
But when I just set a new file-handle during run-time with AfxSetResourceHandle() it does not seem to reload the UI, only save the new handle for future checks. Thats why I'm looking for some global redraw function.
|
|
|
|
|
The already-loaded resources need to be reloaded. Once they are loaded the first
time when the UI object is created, the system doesn't look at the resource again.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yeah, seems like this is the only way. Is there any way to do this without restarting the whole application (this is what I wanted to avoid)?
Can't seem to find a member function of the controls that would make it reload itself. Tried to destoy (e.g. a menu) and load again but seems to give me other problems then, CMDIFrameWnd::Assertvalid() fails. I'm at a loss at this one.
|
|
|
|
|
You'd probably need to destroy windows and recreate them.
To prevent the application from terminating if the main window is
destroyed, set the app class' m_pMainWnd member to NULL.
When the new main window is created, you can set m_pMainWnd
as a pointer to the new main window.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello everyone,
I want to print out and log localized message according to current locale of machine. For example, if I am always use MESSAGE_ERROR macro in my program, and I want to replace it with "Error" when the locale is en_US and be replaced with French if the locale if Fr.
I am wondering whether Visual Studio 2005 provide some existing technology or some resource file which I could utilize? For example, I could define MESSAGE_ERROR macro to "error" if locale is English and define to other values if other locale is set. I do not want to change any source codes if necessary. I am developing unmanaged C++ DLL using Visual Studio 2005.
thanks in advance,
George
|
|
|
|
|
Hi Experts,
I devolped a SDI appliaction.As I execute it, sometimes it fit to window somtimes not.Can anyone help me ?
|
|
|
|
|
pther wrote: As I execute it, sometimes it fit to window somtimes not
can you explain a bit clearly?
|
|
|
|
|
As I run the application it does not fit into window as a maximized window application fit. It appears a maximized window but little down to the taskbar.
|
|
|
|
|
you want it to be maximised always?
|
|
|
|
|
It is already maximized but appear littile down to taskbar.It is getting same position to maximize.
|
|
|
|
|
no proper clue.
because, i never faced such problems with sdi applications.
try using it in any other system and see.
if possible, you can send me your project folder zipped without debug folder,
provided, it is in vc++ 6.0.
|
|
|
|
|
Thank you . But I can't send you the full project . Will screenshot be usefull ?
|
|
|
|
|
|
chandu004 wrote: if possible, you can send me your project folder zipped without debug folder...
And how does this benefit others that are reading this thread?
"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
|
|
|
|
|
yes sir you are right.
but iam sure that, the OP or me shall quote the solution in this forum, if it is really solved.
why i wanted him to send his application is , because, i never faced this problem with sdi.
so i wanted to see it practically and try to solve it.
|
|
|
|
|
pther wrote: It is already maximized...
How are you verifying this? Even if your app's window fills 98% of the desktop, it is still not maximized.
"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, all i have made a chat appliction like MSN Messenger that works fine on LAN.it has one Main server application on which all cliens connects,those client send message to each other as well by getting the contact list and listen on port for that contact.Now i want that application to work on internet as well.
my confusion is how to get the ip adress and more importantantly port number of differnt
clients as some clients are in Private LAN and they will be using router/gateway ipadress instead of own ip adress, and i cannt use their adress and port number.
thanks in advance
Regards.
Tasleem Arif
|
|
|
|
|
i feel that, this post has to be put in web development forum.
gud luck.
|
|
|
|
|
i don think so , it is socket based application like msn messenger,it is windows based application not asp/asp.net pages i dont think it should be placed in web based section.
Regards.
Tasleem Arif
|
|
|
|
|
i see,
gud luck.
|
|
|
|
|
chandu004 wrote: i see,
gud luck.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Good luck with his problem or good luck to find out answer?;P
|
|
|
|
|
Hamid. wrote: Good luck with his problem or good luck to find out answer
I feel, both
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
_tasleem wrote: my confusion is how to get the ip adress and more importantantly port number of differnt
clients as some clients are in Private LAN and they will be using router/gateway ipadress instead of own ip adress, and i cannt use their adress and port number.
For Solving that problem you need Live IP, where you Server application would run. but be cautious it's little costly!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|