|
Juan Antonio Bermejo wrote:
thnk chris
oops... I mean 'Thnk mike'... your signature confused me...;P
|
|
|
|
|
As I said, probably an error in the protocol file.
These numbers really aren't going to change, because they're the protocol numbers defined originally by the IPv4 specification and now managed by IANA[^], the Internet Assigned Numbers Authority. These are the same for IPv6.
Just use the constants. It's easier and less prone to breaking.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi world...
What is the most useful way to change language in an application?
I've read we can do that with explicit link for DLL (one DLL for each languages ressource). Example:
- exported from french.dll file:
extern "C" __declspec(dllexport) char* get_text(int id_text);
- int the application:
typedef char* (MY_FUNCTION)(int);
HINSTANCE hInstance;
MY_FUNCTION *pFunction;
VERIFY(hInstance = ::Loadlibrary("c:\\winnt\\system32\\french.dll"));
VERIFY(pFunction = (MY_FUNCTION*) ::GetProcAddress(hInstance, "get_text"));
char* good_language = (pFunction*)(1054);
Is that a good solution?
Thanks for your suggestions...
Hello World!!!
from Raphaël
|
|
|
|
|
Maybe you have already found a solution. If not search MSDN for Resource-only DLLs and check for samples using the function AfxSetResourceHandle.
Hope it helps.
...Plug & Pray...
|
|
|
|
|
Thanks for your reply... I've already found this solution... But thank you nevertheless...
|
|
|
|
|
What kind of software can i use for developing a multilingual app in delphi?
I am thinking of using xml or dll. What are the differences pros and cons?
Can anyone please help me?
|
|
|
|
|
How can I tell which version of windows I am operating on? Is there an API call?
|
|
|
|
|
BOOL GetVersionEx(LPOSVERSIONINFO lpVersionInfo);
Declared in winbase.h, include windows.h to get it. MSDN has information on the OSVERSIONINFO struct (see below).
GetVersionEx[^]
Hope this helps.
--
Henrik Stuart (http://www.unprompted.com/hstuart/[^])
|
|
|
|
|
I am unable to synchronize the threads(simultaneous) greater when they are greater than 100. The thread increments a global Unsigned Long the requested num of times.
The code is....
// [5/4/2004] AS told by Marshall Brain.....
// thread 3
// very simple MULTI threaded prg...with CRITICAL SECTION synch'n method
// Prob ?? : Results are RANDOM ??
#include<windows.h>
#include<iostream.h>
volatile ULONG g_count = 0; // volatile so that compiler doesn't do any optimizations (like place it in a register)
// and we are able to alter the var. inside the thread also
const INT NoOfThreads = 10;
CRITICAL_SECTION CritSec;
void CountThread(INT Iterations)
{
INT i;
// UINT x;
Sleep(5000);
for( i=0; i
|
|
|
|
|
Not sure about this for loop?
for( i=0; i
{
// EnterCriticalSection (&CritSec);
// x = g_count;
//x++;
g_count++;
// LeaveCriticalSection (&CritSec);
}
But here, try this.
Static CRITICAL_SECTION CritSec;
For (i= 0; x < something; ++x)
{
x = g_count;
x++;
EnterCriticalSection (&CritSec);
g_count++; // This is global to all threads so lock this only.
LeaveCriticalSection (&CritSec);
}
So yes, you are right the answer would be random. If you don’t want random then do this.
Static CRITICAL_SECTION CritSec;
// This is global to all threads so lock the whole loop.
EnterCriticalSection (&CritSec);
For (i= 0; x < something; ++x)
{
x = g_count;
x++;
g_count++;
}
LeaveCriticalSection (&CritSec);
|
|
|
|
|
Hi all,
I want to embed/open a word file in my own ATL ActiveX control. is it possible? i don;t want to use MFC.
Can someone help me.
Thanks in Advance,
Abhishake
|
|
|
|
|
hi..
Iam developing an application which needs to create a horizontal bar,and according to the changes in the values of the variables it need to show the percentage of change using 3 colors.For eg i have 3 colors Red,Green and Blue...those colors should be displayed on the bar according to their percentage.How can i do it....
|
|
|
|
|
Hi there,
I was wondering if it is at all possible to change the tab order of controls (with WS_TABSTOP style) at run-time.
As far as I could find out up to now, only the order in which the controls are created define the tab-order, I got the problem now however that I derive a dialog from an existing one, the new one has a few extra controls which should appear between controls of the base-class dialog. The controls of the base class are created first and then the new controls which results in wrong tab-order in the dialog.
Any help would be greatly appreciated
Regards,
Davy
|
|
|
|
|
Try SetWindowPos() and change the Z-Order relative to another control.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
From MSDN:
To change the tab order at run time you would need to call the SetWindowPos API. Microsoft Windows maintains all the windows in the system in a list. It uses this list for purposes like painting the windows, maintaining the z order, and so on. The order in which the child controls (in a dialog) are created determines their position in the list and, hence, the tabbing order. By changing the position of the windows in this list, we can change the tabbing order. Change the window list order by calling SetWindowPos and passing the relevant windows handles in the first parameter (handle of the window to insert in order) and the second parameter (handle of the window to insert after). The window handle specified in the first parameter would come after the second in the tab order.
Maxwell Chen
|
|
|
|
|
Thanks,
Always thought that a lot of questions in this forum could be left out if the questioner just went to the trouble of searching in MSDN lib for 2 minutes. Seems I am guilty of the same crime.
Thanks anyway,
Regards,
Davy
|
|
|
|
|
Dear Mr Bhavani;
Thank you for the help that you have given me in accessing a public variable from anywhere within my application. The problem is that the code did not work at all. The compiler strongly complained when i added these code:
((CDatastructorView *) AfxGetMainWnd())->m_main.Navigate"file://c:/datastructor/lectures/recursion_implementation.htm",0,0,0,0);
CDatastructorView is my view class and m_main is a web-control which i want to use.
The compiler responded as :
:\datastructor\lefttooldlg.cpp(1296) : error C2065: 'CDatastructorView' : undeclared identifier
C:\datastructor\lefttooldlg.cpp(1296) : error C2059: syntax error : ')'
C:\datastructor\lefttooldlg.cpp(1296) : error C2059: syntax error : ')'
Could you please help me out because i am still pretty at lost.
Krugger
|
|
|
|
|
datastruct wrote:
error C2065: 'CDatastructorView' : undeclared identifier
In what file did you define the user type CDatastructorView?? Just include that .h file in the lefttooldlg.cpp.
Maxwell Chen
|
|
|
|
|
at the top of lefttooldlg.cpp add
#include "..." //... = header file where CDatastructorView is defined
and your call should be:
((CDatastructorView *) AfxGetMainWnd())->m_main.Navigate("file://c:/datastructor/lectures/recursion_implementation.htm",0,0,0,0);
Regards
Davy
|
|
|
|
|
I need a CListCtrl derived class using owner-drawn report-mode but with '1 virtual column' that always stretches the entire viewable area.
Any ideas ?
|
|
|
|
|
then you would have to draw the columnd AFAIK...it would make your a job a lot easier to use custom draw though...
Cheers
How do I print my voice mail?
|
|
|
|
|
I'm ok with that, I already have a full-fledged Owner-Drawn CListCtrl.
My only problem is that in a certain configuration I'd like to move to a 'non column-based' layout and maintain my owner-drawn capabilities, this doesn't seem to be supported in a standard manner.
|
|
|
|
|
you could use InsertColumn only once and setting up the width of the control, it should use all the control's width and only in one column.
|
|
|
|
|
Hi to everyone reading this...
I have noticed that when an EditBox has the option singleline then if u add a notification handling function to it (lets say for the event EN_UPDATE ) and u call SetWindowText inside the function u instantly u receive a second notificatio and again and again.....
If though the EditBox has the option multiline the above behavior does not take place. Insted the notification arrives only once, SetWindowText sets the new text to the EditBox and the notification handling function exits.
Does anybody know why this deference exists? Does it serve a purpose?
In a single line EditBox how can i alter the text typed before it is displayed?
Thanks in advance for helping....
|
|
|
|
|
Just curious, but when you set the text for a single line control, how many r\n\ were there?
How do I print my voice mail?
|
|
|
|