|
Haha~ ,so many people don't understand my question.What I want to ask is that when I call the SetPixel function,a dot appear in where I click the mouse,and I want to change the size of the dot.
In addition,I explain what function I want to perform.I open a bitmap which content is showing clothes in client area,and I want to get the border of the clothes through drawing manually.So I call the SetPixel in MouseMove to get each point I draw.
If I use MoveTo/LineTo I can't get the each point I draw.I can only get the begin and the end point.
I appreciate your suggestions.
|
|
|
|
|
Chen-XuNuo wrote: What I want to ask is that when I call the SetPixel function,a dot appear in where I click the mouse,and I want to change the size of the dot.
I had a feeling that's what you meant.
You can't change the size of a screen pixel. The size of one pixel on the screen is detemined by
the video resolution set for the monitor. All the pixels for a given resolution are the same
size.
That said, you can only go so small. For bigger "dots" you need to draw a cluster of pixels.
An easy way to do this is in Windows GDI is to use a pen with a thickness the desired size.
I'm not sure what's going wrong with your MoveTo/LineTo code. You'll need to post an example
of how you set up the DC and make the calls so we can better help you.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have developed an Windows socket application. It is being compiled successfully. But when I built it, it shows following errors which are related to winsock2.h file. I have included that file in the Include files path, and also the library file ws2_32.lib is there in the library path. The settings seem to be OK. Then also following error comes.
1>Linking...
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "unsigned long __cdecl GetHostAddress(char const *)" (?GetHostAddress@@YAKPBD@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "void __cdecl SendString(unsigned int,char const *)" (?SendString@@YAXIPBD@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>.\Debug/HTTPRequesttry.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://e:\ProgramFiles2\Microsoft Visual Studio\myprojects\HTTPRequesttry\Debug\BuildLog.htm"
1>HTTPRequesttry - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If anyone knows the solution please help me.
Thanks for the prompt reply.
Dhaval
|
|
|
|
|
Whats your IDE and your application type if you include Ws2_32.lib (you said included) I think it must works.
|
|
|
|
|
I have also got the same error of LNK2019 and I am using visual studio 2005. I have included ws2_32.lib as he has also done.
How should I proceed if you know.
Thanks for prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
I checked again gethostbyname on the VS2003 and also on the Vs2005 it needs to Winsock2.h if you get this error error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced you must import ws2_32.lib to Additional Dependencies of your project but if you get gain this error see Michael answer I think it will be solve your problem.
|
|
|
|
|
We use to include ‘WinSock’, but you may want to try including ‘AfxSock’ (Microsoft specific).
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
hi!
how do i define a callback function with assembly language in asm_ block? (in VC++ project)
Zo.Naderi-Iran
|
|
|
|
|
You will have to be more specific.
BOOL CALLBACK My_EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
__asm
{
...
}
}
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
i add an section to my exe file, then my cods should be asm language.
in code of this section i call myFunc. one of parameters of this function is address of a callback function.
callback function is defined end of asm code (before end of asm block), and i calculate address of this function to send to myFunc function.(correctly)
but my exe encounter "Don't send" error.
how do i return of callback function to main address of code?
for example to call "ExitThread" i return of thread to main address of code
_asm<br />
{<br />
....<br />
push addressOfCallbackFunc<br />
call myFunc<br />
....<br />
jmp End<br />
<br />
CallbackFunc:<br />
....<br />
ret
<br />
End:<br />
}
Zo.Naderi-Iran
|
|
|
|
|
Can any one help me to implememt Client Login Module using X.25 Protocol.
I want to make comnnection between Client and server using X.25 protocol through VC++.
Thx.
-- modified at 12:35 Saturday 14th April, 2007
|
|
|
|
|
Friend me too need de same codings for this..
if u got the coding
pls pls mail me in my id nirmal.atr@gmail.com
|
|
|
|
|
hi
I am using CImage Class(ATL) to Load and Save PNG's.There are some memory leaks with the class.
Are there any alternative image libraries like CxImage etc which can perform the same functionality??
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
You was used of CImage class or CXImage calss however you can use of GDI+ for load,save and.. other operations on files
|
|
|
|
|
QuickDeveloper wrote: I am using CImage Class(ATL) to Load and Save PNG's.There are some memory leaks with the class.
Really? Do you have an example of code that leaks in the CImage class?
Alot of people use that class and I'm sure they'd like to know.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
GDI+
Kinda slow, and the interface is kinda clunky but it gets the job done
|
|
|
|
|
hi evryone
i create one singleDocument project than drived from
CFormview,with one dialogbar in its left.
how i can replace myTitlebar(Bitmap) with main title?
(in mainframe)
please help me
|
|
|
|
|
explain your question, pleas;P
Zo.Naderi-Iran
|
|
|
|
|
How to set OnFieldchangedLIPadd function to dynamically created ip Address control.
IP address control is created by,
m_cTab.CreateIPEdit(" ", 10, 0, P_LEFT | P_TOP, 130, 0, 130);\
This control is placed inside the tab control.
How to do this?
Is any way to change the value in the second IP address control when tab is leave from first one.
Both are created Dynamically.
-- modified at 3:00 Saturday 14th April, 2007
|
|
|
|
|
Dear All,
I need to split the video file e.g any .wmv,avi,mpeg any type of file by their play length.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Do you want to split a mpeg file to two mpegs ?
|
|
|
|
|
yes sir,
not only mpeg but also supported all media files.like avi,mp4,mpeg etc. ya I find the solution from the encoder 9 sdk. but I think at that time I need your help.
Thank you very much for your response.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Hello all,
When I migrated from visual studio 6.0 to visual studio 8.0 and compiled my project which was built in visual studio 6.0, I got following errors. Can you tell me what might be the problem.
1>Linking...
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "unsigned long __cdecl GetHostAddress(char const *)" (?GetHostAddress@@YAKPBD@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "void __cdecl SendString(unsigned int,char const *)" (?SendString@@YAXIPBD@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>HTTPRequesttry.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "int __cdecl SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@@YAHPBD0PAEKPAUHTTPRequest@@@Z)
1>.\Debug/HTTPRequesttry.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://e:\ProgramFiles2\Microsoft Visual Studio\myprojects\HTTPRequesttry\Debug\BuildLog.htm"
1>HTTPRequesttry - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Thanks for Prompt reply.
Dhaval
|
|
|
|
|