|
i need a little pascal language knowledge,
who can give me a good link for that?
is semicolon ";" useful in pascal? i am really confused.
thx
includeh10
|
|
|
|
|
In Pascal, the semicolon is used to separate (not terminate) statements. A separator is required at the end of the statement, unless the statement is followed by another separator (i.e. a block terminator like end or until ).
The following code fragments are both valid:
if (someCondition())
then
begin
y = 0; { semicolon required }
x := 1 { semicolon optional because next token is "end" }
end;
if (someCondition())
then
begin
y := 0;
x := 1;
end;
Since it doesn't hurt to always separate statements with a semicolon, it's best to just always use it (as in C).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
just a little note
anything between {} is a multiline comment
|
|
|
|
|
|
Hello,
I'm interested in creating a menu bar, which is very similar to the explorer menu bar.
I've found some information here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/faq/iemenubar.asp
In this article it is explained that the menu bar is actually a modified toolbar.
The problem I have is how you could achieve the appearance of the menu. (the bar a the top)
The menu items are totally flat and if you move your mouse pointer over a specific item it is highlighted. (the background gets blue, the text color switches to white)
Did they implement their own drawing routine or did they use some standard drawing mechanisms?
|
|
|
|
|
If you don't care about menu customization, you could instead just use Bruno Podetti's excellent NewMenu[^] class.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi, I'm about to make a class which can take care of some console IO, but i have a problem, in the bottom of the header(under class definition) i have added a function like this:
static inline cIOManager &endl(cIOManager &io)
{
io.CursorPos(io.StartX(),io.Y()+1);
return io;
}
But the problem is that i gets the following linker errors:
IOManager test error LNK2019: unresolved external symbol "public: void __thiscall cIOManager::CursorPos(short,short)" (?CursorPos@cIOManager@@QAEXFF@Z) referenced in function "class cIOManager & __cdecl endl(class cIOManager &)" (?endl@@YAAAVcIOManager@@AAV1@@Z)
IOManager test error LNK2019: unresolved external symbol "public: short __thiscall cIOManager::StartX(void)" (?StartX@cIOManager@@QAEFXZ) referenced in function "class cIOManager & __cdecl endl(class cIOManager &)" (?endl@@YAAAVcIOManager@@AAV1@@Z)
IOManager test error LNK2019: unresolved external symbol "public: short __thiscall cIOManager::Y(void)" (?Y@cIOManager@@QAEFXZ) referenced in function "class cIOManager & __cdecl endl(class cIOManager &)" (?endl@@YAAAVcIOManager@@AAV1@@Z)
I don't know why these are there, in the definition of the class i have:
inline void CursorPos (short pX,short pY);
...
inline short Y();
...
inline short StartX();
And in the source(.cpp file) file i have these lines:
inline void cIOManager::StartCursorPos(short pStartX,short pStartY)
{
...
}
...
inline short cIOManager::Y()
{
return mCursorPos.Y;
}
...
inline short cIOManager::StartX()
{
return mStartCursorPos.X;
}
So i really can't understand why i gets linker errors, can someone please explain?
|
|
|
|
|
|
Hi!
i have a client server application
the server waits for the client to establish a connection and then recv some data
my problem is if the client sends one byte of data the server gladly acepts it but when the client sends two or more bytes then after sometime the client receives one byts first then the next byte(s) .As s result byte shiftin takes plave and my programs goes haywire
Help!!!!!!!1
|
|
|
|
|
if you know the amount of bytes the server have to receive, you can while until that amount is not received entierely (and until an error didn't occur)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanx but i already tried that!
it is a little crude way of doing things
Also my problem is that i donot know how much data i am going to get in one go?
if any other method can be aplplied then please help!!!!
|
|
|
|
|
Siemensiana wrote:
Also my problem is that i donot know how much data i am going to get in one go?
but the sender knows how much datas it sends...
so, you could send first an int with the number of bytes that are about to be received, then send the packet.
This way, the receiver will catch the value, and enter a while loop until that amount of data is not received entierly...
is is good for you like that ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
thanx man
that did solve some of my problem
but in my case the sender is a third party system
hence i donot know how much the sender is going to send
I cannot pass an "int" there can i?
hence am still stuck in the same old problem
|
|
|
|
|
Please can you show me any links where I can get information about working with DEBUG in Visual C++.Net
cause Im experiencing big difficulties in error finding.Thank you.
|
|
|
|
|
you can add some TRACE() , some breakpoints, and look where the program freezes
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
How can I create a program that is executed when the computer is switched on. I want to do this to check how many times the internet has been accessed using the internet explorer
hiran
|
|
|
|
|
wow, don't mix everything. when the computer "switch on", the BIOS loads the operating system, which can be Windows for example. then, windows loads all its components, and only there, is ready to load a session (user).
you can add you program into the start folder of the start menu (not sure of the right path in english versions of windows, and depends also of the OS), or add a key in the registry in the list of the programs that are to launch when a user's session starts.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi all,
I am using "QSetup Composer demo" for creating a installer of application.
The application need to contact server for getting some info.( the application will read the server name from Registry).
I am facing problem to set the name of the contact server in the installer programm into client machine regisrty.( which user will enter at the time of running setup for application).
Thanks in Advance
Abhi Lahare
|
|
|
|
|
Hi.
I am newbie to this website. I have some questions. My first question is about how to implement self-extracting installers? These programs have the ability to extract files stored within their executables. Secondly, most programs including compilers have the ability to create brand new .EXE files. I know that i can write an interpreter of any new or old language but how to make an independent EXE which can run without the interpreter?
Thanks in advance.
Waiting for your replys.
I just looked around this website. I must say that it is a very nice site for programming. Comprehensive articles are also available. A complete separate section for MFC controls, including subclassing, etc. I also liked the DirectX section. Complete game making like Tetris, RaceX, etc. is given which helps not only to understand game programming but also to inspire our own ideas. Keep up the good work
|
|
|
|
|
If all you need to do is create a single-EXE installer, then try Inno Setup[^].
Software Zen: delete this;
|
|
|
|
|
hi,buddies. Happy new year!
The problem of mine is:
I have a series of bmp. I wanna to make them into AVI. I have used AVI*** funtion in vfw32.lib to do this job. And i used ICInfo function to collect all installed codec in windows system. The problem is that why not every "fcchandler" got by ICInfo can be used by AVIMakeCompressedStream?
who knows the secret?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi
I want to display to the user if the WEB site,that he is is protected by SSL.
For this i want to get from the WEB server the client certificate object.
I have a problem to send the request to the server.
This is my code
HINTERNET hOpen, hConnect, hReq;
DWORD dwFlags = INTERNET_FLAG_NO_CACHE_WRITE |
INTERNET_FLAG_KEEP_CONNECTION |
INTERNET_FLAG_IGNORE_CERT_CN_INVALID |
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|
INTERNET_FLAG_PRAGMA_NOCACHE;
char *lpBuffer, szData[51];
INTERNET_PORT dwPort;
wchar_t* accept[2]={L"*/*",0};
if ( !(hOpen = InternetOpen ( "HeadDump", INTERNET_OPEN_TYPE_PRECONFIG , NULL, NULL, 0) ) )
{
ShowError ( GetLastError(), "InternetOpen");
return false;
}
if ( !(hConnect = InternetConnect ( hOpen, url, dwPort,""/* user*/, ""/* password*/, INTERNET_SERVICE_HTTP, 0 , 1) ) )
{
ShowError (GetLastError(), "InternetConnect");
return false;
}
if ( !(hReq = HttpOpenRequest (hConnect, "GET", url, "HTTP/1.0", "", (const char**) accept, dwFlags ,1 )))
{
ShowError (GetLastError(), "HttpOpenRequest");
return false;
}
again:
//Resolver::Trace("Send Request = " + data);
std::string header = CONTENT_TYPE_STR;
if ( !HttpSendRequest (hReq, // handle from HttpOpenRequest
NULL,0, NULL,0) )
{
ShowError (GetLastError(), "HttpSendRequest");
dwFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA |
SECURITY_FLAG_IGNORE_REVOCATION |
SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP |
SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS |
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
if ( !InternetSetOption (hReq,
INTERNET_OPTION_SECURITY_FLAGS,
&dwFlags,
sizeof (dwFlags) ) )
{
ShowError(GetLastError(),"InternetSetOptionFailed");
return false;
}
}
I'm new in VC++.
Help me please with my question
|
|
|
|
|
Hi all:
I want to write a web link to Favourites folder, How can I do that. I know how to get the system Favourites folder directory. other than that I don't have any clue.
|
|
|
|
|
|
MFC Supports Print preview only for applications with Document/View Architecture. I'd like to print from the Modal dialog and also want to have Preview Dialog. Any Samples already there?
|
|
|
|