
DR00ME
Avatar/Signature-
Posts
174 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by DR00ME
-
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?
-
Once again PlausiblyDamp, your quality answer helped! thanks!
-
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 } } }
-
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...
-
yes I was looking for the "is nothing" thingy.... heh, my bad... forgot parentheses after the array... thank you...
-
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
-
At least someone remember me :)
-
ROTT,CS of course :)
-
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!
-
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
-
Good stuff... cheers...:)
-
How do I write in a file without overwriting the old stuff ?
-
you are amazing!! :D P.S. omg those return chars really pissed me off :)
-
btw when the writing sequence ends that damn symbol comes there in the end of the stream....but from where ??????????
-
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
-
well I think it got something to do with how Remote Assistance works...e.g. you cant see some 3D accelerated objects with such programs as RA.... If RA takes screenshots (compress them and send to destination where it uncompress the picture), then the problem occurs.... e.g. if you take screenshot of media player you see blank or something else than what the player is showing....also when I take screenshot of my TV-card screen I see black picture....I would be also interested why this happens... P.S. this happens with some games too...
-
yadda yadda everything works now....
-
Yeah, once again I'm bad with the 'new' things.... p.s. I was just wondering if there is a thing you don't actually know in vb.net :D
-
Dim FilterListBox As ListBox SR = FileHandle.OpenText("Calibration.ini") HSL_String = SR.ReadToEnd SR.Close() HSL_Array = HSL_String.Split(";"c) For i = 0 To HSL_Array.Length - 1 ArraySplit = Convert.ToString(HSL_Array(i)) 'MsgBox(ArraySplit) FilterListBox.Items.Add(ArraySplit) 'I get error in here, why ? Next i "Object reference is not set to an instance of object"
-
blah, I'll try to play around with it.... this is what I got so far... [Vb] Private Sub btnCalibrate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalibrate.Click Dim CalibFile As FileStream Dim i As Integer Dim byteArray() As Byte Dim dataString As String Dim fileDataString As String Dim FileHandle As File Dim SR As StreamReader Dim SW As StreamWriter If lstHSL2.Items.Count > 0 Then For i = 0 To lstHSL2.Items.Count() - 1 If dataString = Nothing Then dataString = lstHSL2.Items(i) Else dataString = dataString + ";" + lstHSL2.Items(i) End If Next i SR = FileHandle.OpenText("Calibration.ini") fileDataString = SR.ReadToEnd SR.Close() byteArray = Encoding.Unicode.GetBytes(fileDataString + dataString) CalibFile = New FileStream("Calibration.ini", FileMode.Create) CalibFile.Write(byteArray, 0, byteArray.Length) CalibFile.Close() CalibFile = Nothing End If End Sub[/code]
-
Yes, I'm talking about tooltips.... cant change ? too bad :(
-
Hey when I point some method or something there comes this little help text.... how I make it stay longer than the default setting ?
-
ROFL, a good point actually I didn't have anytihng in the listbox :DDDD *Bangs his head on the wall* *Bangs his head on the wall* *Bangs his head on the wall* *Bangs his head on the wall* *Bangs his head on the wall*
-
I have allways thought & is same as + ? ...anyway I tried '&' with the same result... I got same error... have to investigate whats going on...
-
Private Sub btnCalibrate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalibrate.Click Dim CalibFile As FileStream CalibFile = New FileStream("Calibration.ini", FileMode.Create) Dim i As Integer Dim byteArray() As Byte Dim dataString As String For i = 0 To lstHSL.Items.Count() - 1 dataString = dataString + lstHSL.Items(i) Next i byteArray = Encoding.Unicode.GetBytes(dataString) 'This is the problematic part CalibFile.Write(byteArray, 0, byteArray.Length) CalibFile.Close() CalibFile = Nothing End Sub "String reference is not set to an instance of a string"