Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Rajveer

@Rajveer
About
Posts
56
Topics
51
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • dialog question
    R Rajveer

    When I create a new dialog class and display it with the DoModal() command, I can't interact with anything else on the screen until I close the dialog. How do I create a dialog that will stay up on the screen and allow me to still access everything else (menus, etc in my actual MDI, SDI application). Similar to the properties dialog in visual studio.

    C / C++ / MFC question csharp visual-studio

  • edit box variable
    R Rajveer

    I want to add a variable for an edit box. But the only choices are CString, int, long, UINT... is there some way I can have the variable be a float or a double?

    C / C++ / MFC question

  • debugging issues
    R Rajveer

    My program shuts down at the same point always and when I debug it takes me to this statement in my program: vectorB = sqrt(xcoord1[n][layer]*xcoord1[n][layer] + ycoord1[n][layer]*ycoord1[n][layer]); in the variables window I see that vector B is 1.#INF000000000 so I'm trying to look at the values for my 2 dimensional arrays with the watch window. How can I look at the entire array...I know I can look at individual elements by typing xcoord1[34][3] or something like that? But I need to see all the elements. What do I type for this?

    C / C++ / MFC question graphics data-structures debugging

  • whats going on??????
    R Rajveer

    So how do I deal with something like that?

    C / C++ / MFC question

  • whats going on??????
    R Rajveer

    This is a C question. I have the following for loop in my program: for(double i=0.0; i<360.0; i+=3.0/10.0) { //do stuff } everything works fine, but I changed it to this because I need to generalize the code later on: double angle=3.0/10.0; for(double i=0.0; i<360.0; i+=angle) { //do stuff } and now the program crashes when I run it. I don't see the difference between either of those two. And "no" there is nothing complicated in the for loop such as changing the value of angle part way through while I'm running through the loop. So what is going on here????????

    C / C++ / MFC question

  • Invalidate method
    R Rajveer

    I'm drawing graphics with OpenGL in an MDI application. In my OnDraw() function, I have the following portion of code: if(spin==1) { Y_Angle++; Invalidate(TRUE); } I have a button which makes spin=1. So when I press this, Y_Angle will continue to increment and then Invalidate(TRUE) redraws the scene each time, giving the appearance of continuous rotation. This works fine. Problem is, when I click any menu thats supposed to bring up a dialog box, the box doesn't come up. I have a feeling this has something to do with Invalidate(TRUE) continuously redrawing the scene. How can I fix this?

    C / C++ / MFC graphics help question game-dev

  • including .cpp file
    R Rajveer

    I have global variables float xtrans, ytrans; defined in my file TestGLView.cpp and I have this function for handling keyboard events in my file ChildFrm.cpp void CChildFrame::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default CMDIChildWnd::OnKeyDown(nChar, nRepCnt, nFlags); char keypressed = char(nChar); if(keypressed == 'I') ytrans += 0.2; if(keypressed == 'K') ytrans -= 0.2; } this function uses the global variables from TestGLView.cpp so I need to #include "TestGLView.cpp" in the file ChildFrm.cpp but when I do that, I get this error: C:\WINDOWS\Desktop\QE2 heart program\ChildFrm.cpp(14) : error C2370: 'THIS_FILE' : redefinition; different storage class c:\windows\desktop\qe2 heart program\testglview.cpp(22) : see declaration of 'THIS_FILE' so I comment out this line from ChildFrm.cpp since its present at the top of both files: static char THIS_FILE[] = __FILE__; but then I get tons of other errors, here are some: TestGLView.obj : error LNK2005: "public: static class CObject * __stdcall CTestGLView::CreateObject(void)" (?CreateObject@CTestGLView@@SGPAVCObject@@XZ) already defined in ChildFrm.obj TestGLView.obj : error LNK2005: "protected: static struct CRuntimeClass * __stdcall CTestGLView::_GetBaseClass(void)" (?_GetBaseClass@CTestGLView@@KGPAUCRuntimeClass@@XZ) already defined in ChildFrm.obj TestGLView.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CTestGLView::GetRuntimeClass(void)const " (?GetRuntimeClass@CTestGLView@@UBEPAUCRuntimeClass@@XZ) already defined in ChildFrm.obj So how can I alter the global variables from another file without having to deal with all this? There must be an easier way???

    C / C++ / MFC question c++ help

  • Pressing Arrow Key
    R Rajveer

    How do I check to see if the key being pressed is the up, down, left or right arrow key? i.e. to check if "I" is pressed, I do this: void CChildFrame::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default CMDIChildWnd::OnKeyDown(nChar, nRepCnt, nFlags); char keypressed = char(nChar); if(keypressed == 'I') //Do stuff } but what do I write in the if statement to check for an arrow key?

    C / C++ / MFC question

  • radio buttons, edit boxes, etc
    R Rajveer

    I have a dialog box in which I have a group of two radio buttons and I have an edit box which takes an int as the # of files to open. I also have many other edit boxes with browse buttons to look for a file that should be opened. When I select one of the radio buttons and then put a number in my edit box for integers, the selections don't remain there after I do something else in the dialog box. Such as if I click one of the browse buttons to find the file and then place it in the appropriate other edit box, the radio button gets deselected and the number in the edit box disappears. How can I make the number and the radio button selection remain?

    C / C++ / MFC question

  • running program from different computer
    R Rajveer

    I'm writing an opengl program in an MDI application using visual C++ version 6.0 When I work on the program at work and then take it home, it works fine. But when I work on it at home and then try to run it again at work, I get errors when I compile. Here's some of the errors: :\Windows\Desktop\Heart Program newest\TestGLView.cpp(227) : error C2065: 'glEnable' : undeclared identifier C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(229) : error C2065: 'glClearColor' : undeclared identifier C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(231) : error C2065: 'glClearDepth' : undeclared identifier C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(234) : error C2065: 'glLightfv' : undeclared identifier C:\Windows\Desktop\Heart Program newest\TestGLView.cpp(271) : error C2065: 'glBegin' : undeclared identifier In fact, every error I get is of this sort. That the OpenGL commands are undeclared identifiers. I checked if the headers files were included and they were. I also checked if the appropriate libraries were linked and they were. Its the exact same program, works fine at home but screws up at work after it has been run at home. Its also the exact same version of visual C++. Anybody know what the problem is and how I could fix it?

    C / C++ / MFC c++ help graphics game-dev question

  • window size
    R Rajveer

    I have an MDI application. How can I change the default sizes for the child and parent windows when the application starts up?

    C / C++ / MFC question

  • C++ question
    R Rajveer

    okay, I have this array: double x_coord1[80][10]; this is one of my function prototypes: void NewCoordinates(double* xcoord1, double* ycoord1, int global_numcoord1, double* x_coord1, double* y_coord1); and when I call on the function like so: NewCoordinates(xcoord1, ycoord1, global_numcoord1, x_coord1, y_coord1); I get this error: C:\Windows\Desktop\QE2 heart program\TestGLView.cpp(460) : error C2664: 'NewCoordinates' : cannot convert parameter 4 from 'double [80][10]' to 'double *' what am I doing wrong?

    C / C++ / MFC question c++ data-structures

  • C++ question
    R Rajveer

    If I have an array: double xcoord[80]; I can pass it to a function and the function can receive it as a pointer... void AcceptArray(double* ) but how do I write the function prototype if that array were multidimensional, say -- xcoord[80][10]

    C / C++ / MFC question c++ data-structures

  • Looking at arrays with Debugger
    R Rajveer

    I'm using Version 6.0

    C / C++ / MFC debugging data-structures help question

  • Looking at arrays with Debugger
    R Rajveer

    I want to use the debugger to check if my arrays are filled correctly. I have two arrays, double xcoord1[80]; CPoint coord[80]; When I debug, I place my breakpoint right after I fill these arrays (still in the same function). Then I bring up the "Watch" debug window. But when I type xcoord1 under the name, i get the message: error in OMF type information. And when I type coord, I get this under value: 0x0066f288 Why is all this happening?? And I know my array's have filled up properly, because if I put them to an oufile, I see that all the numbers I want are there. But why can't I view them with the debugger???

    C / C++ / MFC debugging data-structures help question

  • strange sudden error
    R Rajveer

    I've been making a program, and its been executing fine. But all of a sudden, it gave me this error (even though I didn't change anything): --------------------Configuration: TestGL - Win32 Debug-------------------- Linking... TestGLView.obj : error LNK2001: unresolved external symbol "public: __thiscall CColour::CColour(class CWnd *)" (??0CColour@@QAE@PAVCWnd@@@Z) Debug/TestGL.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. TestGL.exe - 2 error(s), 0 warning(s) I've had these types of errors (which i don't understand) before and usually if I reboot the computer its fine. But this time, its not going away. What does this error mean and how can I fix it? Also, when I double click the error, it doesn't take me to the spot in the file where the error is.

    C / C++ / MFC help question debugging workspace

  • reading from file
    R Rajveer

    How do I read from a file starting at a particular line. Suppose I want to start retrieving data from the third line but I don't know how much data is on the first two lines. Can I just read until I get two carriage returns? Something like: ifstream file(test.in); char test; for(int i=0; i<2; i++) { while(test!='\n') file >> test; } I know this code is most probably not right, I just put it in to help explain what it is I want I'm trying to accomplish. Can anyone tell me the right way to do it?

    C / C++ / MFC question help

  • something wrong with code???
    R Rajveer

    okay... I just changed the file "binga" so it looks like this: 1 2 3 4 5 6 a b c d e f one two three four five six I ran the program again and I still got the output as -858993460 as opposed to what it clearly should be: 1 what is going on here??

    C / C++ / MFC data-structures question

  • something wrong with code???
    R Rajveer

    Here's a simple program I wrote just now: #include "iostream.h" #include "fstream.h" void main() { int array; ifstream infile ("binga"); infile >> array; cout << array << endl; } the file binga looks like this: 1,2,3,4,5,6 a,b,c,d,e,f one,two,three,four,five,six So when I run the program, why do get the output as -858993460 shouldn't the output just be 1

    C / C++ / MFC data-structures question

  • C++ question
    R Rajveer

    How do I export the Excel file in ASCII or .csv format? Do you mean that this is an option in the excel program itself, or do you mean that visual C++ has the ability to do this to the file? If its an option in excel itself, could you tell me how to go about exporting the file?

    C / C++ / MFC question c++ tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups