|
How do I rotate a shape so that I can watch it actually rotate from its original position up to the angle of rotation I have specified. I always see the shape already in its final position when I run (not what I want).
|
|
|
|
|
ummm forgive me if i'm being too simplistic but...
your document holds the shape data ... your view shows it when an OnDraw() is handled
after initializing your shape co-ords do the Invalidate() thing on the view
do one stage of the transform
do the Invalidate thing()
do another stage of the transform
do the Invalidate() thing
etc
etc
like i said if i got the level of answer wrong forgive me
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
I am having a problem with the read function.
I hava to read a pcx(binary) file into a struct . how can i do this?
|
|
|
|
|
You can open the file with
fopen , and then use fread
Also you can use OpenFile and ReadFile
Regards....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
|
...maybe the problem is your structure...
Use the following pragma's around your definition:
#pragma pack(push, 1)
...
#pragma pack(pop)
have fun...
jk
|
|
|
|
|
When my app runs, it gets an assertion error from strcore. I can enter the debugger with Retry and cancel, no problem. I even see what string is causing the problem. What I can't see is which of the many threads running am I looking at in the debugger.
Is there a way to tell?
Thanks for the help,
Bill
|
|
|
|
|
Go to Debug->Threads,
You can also list modules.
|
|
|
|
|
Hello,
I'm having some problems getting a bitmap to show up on a CButton. I followed what the MSDN documentation says, which is below:
******
CButton myButton;
// Create a bitmap button.
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_BITMAP,
CRect(10,10,60,50), this, 1);
// Set the bitmap of the button to be the system check mark bitmap.
myButton.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(ADUSTBUTTON)) );
******
The bitmap is not loaded using this. It's just an empty button with no text. If anyone knows what I'm missing to Set a Bitmap and make it appear please let me know. I have no problems with CBitmapButton, I just don't need something so advanced. I appreciate your help.
Thanks in advance,
Greg
|
|
|
|
|
Try this:
myButton.SetBitmap( ::LoadBitmap(AfxGetResourceHandle(), MAKEINTRESOURCE(ADUSTBUTTON)) );
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
Man, You're awesome!
Many, Many Thanks.
|
|
|
|
|
have a dialog with several CWebBrowser controls and i want to show only one at a time, the rest must be hidden. The user must be able to select the browser to be shown.
I tried using a pointer in the dialog box that points to the currently selected CWebBrowser but when i used ShowWindow to hide the last selected CWebBrowser, i can't use the pointer anymore because it always sends an unhandled exception error when i try to call a function.
What i'm i doing wrong ?. Is there anotehr way to do it ?
Here is the source code:
void CClickMgr1View::SetBrowserCtrl(CWebBrowser* aCtrl)
{
m_browser->ShowWindow(SW_HIDE);
m_browser = aCtrl; // Here is where i get the error
m_browser->ShowWindow(SW_SHOW);
ResizeBrowser();
}
void CClickMgr1View::ResizeBrowser()
{
RECT rect;
if (m_init)
{
this->GetClientRect(&rect);
m_browser->SetWidth(rect.right-15);
m_browser->SetHeight(rect.bottom-15);
}
}
Abdiel Jaramillo
Arango Software International
Panama, Rep. of Panama.
|
|
|
|
|
I think that aCtrl is a bad pointer....
Check the value of aCtrl.m_hWnd in the Function before to assign the variable to m_browser....
Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
If you need more help please send me an email. And in spanish if you prefer....
Regards....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I need to make a 3D mesh structure using openGL. The tutorials on nehe.gamdev.net don't show me how to draw lines and just make outlines of shapes to create a mesh. Any other websites that will teach me?
|
|
|
|
|
I draw lines like this:
glBegin(GL_LINES) ;
p1.x = 0.0f -(float)xspan/2.0f;
p1.y = (float)((0.0 - m_y1)/yw-yspan/2);
p1.z = 0.0f - (float)zspan/2.0f;
p2.x = 0.0f + (float)xspan/2.0f;
p2.y = (float)((0.0 - m_y1)/yw-yspan/2);
p2.z = 0.0f + (float)zspan/2.0f;
glVertex3f(p1.x, p1.y, p1.z) ;
glVertex3f(p2.x, p1.y, p1.z) ;
glVertex3f(p1.x, p1.y, p2.z) ;
glVertex3f(p2.x, p1.y, p2.z) ;
glVertex3f(p1.x, p1.y, p1.z) ;
glVertex3f(p1.x, p1.y, p2.z) ;
glVertex3f(p2.x, p1.y, p1.z) ;
glVertex3f(p2.x, p1.y, p2.z) ;
glEnd() ;
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
|
|
|
|
|
Anybody got any good tutorials for Exchange programming? I am not too familiar with it myself. I need to be able to iterate over all of the users on an exchange server and find out how much they've stuff they've got in their mailbox.
Any ideas, hints?
Thanks,
Aaron
|
|
|
|
|
|
I'm trying to learn OpenGL programming. I have basic knowledge of C and C++. I've been looking at books on OpenGL on www.amazon.com. Can anyone recommend a good book to learn OpenGL from scratch, also keeping in mind that my knowledge of C++ is not that advanced.
|
|
|
|
|
Go to the graphics book section, and look at the top sellers. Under Principles & PRactice you'll find the Red and BLue books, THE OpenGL books to own. The Red book is a tutorial, the Blue book is a reference. ISBN on the red book is 0201604582
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Anyone know of a way to force an application to exit and then restart? The exit part is easy - it's the restart part that i can't figure out.
-c
Smaller Animals Software, Inc.
|
|
|
|
|
How about a call to CreateProcess() as part of your app's ExitInstance?
The looping that would go one might drive a few user's crazy, but they need that kind of wake up call once and awhile
Chris Meech
|
|
|
|
|
<hackity hack>
How about firing off a tiny subprogram (batch file even) that waits for 2 seconds and then launches your app?
</hackity hack>
Seriously though, what part of your app needs to be restarted? Is the problem OS-specific - like, do you need to restart because you're bleeding memory or resources? OR could you solve your problem simply by emptying out a certain chunk of your app's memory and refreshing just that? If you could just do the latter, then you'd free yourself from having to worry about hackity hack solutions...
J
|
|
|
|
|
it's a tricky licensing/registration thing. my app does its registration stuff in various stages of the startup code. i don't want to do it right after the user enters his reg info because that's too obvious a place for crackers to start looking. so, i need to force a restart.
but, i'm finding people are having trouble with "enter your info, close the app and then restart it"...
-c
Smaller Animals Software, Inc.
|
|
|
|
|
The Chris Mech Solution is the best Idea.... Use CreateProcess();
Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|