|
Have you tried SetSel to move the caret to the end of the text, so this way it doesn't have to scroll it into position.
SetSel, I think that's the name, should take 2 parameters, the first selected character and the last selected character. If they are the same, then it just moves the caret to that position.
Should be something like...
int Length = GetLength();
SetSel(Length, Length);
SetSel may even have a third bool parameter too that tells it whether to scroll to the newly selected text.
Using SetSel and telling it to scroll to the newly selected text may even fix the other scrolling problem. Good Luck.
|
|
|
|
|
thanks, SetSel only has 2 parameters.. anyway i meant even if the selection was at the end of the text it still tries to scroll it in its way (like line by line) which causes the flicker, when i try to force it stay down it first goes up one line and then down
i hope this made sense.. if not please tell me and ill explain again :P
if there was a way to slow down the PC a lot or just the application you could see it very clearly whats happening lol
btw i dont think i have said this before.. but if you look at MSN Messenger you will see that it doesnt have any flickering problem and im pretty sure it uses the rich edit control.. but yea its made by microsoft so they know the rich edit's secret lol
but theres also GameSpy Arcade.. which works without a problem i dunno how they do it.. all i see is that they put in a custom scrollbar.. but i dont see how that helped this is because of auto vscroll, actually really check this out.. remove the auto vscroll property and it will never flicker.. you have to remove vertical scroll as well..
|
|
|
|
|
I have a windows client application, which I want to use to communicate with a server application running on a different machine in the same LAN. To make it user friendly, instead of asking the user to input the host IP addres of the server to the client application, I want the client application to do a query in the LAN, and find out what the candidate server's IP address is, and all the user has to do is to confirm that that's the one to communicate with.
I have no clue how I can get this done. Any hint would be greatly appreciated. Thanks a lot!
|
|
|
|
|
This[^] control will provide the source code to determine the list of visible servers on the LAN.
/ravi
|
|
|
|
|
ravi, Thank you for the link.
but the server I am thinking of is not a generic server. It's just an application which runs on another computer, but serves as server in a client/server software.
maybe I can use broadcast function, but is there any better way to implement it?
for example, D-Link has a network storage adapter DNS-120. It has a built-in FTP server, so files can be accessed over the internet, when the disk is connected to this adapter. It has an application called "Easy Search", which is to easily locate DNS-120 units for configuration.
What I want is similar to this "Easy Search", that is, click a button on this "Easy Search" application, it will return the IP addresses of my "DNS-120" units in the same LAN.
English is not first language, so I hope I made myself a bit more clear now.
Thank you for any hint!
|
|
|
|
|
lucy wrote: application called "Easy Search",
Discovery mechanisms such as this (and license severs) work by listening on a specific port. The server code needs to support a ping/ack request, in which case, all you need to do is ping the specific port on all visible servers in your LAN. The ones that respond are eligible candidates for your client.
The ping/ack support can be made more useful if the server is smart enough to return additional information (eg: load, etc.) which would make it easier for your clients to select the appropriate one.
Hope this helps!
/ravi
PS: Your English is fine.
|
|
|
|
|
thank you very much, ravi.
now I understand the principle. Is there any tutorial material I can read to learn more? I'm pretty new to the network programming. what I have done is limited to very basic stuff, such as one-to-one send/recv applciation.
thanks again!
|
|
|
|
|
lucy wrote: I want the client application to do a query in the LAN, and find out what the candidate server's IP address is...
Use NetServerEnum() for this.
Once you can successfully enumerate through all machines in your LAN, then you can go about "pinging" their ports.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
lucy wrote: I then found this article:
http://www.codeproject.com/internet/ipaddress.asp[^]
It seems to have an unnecessary call to gethostname() , as szHostName is not used for anything.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
change the form view class at run time
ahmed
|
|
|
|
|
is that a question ?
is that an order ?
is that a suggestion ?
|
|
|
|
|
anmllll wrote: change the form view class at run time
which form view class
|
|
|
|
|
|
I am trying to create a "Wife is coming" button. The present process of deleting the brower history, temporary internet files, cookies, etc has too many clicks and is too time comsuming (considering the wife is coming and will go straight to the history to find evidence of my porn surfing -- yeah, i'll say it; i'm whipped).
Anyway, I need a 1-click solution. I already know how to create an icon in the internet explorer task bar that will run a .exe or .vbs file using regedit.exe. Now I need a file to run that will do what Internet Explorer does when it deletes the cache, history, etc that I can link to the icon in the registry.
I know that when I click the "Delete All" button in IE7, the rundll.exe process turns on for a few seconds until the cache is clear, then ends when it is finished. What I need to know is what .dll is being run to delete the cache and can I create a .vbs file that can do the same thing?
Any help I can get is greatly appreciated.
Matt
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
That's almost what I am looking for, however, what I really need is a .vbs or .bat file that will use rundll.exe to do everything. Is this possible? How does IE7 delete it's history/cache? I am almost certain it uses rundll.exe. I just don't know which .dll it uses. (possibly wininet.dll or occache.dll???) Even if I knew which .dll is used, I need the correct code to make the .dll delete everything I want it to delete.
|
|
|
|
|
Honestly, I would look for a program called CCleaner
It basically is a secure "wife is coming" button. You can just have it erase once instead of the DoD 15 times or w/e it is, that'll make it faster.
If you were looking to make your own for the challenge tho, I really don't know; I'm just suggesting something that's already out there.
|
|
|
|
|
How can i get the system time and display it?
|
|
|
|
|
shamsteady wrote: How can i get the system time...
Use GetSystemTime(), or time() .
shamsteady wrote: ...and display it?
Use printf() , or cout .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It said GetSystemTime() is undeclared. Am i missing something?
|
|
|
|
|
shamsteady wrote: Am i missing something?
Yes, the inclusion of a header file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
shamsteady wrote: Yes, the inclusion of a header file.
shamsteady wrote: t said GetSystaremTime() is undeclared. Am i missing something?
which compiler are you using@!
|
|
|
|
|
Also, you can use the time_t structure.
time_t t;
time(&t);
cout<<ctime(&t);
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
See
SYSTEMTIME m_SysTime;
char DisplayTime[255];
::GetSystemTime(&m_SysTime);
sprintf(DisplayTime,"%d/%d/%d...%d::%d::%d::%d",
m_SysTime.wMonth,m_SysTime.wDay,
m_SysTime.wYear,m_SysTime.wHour,
m_SysTime.wMinute,m_SysTime.wSecond,m_SysTime.wMilliseconds);
|
|
|
|