hi guys, am having problem with angle rotations.. i already have the formula, double fangle; double m_iAngle; m_iAngle = 45; POINT centerPt; centerPt.x = m_nCarX + 161; // which s is the x origin centerPt.y = y + 52; // which s is the y origin fangle = m_iAngle / 180. * 3.1415926; float OrX = (float)(centerPt.x - cos(fangle)*centerPt.x + sin(fangle)*centerPt.y); float OrY = (float)(centerPt.y - cos(fangle)*centerPt.y - sin(fangle)*centerPt.x); //tyre spoke dc.SelectStockObject(GRAY_BRUSH); dc.SelectObject(m_penTyreSpoke); for(int count = 0, count < 4, count++){ //spoke1 dc.MoveTo(m_nCarX + 161, y + 52); dc.LineTo(m_nCarX + 161, y + 41); } //see image here: http://h1.ripway.com/lgmanuel/Imgs/car.png[^] as you see in the image. the car's tire has only one spoke. am trying to loop the code to have 4 (four) spokes on my rim by bending the angle 90 DEGREES.. adding a 90 DEGREES on LOOP... //should look like this images bellow: http://h1.ripway.com/lgmanuel/Imgs/car-with-rim-spoke.png[^] help guys.. check the project bellow.. thanks ahead.. http://h1.ripway.com/lgmanuel/VisualCPP/GDICarSample.rar[^]
lgmanuel
Posts
-
Help with Angle Rotations pls.. -
INT TO STRING?... helpi can't convert int to CString.. need help pls.. here is my code, i want to print whatever the value of count is on a STATIC TEXT Control.. count += 1; atoi(count); m_StaticText.SetWindowText(_T("try lang = ")+ count); i got------> error C2664: 'atoi' : cannot convert parameter 1 from 'int' to 'const char *' thanks ahead..
-
new line on Edit Control...hi guys... when i press enter the app just closes.. how do i make a newline on a edit text field? what i am trying to do is print whatever is typed on the edit control and show it on the static. i did all that.. the problem is when i try to press the [Enter] on my keyboard, the app just closes, what i want to do is make a 'newline' just like in notepad when i press [Enter].. i already set the Edit box to multiline, still NO-Go-AMIGO... need help guys..thanks ahead..
modified on Sunday, August 1, 2010 11:41 PM
-
swap two values withou using temp. storagehi guys need help about my problem, am trying to swap the values of 'x' and 'y' without using a temporary storage like 'z'.. here is the code int x = 150 (or any integer value); int y = 45 (or any integer value); output: x = 45 y = 150 help guys, thanks ahead.
-
PHP/SQL -> Duplicate data on Insert when Page is refreshedHi guys., am having with duplicate entry on the DB when the Page is refreshed.. any solution please,. what am trying to do is when the data is added, the portion of the page loads, not the whole page, am using AJAX to load potion of the page.. help guys, thanks..
-
How to Move an MFC Button. [modified]yup., one of my nerd friends is helping on the networking side of the app.. needs to read about Socket Buffer and Listening.. anyways., got a lot of hints from you guys on how to start my C++ adventure, hope it works for me., am trying to change my programming path from VB to C++., i wish myself good luck. Thank you again.
-
How to Move an MFC Button. [modified]how do i disable the left and right button when the window load.. and enable it back when press the center button?
-
How to Move an MFC Button. [modified]hi, i have another question? am trying to connect two computers on the network whit the same App that i created, how do i connect these 2? it should prompt the user that the connection is successful? help guys. thanks
-
How to Move an MFC Button. [modified]this is a step forward.. thanks.. i just thought maybe i needed timers, then poof.. a sample code.. thanks.. just have to modify the code to fit my needs.. but am still having trouble moving the buttons., a trying to work how to move i now?
-
How to Move an MFC Button. [modified]http://h1.ripway.com/lgmanuel/VisualCPP/MoveTheButton.rar[^] here is the link, sorry if the previous link did not work.. i renamed the directory..
-
How to Move an MFC Button. [modified]there is no need for hiding the controls., i got an idea that if the LEFT button is clicked, it scrolls all the way to the left until the three buttons are gone, then it shows up on the right side of the app window, likewise with the right button. then it should stop to where the three buttons are if the center button is prssed. Like the tag in HTML, it just scrolls to the direction, then shows up to the other side.. i think but am not sure if i need to get the coordinates? need help guys. thanks..
-
How to Move an MFC Button. [modified]..... update by the way, here is the app. that i was trying create. you can download the project and check it, it's just a design and no codes yet, i just named the controls to their ID's.. what i am tring to do is move the three buttons until they are totally out the the app window.. thanks for the help guys, appreciate it. here is the URL to download the project. http://h1.ripway.com/lgmanuel/VC MFC/MoveTheButton.rar
-
How to Move an MFC Button. [modified]by the way, here is the app. that i was trying create. you can download the project and check it, it's just a design and no codes yet, i just named the controls to their ID's.. what i am tring to do is move the three buttons until they are totally out the the app window.. thanks for the help guys, appreciate it. here is the URL to download the project. http://h1.ripway.com/lgmanuel/VC MFC/MoveTheButton.rar
-
How to Move an MFC Button. [modified]i think that's the best thing to do for now?.. read a book and understand the concepts and terminology used in VC++. anyway, thanks for the advice.
-
How to Move an MFC Button. [modified]and how do i get the current coordinates of the three buttons?
-
How to Move an MFC Button. [modified]thank you for that info., but i am a total new to VC++ MFC,. where do i put the code. should i just double click the button and add the code like Visual Basic do?
-
How to Move an MFC Button. [modified]hi, I am new to VC++ MFC, i am trying to create a simple app. using MS Visual Studio 2005. i want to move three button to scroll left when i click the left button, same if i click the right button, it should scroll right. then it will stop if i click the center button. but i don't know how to start the code part, all did was to create the GUI. the Design looks like this.. Check URL to view ScreenShot. http://h1.ripway.com/lgmanuel/Imgs/gui.png
modified on Wednesday, July 14, 2010 5:04 AM