|
Look at the Custom Draw section in MSDN - here's a link[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
yeah
i was lokking to Handle NM_CUSTOMDRAW directly
its coming in WM_NOTIFY
Thanks i m working on that
|
|
|
|
|
it never reaches in the below case statement
case CDDS_ITEMPREPAINT:
|
|
|
|
|
Do you have any items? If not, it's not going to.
The code in the CDDS_PREPAINT case block is what causes the custom draw state machine to call your handler for CDDS_ITEMPREPAINT.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
i have got around 1400 items in my ListView
its reaching inside CDDS_PREPAINT case
|
|
|
|
|
Well, add the LVS_OWNERDRAWFIXED[^] style to your list view (preferably in the resource editor if you are working with a dialog template). Then, in the parent of your list view handle the WM_DRAWITEM[^] message, this gives you a DRAWITEMSTRUCT [^] structure that contains a DC you have to use to perform the drawing, use SetTextColor[^] to set a color before you draw the texts using DrawText[^]. Hope this helps.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
Is there any possibility to get Geo location using IP address ?
I also searched on net but could not get the desired stuff.
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
yes because I did not get satishfied answer
|
|
|
|
|
So we're getting again and again your question?
Please, go building, as suggested, your own database instead.
(just kidding, man...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Please give any suggestion, how to do it?
|
|
|
|
|
Since commercial applications and libraries uses large databases for the purpose, I suppose your effort would be a waste of energy.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Ok, please have a look on below link and guide me
<a href="http://mypath2us.com/post/2009/10/18/Get-Client-Geo-Location-in-C.aspx">http:
Is this correct way to do?
And free to use?
Any drwback to use it in my application?
|
|
|
|
|
The link you have posted has the solution, try using it.
It's time for a new signature.
|
|
|
|
|
john5632 wrote: Is this correct way to do?
That might be correct, but not very accurate (IMO).
john5632 wrote: And free to use?
It's free as long as you use, as suggested, a free webservice.
john5632 wrote: Any drwback to use it in my application?
Other than accuracy, you've to read carefully the terms of use for the webservice, I suppose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
... and you'll probably never get it, because IP addresses are not allocated that way.
Associating an address with a place is something that can be done only at a very high level. As you go down towards the single addresses the number of exception to the general rules are much and much more.
Every multinational company that own hos own autonomous system can get addresses on one regional registry, and displace them around his world. And there is no "central authority" collection all this informations.
What commercial software do is typically recourse into the provider's whois databases until they can. The answer this way can be 90% accurate.
But the problem is that the reamin 10% is not "almost accurate" is simply completely false.
If you wan more infos try google some of the buzzwords of this post.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
|
Download - C Library Module and link it to your app.
IP2Location C Library
http://www.ip2location.com/c.aspx
Developers can use the API to query all IP2Location™ binary databases for applications written in C
to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type,
area code and weather that any IP address or hostname originates from.
Sample Source Codes
#include <IP2Location.h>
int main()
{
IP2Location *IP2LocationObj = IP2Location_open("../data/IP-COUNTRY-SAMPLE.BIN");
IP2LocationRecord *record = IP2Location_get_all(IP2LocationObj, "161.11.12.13");
printf("%s %s %s %s %s %f %f %s %s %s %s\n,
record->country_short,
record->country_long,
record->region,
record->city,
record->isp,
record->latitude,
record->longitude,
record->domain,
record->zipcode,
record->timezone,
record->netspeed,
record->iddcode,
record->areacode,
record->weatherstationcode,
record->weatherstationname);
IP2Location_free_record(record);
IP2Location_close(IP2LocationObj);
return 0;
}
|
|
|
|
|
Case 1
I have created a sample MFC Static library which has the required function definitions in mfcextent.cpp and declarations in mfcextent.h. I have added a MFC test dialog based application for the MFC static library in the same workspace. I included the header file mfcextent.h in the test application project and made call to the 2 functions in the library StringToFloat() and IsNumeric(). When I build the MFC Static library, its build without any errors whereas when I build the test application its giving me link errors as defined below.
Linking...
ExMFCStaticLibTestDlg.obj : error LNK2001: unresolved external symbol "double __cdecl MFCExtensions::StringToFloat(class CString)" (?StringToFloat@MFCExtensions@@YANVCString@@@Z)
ExMFCStaticLibTestDlg.obj : error LNK2001: unresolved external symbol "int __cdecl MFCExtensions::IsNumeric(class CString)" (?IsNumeric@MFCExtensions@@YAHVCString@@@Z)
Debug/ExMFCStaticLibTest.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Case 2
When I created the same test application separately and added the static lib output file to the test application and included the header file mfcextent.h, its building without any errors and working fine.
Can anyone explain why case 1 is giving link errors. Am I missing out anything..?
Thanks
Mohan
|
|
|
|
|
manoharbalu wrote: added the static lib output file to the test application
So you have the answer. You must include the lib file in your project's linker options - Properties -> Linker -> Input.
It's time for a new signature.
|
|
|
|
|
Appreciate your help. Can you please explain it step by step how can i Link the lib file.
|
|
|
|
|
I thought just did. Select your project's properties and go to the Input item under Linker. Add the name of your lib file, and its location, then build your project and the link process should work.
This is assuming you are using one of the Visual Studio IDEs to build your project. If you need to do it manually then check the LINK options in MSDN.
It's time for a new signature.
|
|
|
|
|
I got it. Its working well. Thank you very much Richard.
|
|
|
|
|
You're welcome; good luck in your endeavours.
It's time for a new signature.
|
|
|
|