User Profile
Collapse
-
Thanks Paul, I appreciate all your help. -
Hey Paul,
Thanks for the reply, I was working on your suggestions but unfortunately I am still having trouble and was hoping you could possible point out where I'm going wrong. Here is what I have...
-----------------------------------------------------
// for rotation around x-axis
x = ((x * 1) + (y * 0) + (z * 0) + (w * 0));
y = ((x * 0) + (y * cos(xRotation)) + (z * sin(xRotation)) +...Leave a comment:
-
Trouble with graphics...
Hi all,
I have a problem with the graphics I'm creating for my VC application, I am using OpenGL and have created the basics of my model/graphics ok. My model contains 'hotspots' which are just points in the model were something happens if the user clicks on. I have them working fine until the model is rotated at which point I am unsure of how to update the hotspot value to reflect the new hotspot position on screen.
... -
The files I that were created from the Matlab compiler were as follows;
<library>.expor ts, <library>.c, <library>.ctf , <library>.dll , <library>.exp , <library>.lib , <library>_mcc_c omponent_data.c and <library>.h
not sure if the above is important but I include it just incase!
I have included the <library>.lib file in the 'Object/library modules:' option...Leave a comment:
-
From the Matlab compiler I got a number of files (.dll and .lib amongst others) I am not sure what type of library it is (is there anyway to tell, I guess I should already know?) To link it to the program I have included the file path (of the .lib file) in the 'Object/library modules:' option in the link section of the project settings dialog box. However this was really no more than an act of blind desparation!
I haven't had any...Leave a comment:
-
Sorry,
Perhaps I should have mentioned that I created the library via the Matlab compiler by converting some matlab files to C files!Leave a comment:
-
Anyone?
I'm sure its probably really simple but I have never done this before and I'm really struggling! Any pointers at all?
ThanksLeave a comment:
-
Shared Library
Hi,
I am having problems with a shared library I have created to use in my MSVC project.
The main function in the library looks like this;
extern void mlfMain();
When I try to call this function from within the VC project I get an error saying 'mlfMain()' : undeclared identifier.
I call it simply by the following;
mlfMain();
I have include the... -
-
Banfa,
I have tried to add the code as you instructed however I am not getting it right, the code I have is below;
CRect rect(0,0,wWidth ,wHeight);
CreateCompatibl eBitmap(m_hDC, wWidth, wHeight);
CDC *compDevice = GetDC();
CreateCompatibl eBitmap(*compDe vice, wWidth, wHeight);
CreateCompatibl eDC(*compDevice );
CBitmap *bitmap;
compDevice->SelectObject(* bitmap);...Leave a comment:
-
Hey Banfa,
This is what I have at the moment (which isn't much);
OnMouseMove(... ){
...
CRect rect(0,0,wWidth ,wHeight);
CreateCompatibl eBitmap(m_hDC, wWidth, wHeight);
CDC compDevice; // device compatible to the screen
?
}
where wWidth & wHeight are the width and height of the screen in pixels.
HDC m_hDC =GetDC(m_hWnd); where m_Wnd is a...Leave a comment:
-
Paint select function...
I am writing an application using MFC and was wanting to include a function similar to the select function available in Paint.
I want to allow the user to grab the screen and drag it where they want to, can anyone give me some pointers as to how I would go about this?
Any help would be greatly appreciated. -
Change cursors...
Hey,
I'm trying to change the cursor in my application when a certain toolbar option is selected. I am using the following code which compiles and runs but does not change the cursor! I don't know why? I am using Visual C++ 6.0. IDC_GRAB is a cursor resource that I have created.
Any help would be really appreciated.
Thanks in advance.
void CProject::OnBut tonGrab(){
HCURSOR lhCursor;... -
SetFocus in Dialog Box
Hi,
I am trying to set the focus in a dialog box (VariableDlg) to a specific edit box (IDC_EDIT17, double m_temp) when a selection is made from a list box (List 1), using VC++. I have used the code below;
// edit box variable
double m_temp;
void VariableDlg::On SelchangeList1( ){
....
m_temp.SetFocus ();
}
but this gives the following compilation error - error C2228:... -
Sorry,
I have made my classes subclasses of generic CWnd through the class wizard - I thought that was what should be done if your class didn't require any specialised functionality (from classes like CDialog etc!?!) I am new to MFC and don't really understand it, am I totally wrong in doing that?Leave a comment:
-
Banfa,
I made the changes you suggested however an exception is still thrown at the line;
allowableStress .at(0) = stress;
before this line is executed the values of allowable stress are (from debugger):
allowableStress .allocator._Fir st = 0x00000000 {StressClass hWnd = ???}
Could this be causing the problem?Leave a comment:
-
I will give the full code as it may be more descriptive.
I have 3 different classes that are linked, MaterialClass, StressClass and tempDesClass. Each instance of the MaterialClass (stored in materialDatabas e vector) has numerous different stresses (represented by vector of StressClass called allowableStress ) and within each stress there are numerous tempDes properties (vector of tempDesClass called tempLife) as below;
...Leave a comment:
-
Sorry Banfa,
that was a mistake it should have been yVect.at(0).zVe ct.at(0).x = 5; there is no xVect! The problem is at run time when I try the following statement it throws an exception...
yVect.at(pos).z Vect.at(pos).x = 5;Leave a comment:
-
Trouble with vectors...
I'm having a problem with vectors. I have a vector of type class and that class also has a vector in it and I am having problems assigning values to the vectors, I am using VC++ ver6.0
_______________ _________
class X{
public:
vector<Y> yVect;
}
class Y{
public:
vector<Z> zVect;
}
class Z{
public:... -
Get Document from CDialog
Hi,
In MFC is it possible to get the document from a class derived from CDialog?
I know that you can call getDocument() from the View class but is there function that will do the same from a Dialog class?
Thanks in advance.
No activity results to display
Show More
Leave a comment: