|
|
hi,
i want to use mysql in c++.
i think i need to to download driver or library first.
is mysql.h right c++ head file?
is it inside mysql package?
what files are its lib and dll? where are they?
thanks
includeh10
|
|
|
|
|
|
i don't think it is a good idea to read the huge documents.
includeh10
|
|
|
|
|
thats a shame - in those two references, and the info isnt that hard to find, is all you need to know ..
Im not a mysql expert - I only knew where to find the info - maybe you'll get lucky and someone will give you the exact answer you want, on a plate - if you want to wait that long - else it may take an amount of searching, nouse, and/or self drive .. if you cant be bothered, stick to vb
'g'
|
|
|
|
|
This is another GDI+ question:
Does anyone know how it is possible to randomly /select/draw/get coordinates of/ a point on a circle line of drawn circle?
Thanks in advance,
Sincerely,
Max Pastchenko
|
|
|
|
|
|
You question is not entirely clear. From a general perspective if you need to generate a random point on the circumference of a circle you could generate a random number between [0,360)and then, given that you know the radius and centerpoint of the circle transform your random angle to get the coordinates you need. I do not know what built in function there are for this, but simple geometry will give you the coordinates. You know the origin (centerpoint of your circle) which is a general (x,y) pair. You now also know the angle of a triangle and the length of the hypotenuse. Use trig to compute the x and y offsets: r * sin(theta) = y; r * cos(theta) = x.
I hope this helps. Check my math, my trig my be rusty.
|
|
|
|
|
This is quite helpful. Thank you
Sincerely,
Max Pastchenko
|
|
|
|
|
I want display data to CEdit Control. but I have trouble to show data in a proper format.
What I want to do is show data 16 charactors per line, when reach to the end, start next line. It's pretty simple, but I just failed to figue it out.
Please help me out.
|
|
|
|
|
One way that might work for you is read the data into an temp stirng array and insert '\n' after 16th char. After you finish with the data, then set it to the edit control.
|
|
|
|
|
It won't work. I programed like this:
m_showEdit.ReplaceSel("1234\n\r5678");
it shows 12345678. not
1234
5678
weird!!! any idea?
|
|
|
|
|
Anonymous wrote:
m_showEdit.ReplaceSel("1234\n\r5678");
Use \r\n instead, and make sure the control has the ES_MULTILINE style.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
One fairly simple way to achieve this effect would be to insert a newline every 16 characters before you set the text to the control. Something like this:
void CSomeDialog::SetEditText(char* text)
{
CString str(text);
for(int i = 16; i < str.GetLength(); i+=16)
{
str.Insert(i, "\r\n");
i+=2;
}
m_edit.SetWindowText(str);
}
[Insert witty and relevant signature here]
|
|
|
|
|
It won't work. I programed like this:
m_showEdit.ReplaceSel("1234\n\r5678");
it shows 12345678. not
1234
5678
weird!!! any idea?
|
|
|
|
|
The carriage return must preceed the line feed, try:
m_showEdit.ReplaceSel("1234\r\n5678");
PS. Also check you've enabled multiline support for the edit control (needs to have the ES_MULTILINE style)
Gavin Taylor
w: http://www.gavintaylor.co.uk
|
|
|
|
|
U should changed the property as MULTILINE
|
|
|
|
|
I got it. Thanks for all your reply.
|
|
|
|
|
I am trying to read text from an edit box in another program. Normally that wouldn't be a problem if the handle to the edit box is known. However I can't seem to find a way to retrieve the handle, I tried using spy++ but it can't find the edit box, only the parent window. I suspect it's a vb6 application because the parent is a ThunderRT6FormDC.
I did some searching around the internet and found several programs which are able to retreive the text: Babylon Translator, Snagit and Deskperience. This last program shows the handle of the window, this handle is the one of the parent window, so there is gotta be some way to capture the text using this handle. Unfortunately I can't find any programs with the source code provided which can capture the text.
I did some aditional testing with Snagit and Deskperience, these programs are also able to retreive the filenames from a SysListView32 in windows explorer. Using spy++ only the useless FolderView windowtext can be retrieved.
Has anyone any ideas on how to retrieve more texts than spy++ can?
|
|
|
|
|
how i make a delay time (expl. 3 second) for my process, example:
for( i= 0, i<8, i++)
{
"delay 3 second"
....
}
show me the code please
|
|
|
|
|
In Win32, Sleep(3000) should do the trick. [Sleep() accepts a number of milliseconds, so Sleep(3000) will sleep for three seconds.]
[Insert witty and relevant signature here]
|
|
|
|
|
Or you can CreateEvent() and WaitOnSingleObject() on that event if you dont want to trust sleep().
|
|
|
|
|
msnet wrote:
show me the code please
you can use QueryPerformanceCounter and QueryPerformanceFrequency too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I'm using the VS .net 2003 compiler.
For some reason when create an instance of a class with:
ClassName instance();
the default constructor doesn't get called.
If the instance was created with:
ClassName instance;
It does call the default constructor;
The code is pretty simple:
ClassName::(void)
{
Init();
}
PS is there anyway to keep the forumn from interpretting my code as a smiley?
Thanks
Hua-Ying
|
|
|
|
|
ClassName instance(); This is an unfortunate problem with the weird C++ syntax. The above is not parsed as a an object construction, bur rather as the declaration of a function taking no arguments and returning a ClassName . Hence the problem. Just drop the () and your compiler will be happy. See this article[^] by Herb Sutter for a more detailed explanation.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|