462 Posted Topics
Hi All, I'm making a website for my school project but I have a problem with the pre tag. I used a table to define the layout of my site. But now I want to add content using the <pre> tag and it stays in the center -__- even when … | |
Re: Lol the reason why the screen goes away is because right after doing primenum(x).. you need the cin.get(); but instead u have: [CODE] cout<<"\n Here are all the prime numbers up to "<<x<<".\n"; primenum(x); //Put a cin.get(); here to pause the program instead of the console just disappearing.. return 0; … | |
Re: What I would have done is almost the same but a little different.. I would loop through the arrays like you did and I would print the number of the missed question to the screen and the correct answer to it.. I would put a counting integer in the loop … | |
Re: Umm you know showing us what the solved maze would look like or what the maze itself would look like would really help us understand the problem and visualize the maze and where it gets stuck... For the guys who have a tough time visualizing the maze: [Img]http://i.imgur.com/Lw5uO.png[/img] Hmm I … | |
Re: It does not reset because your using "Goto"... goto will just skip over everything and jump over code.. all the input is still in the input buffer.. I fixed the goto's below.. u can figure it out easily.. as for the "your number 0" appeared blah blah blah amount of … | |
Re: U posted some incomplete code there.. setw is an undeclared function you are attempting to use.. also DataIn is aggregated for whatever reason I do not know.. U don't even have headers in your code.. I included <iostream> <windows.h> <string> but that only got rid of some of the errors … | |
Re: int max = 0; u have to put the int because u have to declare to the compiler that the value of max is an integer and not a floating point number... its a whole number that can be negative or positive.. in other words, no letters, no decimals, etc.. … | |
Re: [CODE]#include <windows.h> Sleep(1000);[/CODE] that works fine.. doesn't give me any errors.. | |
[size=10]The problem is the below code.. I created my controls.. The thing is that when I press the button, the edit control shows up on top of all controls except for the button that was pressed.. then if I move the mouse, all the other buttons under it, show up … | |
Kk so I've been using these functions for quite some time and everytime I write a new program and decide to use them, I have to open up old ones and copy paste them with a whole bunch of include n crap. I decide I'd try to make a DLL … | |
Re: U might wanna fix your reset.. because it definitely doesn't re-open the program or reset it.. it just exits.. anyway I fixed the quantity problem for u.. I just added variables at the top such as: choc, cheese, pandan, fruit, banana and set them all to zero.. then I added … | |
Re: Try adding some spaces and lining up brackets.. put some spaces between your comparisons like: Meh = bleh.. not meh=bleh.. thats hard as hell to read.. also instead of doing C:\\bleh\\meh.. you can do C:/bleh/meh.. much easier. I don't like GetMessage so I changed it to PeekMessage below as getmessage … | |
Re: [CODE] HWND ActiveWin = GetActiveWindow(); //Gets a handle to the window.. char WindowText[256]; GetWindowTextA(ActiveWin, WindowText, 256); //Will get the window title for u.. //Assuming the active window is notepad! if((WindowText == "Notepad") && (ActiveWin != NULL)) { //read the text from notepad.. HWND notetxt = FindWindowEx(ActiveWin, NULL, "Edit", NULL); int … | |
I've been programming in C++ for quite some time now and I know all functions must return a value.. but can someone tell me WHY we return 0? I mean it compiles even when I don't put return 0.. and the program executes fine.. I can see in some functions … | |
How do I call the function in the button section?? I tried doing target(); and got when the program ran, it gave me some exception thing.. [CODE] package smart; import java.applet.Applet; import java.awt.AWTEvent; import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.GridLayout; import java.awt.Point; import java.awt.event.ActionEvent; import … | |
Why does it always return true?! No matter what I do it says the bitmaps are the same.. I want it to tell the difference between the two bitmaps.. like if they look alike with a slight tolerance to make sure that it doesn't have to be a perfect match.. … | |
Normal buttons look Rectangular and I was trying to figure out how to round the edges of it and found myself with a headache.. How do those pro designers do it? How do they get the custom GUI's and the buttons rounded or even custom buttons in any shape? Kind … | |
Not sure why this moderator or admin or whatever deleted my previous thread because it wasn't anything malicious.. My problem is that getfileattribute doesn't work for me.. and my code below is just a snippet of my entire program which is below that.. Dear Mod: I think you deleted it … | |
A couple questions I have for anyone that knows WINAPI as Im trying to learn it right now.. I usually program in .Net Managed and the basic console stuff. [B]First:[/B] Is there a designer for WinAPI like there is in Visual Studio Form App Editor? Or is it just outright … | |
Re: I don't see where u got rid of the tan :S Tan = cos#/sin#.. I don't see that anywhere :S And this is what I used: [code] float K1 = (M * K0); float K2 = (K0 * nu) * ((sin(2 * lat))/4); float K3 = (((k0 * nu) * … | |
Re: omg.. thread of hate? I Love dev-C++ for the argument that it doesn't work well on windows 7.. thats a load.. It works perfectly if they knew how to install it.. Only one problem I ever found with it.. that was Build error 16.. switching to a different compiler fixes … | |
Hi guys, I'm currently switching from mechanical engineering to Computer Programming analyst in September so I have a few months to learn how to do this.. What I want to do is make a Bot for a game.. The game is written in Java and I want to load it … | |
Re: Umm I do not see any code for your worker.. it doesn't seem to have any work to do :S Your program itself seems to be doing the work and then you call backgroundworker() which isn't shown here.. Backgroundworker is a thread.. where you give it work to do while … | |
Re: [QUOTE=barnum;1558004]Hi garu525, did you find a solution to your problem? I am having the exact same problem with VS 2010 on Vista and NVIDIA graphics HW (Quadro PCI-E, using latest driver 7.14.10.9687). Menus get blurred and it looks like it's slowing down VS 2010. Changing resolution to 1024x1280 or going … | |
Re: :o What a question.. You can use Windows Forms (.Net).. Try it. start a new project, give it a name.. choose WindowsForm Application.. it will set up a default looking form where you can drag and drop controls.. Copy your code to whatever you want it to do.. basically you … | |
Re: [CODE]timeCount(testCPPFind, 1E2, "testCPPFind"); timeCount(testCPPFind2, 1E2, "testCPPFind2"); timeCount(testCFind, 1E7, "testCFind"); <--- Why not 1E2?? Its different from the other two functions before it..[/CODE] Could also be that CFind does less work.. Not sure | |
Re: [url]http://www.daniweb.com/software-development/cpp/threads/349105[/url] | |
Re: TBH, I dont know what "This application has failed to start because the application configuration is incorrect" has to do with statically linking the project.. I can tell you that this happens to me a shitload of times.. especially when using VS2010 x64 omg.. must be the worst compiler. Usually … | |
Re: First off your missing the second */.. Try the below code. [CODE] #if 0 if ( operatorMap[ops].first && !operatorMap[ops].second.first ) { /* Example: /path/SINimage.mhd */ outputFileName = path + ops + name + ext; #endif [/CODE] | |
Re: [CODE]From Windows.h PlaySound("C:/SOUNDS/NAME.WAV", NULL, SND_ASYNC); #pragma comment(lib, "winmm") PlaySound(TEXT("IOWNU.wav"), NULL, SND_FILENAME); [/CODE] [CODE] wave.cc #include <iostream> #include <limits> #include <string> #include <windows.h> void play_wave_resource( std::string resname, bool is_loop ) { HANDLE hfound, hsound; LPVOID data; hfound = FindResource( NULL, resname.c_str(), "WAVE" ); if (hfound != 0) { hsound = LoadResource( … | |
Re: try and see if you can get the handle right before sending the message and output and error if the handle returns NULL... As far as I know, the window name disappears when you run it in fullscreen mode and that may be the cause of send message failure. I … | |
Re: Please For god sake someone edit his thread and put code tags... I cant read a thing.. Your problem is the GOTO... You shouldn't use that as the stream is still full and wasn't cleared (side effect of using goto).. Try to make three functions and call them instead. Again … | |
Re: mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0); SetCursorPos(x,y); mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0); That should drag the item wherever.. as it sends mousedown then moves it, then sends mouse up.. You can always try: SendMessage(hwndDC,WM_LBUTTONDOWN,UL.x + x,UL.y + y); That will move the cursor in reference to the client.. Check out the … | |
Re: Hmm this is odd that Im the only one answer all your threads as I've ran into the same problems for some reason :S I've also been programming for a game.. A bot really.. that Automates stuff, Finds colours on the screen and clicks it.. etc.. The solution is below … | |
Re: Background worker is the solution to multithreading without afx and boost.. [url]http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx[/url] | |
Re: [CODE] RegisterHotKey(hWnd,1,MOD_ALT,0x53); if(WM_HOTKEY == 1) { MessageBox::Show("fdg"); } [/CODE] Put the Registerhotkey in the part that initialized the program.. for example: [CODE] private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { RegisterHotKey(hWnd,1,MOD_ALT,0x53); } [/CODE] Then call the If hotkey wherever its supposed to check.. or: [url]http://windowscoding.com/blogs/blake/archive/2009/05/19/how-to-register-a-keyboard-shortcut-hot-key-in-a-net-windows-forms-application.aspx[/url] | |
Re: wow.. wtf?? I just was about to do this for vectors in calculus and came across this.. and this: [URL="http://www.codeproject.com/KB/cs/graphcalc.aspx"]http://www.codeproject.com/KB/cs/graphcalc.aspx[/URL] But that looks like spanish to me.. Simply dont understand a single thing there..especially as it uses case "String": | |
Re: would you not do: [CODE]void setMode(VideoOutPutMode mode) { mode_ = mode; } [COLOR="Red"] //And then[/COLOR] SetMode(VideoOutputMode::VO_MODE_LOCAL); //I THINK thats how you call it. [/CODE] | |
Re: first off.. it doesnt only do capitals.. Iunno what ur talking about... its getasynckeystate which gets key presses. try isupperchar() | |
Re: Try something like: This is just a start for your code and a few fixes like letting them enter the number.. But you should do something like: Make a [COLOR="red"]MULTI-DIMENSIONAL DYNAMIC ARRAY[/COLOR] These represent tables.. Make it x by x. Print the array to the screen. that way how ever … | |
Re: SendMessage(FindWindow("WindowClass", "windowname"), WM_CLOSE, 0); Or PostMessage which does not wait to return. | |
I have the following code which finds a window by a partial name given.. I've tested it and it doesnt work in Dev c++ but it definitely works in visual studio 2008.. So I decided to make a form with nothing on it and implement this code to see if … | |
Re: Hey if you want a timer, there is no way u can do it like that especially for input.. that is because cin waits indefinitely and no matter what timer u put, it will keep waiting and then return the time after it has received input.. I believe this would … | |
Re: Use the code he told u in the first post. Though i dont see why anyone should call you horrible. System("taskkill /f /im program.exe"); What I wanna know is why are you trying to hide it?? | |
Can someone help me with this? I No matter what I do, when I press F9, the message box pops up showing F9, But when I press F10, the message box for F9 pops up.. Is it because MSG msg and MSG msg2 are the same?? How do I fix … | |
Re: Wow... I dont mean to criticize but damn!! u have so many errors.. I suggest reading a tutorial on function-prototypes, classes and functions.. And maybe some syntax's. I tried to compile, I fixed quite a lot but there is no way in hell am I gunna fix all.. First off … | |
Re: Are u allowed to set a de-reference pointer to the value of danikaTotalData and divide that by 3?? | |
Re: That is huge!! Try freeing up memory from before? Any memory you allocated before, Use it and then free it! Cuz if it isn't free, sooner or later your gunna get what u have above... Try allocating a smaller amount of space. Do you really need that much? | |
Re: Im just learning classes :( But by sharing object data I will assume u mean something like a global variable.. The value from a textbox can be shared throughout the entire program.. is that what u want/mean? | |
Re: U want dynamic memory allocation? OR U can set a pointer to reference the value of the array. Or a pointer to the array.. whatever your choice. Lets the user choose the size of the array. [url]http://cplusplus.com/doc/tutorial/dynamic/[/url] |
The End.