|
You're right there's no .lib file in the zip download. You have to include the source files in your project. From the manual: There's "Microsoft Visual C++: Add the ”borZoi.dsp” project file to your project’s workspace and add the header file directory to your project’s include files path." In my VC++6.0 this is done by "Project->Insert project into workspace..." Did you do this? You will include the source files (.cpp) in your project, and you should be able to see the classes in the class pane of VS. Remember to add the header file directory as well.
I guess that the reason why you only see the linker errors after adding your to lines of code is that this is the only point in your app where you call use_NIST_B_163(), and hence this line makes the linker look for all the symbols that use_NIST_B_163() depends on.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
by adding the header file directory do u mean to include in my projects include path?I thats so then ive done all that but still same errors??plz help me
|
|
|
|
|
by adding the header file directory do u mean to include in my projects include path?If thats so then ive done all that but still same errors??plz help me
I u can give me ur e-mail Ill send u my project and maybe u can check my project settings.I really cant figure out whas the problem???Ive done all what I was supposed to do.
|
|
|
|
|
You can just click the email button on my reply. I'll gladly look your project over, but I only have VC++6.0, so if you use VC.NET I can't help you.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
ok, this is what it looks like to me:
This is a solution that you need to load with Visual Studio and compile/link. When you do that it produces a static link library (the .lib file) which you then include to your imports.
|
|
|
|
|
For example, i want to get the virtual-key code value of the char ':'.
How can i get the value?
I love you not for whom you are, but who i am when I'm by your side
|
|
|
|
|
gohappy_1999 wrote:
i want to get the virtual-key code value of the char ':'.
Handle WM_CHAR message , It nChar argument contain the value for each key.
BTW Virtual keycode for ':' is undefined and it is equal to 3A(HEX) or 58(DEC)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello,
I don't think that there is an easy way to do it, but you can always use a map:
<list> Create a separate module create a private map that on initialization maps all virtual key codes to their ASCII (or UNICODE) counterparts.
Create a routine that returns the key code for the character passed to it.
Example:
#include <map>
static std::map<TCHAR, UINT> g_KeyCodeMap;
static bool g_bInitialized = false;
static void InitializeKeyCodeMap()
{
g_KeyCodeMap.insert(std::make_pair(_T(SomeChar), VK_SomeChar));
g_bInitialized = true;
}
int CharacterToVKCode(TCHAR Char)
{
if( !g_bInitialized )
InitializeKeyCodeMap();
std::map<UINT, TCHAR>::const_iterator ci = g_KeyCodeMap.find(Char);
if( ci == g_KeyCodeMap.end() )
return -1;
return c_i.second;
}
If I remember correctly, the VK_CODES in ASCII builds is the ASCII code of the character. So the VK code for ':' is static_cast<int>(':'); . I could be wrong about this though.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
How to convert it in managed windows forms application
int A;
private: System::Windows::Forms::TextBox * textBox; //with number value
need to convert String type from textBox to int A;
9ine
|
|
|
|
|
int A = int.Parse("your string variable")
Thats what you'd od in C# or do you use -> in MC++?
Kevin
|
|
|
|
|
No it is in C++ and it is
Convert::ToInt32(TimeBox->Text)
9ine
|
|
|
|
|
|
I had a line of code:
void CProtocolSimulatorDlg::OnBtnsend(bool condition1, char PortNo[10],char IPAddr[50], char Data[11])
It have error tell me that 'OnBtnsend' : overloaded member function 'void (bool,char [],char [],char [])' not found in 'CProtocolSimulatorDlg'
I do not how to solve it, can somebody help me...........
|
|
|
|
|
Tsaejen wrote:
void CProtocolSimulatorDlg::OnBtnsend(bool condition1, char PortNo[10],char IPAddr[50], char Data[11])
It have error tell me that 'OnBtnsend' : overloaded member function 'void (bool,char [],char [],char [])' not found in 'CProtocolSimulatorDlg'
I suspect this means that this function is not defined in your header file. Why are you passing char arrays around ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think I do wrongly already. If I got a code below:
void SendData(bool condition1, char PortNo[10],char IPAddr[50], char Data[11])
{
int _PortNo;
if(condition1)
{
_PortNo=atoi(PortNo);
SOCKET CliSocket;
SOCKADDR_IN ServAddr; // used to specify a local or remote endpoint address to which to connect a socket.
WSADATA wsaData; // Create a WSADATA object called wsaData
WORD wError; // error flag
WORD wVersionRequested; //[in] Highest version of Windows Sockets SPI support that the caller can use.
int nBytesSent, nError;
wVersionRequested=MAKEWORD(1,1); // makes a request for the version of Winsock on the system
wError=WSAStartup(wVersionRequested, &wsaData);
if(wError !=0)
{
AfxMessageBox("Windows Socket Error");
condition1=FALSE;
}
else if(LOBYTE(wsaData.wVersion)!=LOBYTE(wVersionRequested)||HIBYTE(wsaData.wVersion)!=HIBYTE(wVersionRequested))
{
AfxMessageBox("Socket Version Not Correct");
WSACleanup(); // reset
condition1=FALSE;
}
else
{
CliSocket=socket(AF_INET, SOCK_STREAM,0);
if(CliSocket==INVALID_SOCKET)
{
WSACleanup();
AfxMessageBox("Cannot Initialize Windows Socket");
condition1=FALSE;
}
else
{
ServAddr.sin_family=AF_INET;
ServAddr.sin_port=htons(_PortNo);// takes a 16-bit number in host byte order and returns a 16-bit number in network byte order
ServAddr.sin_addr.s_addr=inet_addr(IPAddr);
nError=connect(CliSocket,(LPSOCKADDR)&ServAddr,sizeof(ServAddr)); // gives the amount of storage
if(nError==SOCKET_ERROR)
{
closesocket(CliSocket);
WSACleanup();
AfxMessageBox("Cannot Connect to Display Server");
return;
}
nBytesSent=send(CliSocket, Data, lstrlen/*returns the length in bytes */(Data),0);
if (nBytesSent==SOCKET_ERROR)
{
closesocket(CliSocket);
WSACleanup();
AfxMessageBox("Send Error");
return;
}
else
{
closesocket(CliSocket);
WSACleanup();
}
}
}
}
}
Where should I write it if I design a dialog that have edit box to type message and a button to send the message?
|
|
|
|
|
Tsaejen wrote:
Where should I write it if I design a dialog that have edit box to type message and a button to send the message?
In your header file:
void SendData(bool condition1, char PortNo[10],char IPAddr[50], char Data[11]);
in your .cpp file
void MyDialog::void SendData(bool condition1, char PortNo[10],char IPAddr[50], char Data[11])
{
//etc
}
Tsaejen wrote:
_PortNo=atoi(PortNo);
Why don't you just take a number here ? Taking a char [] is a pretty ugly solution, even a char * is better IMO, but a std::string is the best non int solution, IMO.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You mean I write the code in the header file? Or in eg:ProtocolSimulatorDlg.h or ProtocolSimulator.h? And the .cpp file also same as what I want to ask....
|
|
|
|
|
You've never added a method before ? You add the declaration in the .h ( that is, just the method signature, no code ), and the full code in the .cpp file.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
the declaration of the
void CProtocolSimulatorDlg::OnBtnsend(bool condition1, char PortNo[10],char IPAddr[50], char Data[11]) is missing in .h file
|
|
|
|
|
It seems that this declaration got deleted accidentally.
Just declare it in the header:
void OnBtnsend(bool condition1, char PortNo[10],char IPAddr[50], char Data[11]);
this is this.
|
|
|
|
|
In addition to the other suggestions, you would be wise to remove the hard-coded numbers from the parameter list (and either use empty brackets [] , or use char* instead). While syntactically correct, it just creates more work than necessary if you ever decide that the variables need to be changed to a different size.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello
I want a dialog box to remain visible untill some loop exits. Just like, during some processing, a dialog box with "Please wait..." appears. How to do that?
Thank you
Aqueel A. Mirza
We Believe in Excellence
|
|
|
|
|
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
That's from memory, probably wrong, but it's definately SetWindowPos to make a window topmost.
The other thing is, do your processing in another thread if you want the dialog to repaint itself during the operation.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
hey guys i'm developing an app under visual c++ 2003 and i'm trying to retrieve the equivalent of windows' path %SystemRoot% using some function or class(i'm trying to retrieve C:\Windows or E:\WINNT or something like this). i'm also trying to add a key to the registry. i know this may be easy to do but i'm a real programming n00b.
|
|
|
|