- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
53 Posted Topics
If you use JavaScript for geolocation the first time someone uses it then his browser will ask for permission to send his location to the site where your web page is. As far as I can tell Chrome (PC and Android), Explorer (PC), and native browsers in Android devices only … | |
It seems to me that the Audio object can not be easily played inside a JavaScript callback when running on a mobile device. The code below shows an onload function which, on a PC, plays the sound when the web page is loaded, but on Android phones plays nothing. My … | |
Re: Have you initialised done=false before entering the do loop? | |
Re: Use wcscpy_s or wcscpy for widechars, which correspond to strcpy_s and strcpy for chars. Note also you need buffers for these functions. | |
Is anybody already hosting WEB app written in C#? Are they satisfied with their hoster? Tips? I'm looking for something which will have some sort of help with 1. Simple customer database 2. Membership login and password handling 3. Payment handling (maybe) I'm hoping some company has already put together … | |
I have a linear array of structs. These are constant structs and is a way of holding a simple table. Now though I need to add another "column" to the table (another member in the definition of the struct) and I'm wondering if I'd be better using a class rather … | |
I have a project created with VC2010 and the initial layout is almost ideal, it has a CFileView and a CClasView in a tabbed bar on the left and a CPropertiesWnd on the right. But for my project these windows need to say where they are and not be moveable, … | |
Re: I replied to this thread yesteday explaining a big error in the code, but my reply has gone. Daniweb? | |
Re: Well you need to draw the A and the Z as a list of points. It will be easier for you if the list contains the same number of points. Keep the list as a single line, easy with Z but you'll have to double back with A. Then linearly … | |
Re: One thing I noticed is that you check for row > 0 and column > 0, but in C++ the first item in an array would be at position 0, and the last item would be at, for example MAXROW-1. So you are probably going beyond the ends of your … | |
Re: I use this to find out direction and amount of mousewheel movement. // This ikWheelDelta will be a number like +1 or -2 const int ikWheelDelta = GET_WHEEL_DELTA_WPARAM(pMsg->wParam)/WHEEL_DELTA ; This is called in PreTranslateMessage for your window. | |
Re: For random colors I use these two functions: int RandomInt (const int Min, const int Max) /* PURPOSE: To return a random number within or on the range handed to us here. */ { int Num,Delta,RandNum ; RandNum = rand() ; /* * Put RandNum is between 0 and RAND_MAX-1 … | |
Re: It sounds to me that: "The system cannot find the path specified." means that you have an MSDOS window, but you are not in the directory where the program is. You need to find the EXE created from your program and move your DOS window to there with CD commands … | |
I've had some reports that some SVG files I've created work, but without the text. Is there a problem of rendering SVG text on smartphones and browsers? Here are my test files: http://www.ransen.com/svg1.html http://www.ransen.com/svg2.html http://www.ransen.com/svg3.html The first two have very small text, but the last one has text which should … | |
Re: If you use C# (I'm new to it too, but like what I see) would you run it on Azure? | |
I've been writing a technical book, but after Chapter 1 I realised that it would be more useful to people as a searchable online resource. I imagine that the customer subscribes and can then search the content for solutions. So my question is how do I protect online content and … | |
Re: Before following Moschops advice, get a good book on C++ for beginners. | |
WARNING: If you don't like horribly messy questions don't read on... Autodesk Inventor is a 3D parametric CAD program and plugins can be made using COM. I have no experience with COM and some of my naive COM type questions go ignored in the Inventor forums... Look at this: hRes … | |
I have a combobox in a dialog which I populate in the resource editor with this string: -12;-11;-10;-9;-8;-7;-6;-5;-4;-3;-2;-1;0;1;2;3;4;5;6;7;8;9;10;11;12 If the user chooses a new number from the combobox lots of other things happen in the dialog, then I select the number chosen again, this time programatically. (Some numbers are not … | |
Re: It's hard to modify the file itself character by character. Read in the original line by line. Add the commas to the end of the lines (which you will have stored in a buffer) then write out the new line. You write the new lines a temporary file then delete … | |
![]() | Re: I've found this in my personal helpfile. It may give you a start/clue/hint: HANDLE hSnapShot = CreateToolhelp32Snapshot (TH32CS_SNAPPROCESS,0) ; if (-1 == (int)hSnapShot) { WalertBox ("Could not open snap shot") ; } PROCESSENTRY32 Process ; Process.dwSize = sizeof(PROCESSENTRY32) ; if (Process32First(hSnapShot,&Process)) { do { WalertBox ("Process %s ",Process.szExeFile) ; } … ![]() |
Re: If you are using Windows you'll need to know about HDC (device contexts) If you are using MFC Windows you can use CDC (class version of HDC). You'll then use functions like MoveTo (x,y) and LineTo(x1,y1) etc. | |
Re: We need more information... Do you know C++? Where will you draw the circle? How do you fix the radius? | |
Re: You ask "So what is the difference between making the agrument constant and making the function itself constant?" You can imagine having a const member function of an object. This means that whenever you call that function the object itself is not modified. The data *inside* the object is guaranteed … | |
Re: Learn by doing. Learn by mistakes. Learn by trying to understand. Hard, I know, but that's life! | |
Writing an upgrade to my program I'd like to start using the nullptr, a cleaner replacement to NULL. My question is can I use it everywhere, for example in checking the strstr return value? if (strstr(szLong,"tag") == nullptr) Presumably will work as well as if (strstr(szLong,"tag") == NULL) ? | |
Re: This two line iswrong: *int_ptr1 = int_ptr2; When you see an asterisk in front of a pointer read it as "the contents of int_ptr1" So that line is saying "the contents of int_ptr1 become int_ptr2." But the contents of an int pointer is an int. You should either do: int_ptr1 … | |
I want to port some graphics applications in C++ which compile to Windows Executables to run as WEB apps. I don't want to throw away all the code I've written in C++, so it seems to me that Microsoft Azure would be prefect. My idea is that I learn to … ![]() | |
I have to update a road tunnel lighting program I wrote for a company. They now want a new standard to be applied, but with the option of switching between standards real time. And there will be other standards in the future. Currently the single object which calculates the lighting … | |
Re: You really need to ask a specific question. "Help!" won't get you many replies. | |
Re: I can't go into the details, but one way would be to create a compatible bitmap and HDC the same size as the images you want to store. So you'd have two bitmaps and two HDCs. One set is what you are using now and the other set is the … | |
Re: You are probably still running the program you are trying to recompile and link. | |
Re: The two arguments are so that your program can read the command line. If your program is called MyProgram and it translates phrases from one language to another the command line could be: MyProgram wordtotranslate engl fre This has argc=4 (4 parameters : MyProgram wordtotranslate fromlang tolang) argv is a … | |
I'd like to create a video from a series of images in my MFC application. Is there an API or example source code which would get me started? I imagine I'd create an MP4 or AVI file. (A sub question: I've heard that Windows 7 includes the MP4 H.264 encode … | |
Re: The correct way to do this would be to create a "copy constructor" for your class T. The way you are doing it will only work if none of the members of T are pointers and do not contain objects which contain pointers. If T is very simple, with simple … | |
I'm obviously typing in the wrong search terms, but I'm looking for a REST application in C# in Web API running on Azure, but with an example of calling that REST C# from a VS2010 C++ application. I have one half (the C# bit) but I can't find any examples … | |
Re: Think of a simple array as a list of objects, integers say. You can create them in two ways: int* pAnArray = new int [200] ; which creates a list of 200 integers from pAnArray[0] to pAnArray[199]. You need to free the memory after use like this: delete [] pAnArray … | |
I'm flumoxed, how do people normally handle CBaseClass::operator== and CDerivedClass::operator== What I have done is illustrated below, but is it good valid C++? I compare the base class members first (using base class ==) and then the derived class members (the rest of the implementation of the derived class ==). … | |
I've been trying to find a definition of this term: "HTTP endpoint" Does it just mean URL from a programmer's point of view, or something more? | |
I've had a sudden surge of interest in an old (2007) program which is an MFC Dialog based app. So I'd like to spruce it up a bit, and one of the annoying errors is that its proper icon does not appear in the bar at the bottom of Windows. … | |
Re: And your question is? Or do you want us to do your homework for you? | |
As a first part of really using Windows Azure I'd like to use C# running on Azure to verify the license code of a program I'm about to issue the upgrade for. I'm planning on porting the whole thing to the cloud, but to gain experience I'd like to license … | |
Re: You really really need to make sure all variables are initialised before using them: int iGeorge ; int iAlbert = 100 ; // At this point in the program we have no idea what iGeorge is and you should // not use it until you give it a value... iAlbert … | |
Re: If Turbo C is like all other Cs in the world then this line is wrong: myfile=fopen("C:\Documents and Settings\Migs\Desktop\test.txt","r"); \\ on it's own is nothing. You need to say \\\\ . In your case myfile=fopen("C:\\Documents and Settings\\Migs\\Desktop\\test.txt","r"); \\ means "special character follows" and then follow it with another backslash A … | |
Re: At line 28 you open a file, so presumably you want to read from file. But at line 30 you use fscanf, and the first parameter should be the file, not the string. file = fopen("inpt.txt", "r"); fscanf(file," %s %s %2d:%2d %2d:%2d %2d/%2d/%4d %3d %3d",etc etc etx And make sure … | |
I want to port some graphics applications in C++ which compile to Windows Executables to run as WEB apps. I don't want to throw away all the code I've written in C++, so it seems to me that Microsoft Azure would be prefect. My idea is that I learn to … | |
I thought I knew this but I don't. Currently I use RegCreateKeyEx to create a key, and then I call RegSetValueEx. Now what happens is that I create another key (folder in the regedit GUI), and I set the default value for that key (folder). But how do I add … | |
I get a warning about recursion when I compile the code below. I think the warning is wrong. Here is the background. I have two functions which "add a layer" to a DXF file. They have the same names but different parameters. One of them takes a CString and one … | |
As far as normal ascii is concerned can I compare a wchar_t with a char type to see if they are equal? I think, but do not know, that the most common ASCII chars have the same integer value in char and wchar_t. Is that true? Do I need to … |
The End.