Jump to content
Xtreme .Net Talk

DR00ME

Avatar/Signature
  • Posts

    174
  • Joined

  • Last visited

About DR00ME

  • Birthday 01/05/1981

Personal Information

  • Occupation
    IT- Student
  • Visual Studio .NET Version
    vb.net 2003
  • .NET Preferred Language
    vb.net 2003

DR00ME's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. ok, I got win32 application using directX... but of course I got a problem... I got Experimental3D.cpp, D3D.cpp and D3D.h the thing is that I would like to create a new D3D class object in Experimental3D.cpp but I don't know where or how... Experimental3D looks like this.... #include <windows.h> #include <d3d8.h> #include <tchar.h> #include "resource.h" #include "D3D.h" //HWND hwnd = (HWND)this->get_Handle().ToPointer(); yeah = new D3D(); <-- this is the problematic place... I would like to do like this but I cant... where should I create this object? D3D *yeah; // basic windows message procedure LRESULT CALLBACK frame_window_proc(HWND window, UINT msg, WPARAM wp, LPARAM lp) { LRESULT result = 0; if (WM_SIZING == msg || WM_PAINT == msg) { yeah->frame_draw(); // here I need to call function of D3D class } else { result = DefWindowProc(window, msg, wp, lp); } return result; } int __stdcall _tWinMain(HINSTANCE instance, HINSTANCE, LPTSTR, int) { const TCHAR *const APP_NAME = _T("Direct3D"); // Register the window class for the main window. { const WNDCLASS wc = { 0, frame_window_proc, 0, 0, instance, NULL, LoadCursor(NULL, IDC_CROSS), static_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)), NULL, APP_NAME }; if (!RegisterClass(&wc)) { return 1; } } yeah->init(instance); // here I need to pass instance for init return 0; } Any ideas?
  2. Once again PlausiblyDamp, your quality answer helped! thanks!
  3. well umm I'm using visual studio 2003, and I got a normal application with a form... "....\Form1.h(273): error C2039: 'MessageBoxA' : is not a member of 'System::Windows::Forms'" I got this error when I rebuild... sorry for my english but what do you mean by "have to box the integer" ? the thing is that I got this structure with variables and I would like to show the values of these variables in this messagebox... private: System::Void menuItem8_Click(System::Object * sender, System::EventArgs * e) { if (joy_present) { DIDEVCAPS info; if (!FAILED(joy->GetDevCapabilities(&info))) { here I would like to popout a messagebox and show for example integer value of info.dwButtons } } }
  4. heh I'm learning VC++ and I don't know if this question belongs here but anyway, how do I show for example integer value in a messagebox in VC++.. I couldn't find this information... regards...
  5. yes I was looking for the "is nothing" thingy.... heh, my bad... forgot parentheses after the array... thank you...
  6. Hello, how do I check if an array exists or there is reserved memory for it? I need it in situation like this... Private SC as Byte ' Selected Curve If ArrayC(SC).DotArray(0) "exists" Then 'Here I want to check if there is reserved memory for e.g. first place of the array, if not then i reserve it and put mouse cordinates in it.. ReDim Preserve ArrayC(SC).DotArray(0) ArrayC(SC).DotArray(0).X = e.X ArrayC(SC).DotArray(0).Y = e.Y End if
  7. At least someone remember me :)
  8. ROTT,CS of course :)
  9. Just stopped by to say hello to xtreme admins... how it's going ? you still got this nice and FREE forum up and running... respect!
  10. DR00ME

    for

    I got this for 0 to some big number.... the problem is that it kinda hangs the application until it is done.... how I make it so it wont hang the applicaiton like how do I tell the program only to use like 70% of CPU .... or something like that.... oh and one other question.... I would like to do a setup program for my application.... what program should I use ? or is there something with .net 2003 I could use... -thank you
  11. Good stuff... cheers...:)
  12. How do I write in a file without overwriting the old stuff ?
  13. you are amazing!! :D P.S. omg those return chars really pissed me off :)
  14. btw when the writing sequence ends that damn symbol comes there in the end of the stream....but from where ??????????
  15. Hello, I got this application which is writing stuff in a file....with .WriteLine.... after reading the file in the listbox with .ReadToEnd I noticed .WriteLine leaves a terminator (????) It causes major problems in my applicaiton when I tried to use 'if not listbox.items.contains' because the value got something garbage in the end (terminator?).... what should I do ? I dont want to leave any terminators in my file....tough when I edited the file with notepad there werent any marks of terminators.... but I saw some weird symbol in end of some of the listbox values as shown in the pic at the end... This is how I read the stuff from the file to a ListBox: (The values are separated with ';' in the file) Dim HSL_Array() As String Dim HSL_String As String Dim SR As StreamReader Dim FileHandle As File Dim i As Integer Dim ArraySplit As String Dim FilterListBox As New ListBox 'Read the stuff from the file in HSL_String If FileHandle.Exists("Calibration.ini") Then SR = FileHandle.OpenText("Calibration.ini") HSL_String = SR.ReadToEnd SR.Close() 'Separate the values with splitting the string in the HSL_Array HSL_Array = HSL_String.Split(";"c) 'Now write the array values in a listbox.... For i = 0 To HSL_Array.Length - 1 'ListBox1.Items.Add(HSL_Array(i)) 'testbox ArraySplit = HSL_Array(i) FilterListBox.Items.Add(ArraySplit) Next i 'Clear the HSL_Array because it is not needed anymore HSL_Array.Clear(HSL_Array, 0, HSL_Array.Length) End If And This is how I write in the file: Private Sub Calibrate() Dim i As Integer Dim dataString As String Dim fileDataString As String Dim FileHandle As File Dim SR As StreamReader Dim SW As StreamWriter 'Read the new stuff from the listbox in dataString For i = 0 To lstHSL1.Items.Count() - 1 If dataString = Nothing Then dataString = lstHSL1.Items(i) Else dataString = dataString + ";" + lstHSL1.Items(i) End If Next i 'Read the old stuff from the file into fileDataString If FileHandle.Exists("Calibration.ini") Then SR = FileHandle.OpenText("Calibration.ini") fileDataString = SR.ReadToEnd SR.Close() End If 'Write the old stuff (fileDataString) + the new stuff(dataString) in the file..... SW = FileHandle.CreateText("Calibration.ini") If fileDataString = Nothing Then SW.WriteLine(dataString) Else SW.WriteLine(fileDataString + ";" + dataString) End If SW.Close() End Sub
×
×
  • Create New...