|
Hi
In my application ,I have a clock with a single line revolving at the rate of 1rev/sec.
But i get a flickering display every time the hand moves round the dial. what do i do to avoid the flicker?
Mine is dialog based display , the static text box is the canvass for the display.
Pls help
|
|
|
|
|
Where you have written code for this ?
Overrid WM_ERASEBKGND and simply return TRUE from it.
|
|
|
|
|
hi i am susanta. I dont know how to resize a bitmap.
I want load a bitmap by clicking a toolbar button and then want to resize it as per my requirement. I m able to load the bitmap but dont know how to resize it...
If anybody knows anything how to do it please help me..
I will be thankful to him
Susanta Ku.Muni
|
|
|
|
|
Susanta578 wrote: hi i am susanta.
Oh I see.
Please go through this[^] article. It would help you.
He is no fool who gives what he cannot keep to gain what he cannot lose.
- Jim Elliot
|
|
|
|
|
Susanta578 wrote: I dont know how to resize a bitmap
A way is you can use of StretchBlt but quality of image will low
|
|
|
|
|
Hi,
How can i find out that an PC is connected to Network or not.
The Idea that i have is to find its IP address.
If the IP is "127.0.0.1" then it's not connected to any network.
Is this idea correct.
Help me to get the wright Concept
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Look at the back of your computer. The network card/interface usually has 2 LEDs. One usually means "connected", the other one indicates traffic. If both LEDs are dark, you most probably have a faulty network card.
If you have at least one steady light, you should fire up a command line ("cmd.exe") and display the IP configuration ("ipconfig"). Find your LAN-connection. Look at the IP-Address:
If the IP-address is in the range of 169.254.0.1 to 169.254.255.254 and the Subnet-Mask is 255.255.0.0:
Chances are your (Windows-)computer is configured to obtain an IP-address automatically, but could not reach the DHCP-Server. You are then not in the same network as any computer with a DHCP-assigned IP.
If the IP-address matches one of the following descriptions
10.*.*.*
192.168.*.*
172.16.*.* to 172.31.*.*
you probably have received an IP-address from an DHCP-server, which usually indicates that you are connected to a network.
If you seem to be connected to a network, examine the "Standard Gateway": If this is set to an address in your network, you probably have a problem with a firewall or router blocking your network traffic. If this is set to "nothing", DHCP configuration may have failed.
If everything seems to be ok this far, try pinging a known server in your network by IP-address and by hostname. If the ping at the address is successful, but pinging the hostname fails, your network's DNS-server (if any) might be botched up.
Try issuing "release" and/or "renew" commands with IP-Config (for the correct syntax, see "ipconfig /?".
For more info, try "http://www.windowsnetworking.com[^], http://support.microsoft.com/kb/164015[^], http://www.microsoft.com/technet/network/evaluate/technol/tcpipfund/tcpipfund_ch16.mspx[^], http://support.microsoft.com/kb/172218[^] and the Online Book "TCP/IP Fundamentals"[^].
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Look at the pre-last post at this page:
http://www.codeguru.com/forum/archive/index.php/t-103765.html
It contains the function you need.
-------------------------
Don't worry, be happy )
|
|
|
|
|
That function works? hmmm I have my doubts
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
It worked a bit ago, when I used it for some project...
Win32 contained a function named [CODE]IsInternetConnection()[/CODE], but I can't find in MSDN. Strange.
-------------------------
Don't worry, be happy )
|
|
|
|
|
It probably works but I don't believe it accurately indicated whether a machine is connected to
the internet though....maybe on a specifically configured network...
Actally I just reread it - in the context of dialup maybe it's ok. On a LAN though, I
don't think so.
I was just sceptical, that's all
The OP's question to me is petty vague. Does he want to know if there's a network adapter, if
the cable's plugged in, is there internet access...
Cheers!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
You're right (to some extent).
If you're accessing internet through NAT/router, you won't get correct results.
But function works ok for direct connection... that was the question, I guess
Best regards,
Dmitry.
-------------------------
Don't worry, be happy )
|
|
|
|
|
Hi all,
I have the following class, with structure and function:
class CIniFile
{
public:
struct Record
{
string Comments;
char Commented;
string Section;
string Key;
string Value;
};
static vector<Record> GetSection(string SectionName, string FileName);
So now I call the function:
vector<CIniFile::Record> s = CIniFile::GetSection("Client Files",IniFileName);
My question is how can convert s to a string ?? Or is there another way of getting it to a string or char*.
Many Thanx
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Programm3r wrote: My question is how can convert s to a string ??
Can you explain a little clearer ?
Do you want to know , how to access members of Record in the class ?
|
|
|
|
|
prasad_som wrote: Do you want to know , how to access members of Record in the class ?
Yes, but I think I solved the problem thanx prasad_som....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Programm3r wrote: problem
|
|
|
|
|
|
|
It seems like I forgot to export the function in the other dll (in the def file), but it's working now ....
Thanx anyway
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Do you mean , this function is in dll and you are using it ?
You need to link its .lib in to client lib,. Have you dont this ?
|
|
|
|
|
Yes, I have already link the lib file. It's actually one dll calling another, but in the one dll I forgot to export one of the functions. When I changed the dll so that it exports the function everything seems to be working. But thanx alot for your input prasad.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
|
Possibley you are deleting corrupted memory. Actually, call stack should show you where it is occuring.
|
|
|
|
|
The exception occurs right before my dll terminates ... the debugger refered to assert , would this make a difference?
Debug Assertion Failed!
File: dbgheap.c
Line: 1252
Expression: _CrtIsValidHeapPointer(pUserData)
For more information see the VS C++ Documentation on assert
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Again same, its is dues to corrupting memory. One typical example would be,
char *p = new char[10];
strcpy(p,"string greater than 10");
delete []p;
or
char *p = new char[10];
delete []p;
delete []p somewhere from program.
|
|
|
|