|
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[^]!
|
|
|
|
|
LOL, I have seen that problem and never knew why it didn't work. (Not like I really thought about it). You get it in your mind that you are declaring and instance and you don't even realize you are doing a prototype.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hua-Ying Ling wrote:
PS is there anyway to keep the forumn from interpretting my code as a smiley?
You may insert an space between pair of characters that are interpreted as smileys. For example, inserting a space beteen a colon and a right parenthesis.
This is a smiley
This is not a smiley : )
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hello all; I have a little problem that's been perplexing me for a bit now. Any help would be greatly appreciated.
Basically, I've written a class library that others can use to write DLL plugins for an application I'm developing. Being the thoughtful guy that I am ( ), I decided it would be nice to allow the writers of these plugins to step into routines in my class library with the Microsoft Visual C++ debugger.
The problem is that it seems the debugging information in the debug version of my library refers to its source files by absolute path - so it's possible to step into them with a debugger, but only if you have the exact same source directory structure as I used to build the library.
So what I'm wondering is, is there an easy way to make it convenient for the users to step into my library at debug-time? Will they be forced to replicate my directory structure, or is there a better way?
I'm using Microsoft Visual C++ 6.
[Insert witty and relevant signature here]
|
|
|
|
|
In my experience, when the IDE can't find a source file in the exact path indicated in the debug info, it prompts where to find the appropriate file. The next files it need to open will then be picked from the same folder.
Another possibility that may work in some situations (e.g.: a small team of developers) is to use mapped network drives as a way to introduce an indirection. I'm not talking about everyone accessing the files through the network, just using the same drive letter.
For example:
Suppose that in your machine, your sources are located starting at:
C:\Projects\Useful\Shared\SuperLibrary
You can create a share for the folder at C:\Projects\Useful\Shared. You don't need to give any permission to anyone but yourself if you don't want.
You can map a network drive, say S:, to the share in your own machine created before.
Then you open the project using the network drive, that is, instead of opening the project at C:\Projects\Useful\Shared\SuperLibrary, you open the one at S:\SuperLibrary (which of course is the same) and build the library. The debug info would then contain references to S:\SuperLibrary instead of C:\Projects\Useful\Shared\SuperLibrary
Now the other developers, can do exactly the same, except that their maps would make S: correspond to another folder share in their own machines, wherever they have copied the sources.
However, I seem to recall this solution does not work if you aren't actually conected to some network.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|