Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
80% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
~21.7K People Reached
Favorite Tags

53 Posted Topics

Member Avatar for owenransen

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 …

Member Avatar for Masterblank
0
225
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
317
Member Avatar for chumli
Member Avatar for ceelos1974

Use wcscpy_s or wcscpy for widechars, which correspond to strcpy_s and strcpy for chars. Note also you need buffers for these functions.

Member Avatar for vijayan121
0
321
Member Avatar for owenransen

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 …

Member Avatar for whlookup
0
229
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
345
Member Avatar for ahmad313
Member Avatar for owenransen

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, …

Member Avatar for owenransen
0
205
Member Avatar for andrew mendonca

I replied to this thread yesteday explaining a big error in the code, but my reply has gone. Daniweb?

Member Avatar for owenransen
0
1K
Member Avatar for Geek1024

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 …

Member Avatar for owenransen
0
152
Member Avatar for andrew mendonca

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 …

Member Avatar for owenransen
0
528
Member Avatar for cambalinho

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.

Member Avatar for cambalinho
0
292
Member Avatar for PulsarScript

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 …

Member Avatar for owenransen
0
189
Member Avatar for Wayne.H94

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 …

Member Avatar for owenransen
0
171
Member Avatar for owenransen

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 …

0
118
Member Avatar for Dannyv79
Member Avatar for naina125
0
223
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
269
Member Avatar for chlyre
Member Avatar for rubberman
-2
128
Member Avatar for owenransen

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 …

0
144
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
206
Member Avatar for Jorox03

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 …

Member Avatar for Jorox03
0
4K
Member Avatar for nova37

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) ; } …

Member Avatar for nova37
0
901
Member Avatar for biepie70

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.

Member Avatar for owenransen
0
94
Member Avatar for khan111

We need more information... Do you know C++? Where will you draw the circle? How do you fix the radius?

Member Avatar for owenransen
0
83
Member Avatar for AmrMohammed

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 …

Member Avatar for deceptikon
0
161
Member Avatar for غادة

Learn by doing. Learn by mistakes. Learn by trying to understand. Hard, I know, but that's life!

Member Avatar for owenransen
0
155
Member Avatar for owenransen

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) ?

Member Avatar for Tumlee
0
700
Member Avatar for kw42chan

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 …

Member Avatar for owenransen
0
193
Member Avatar for owenransen

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 …

Member Avatar for LastMitch
0
163
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
198
Member Avatar for tiffany.leroux.7
Member Avatar for owenransen
0
460
Member Avatar for PixelExchange

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 …

Member Avatar for owenransen
0
710
Member Avatar for bhawin

You are probably still running the program you are trying to recompile and link.

Member Avatar for owenransen
0
190
Member Avatar for tomz6

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 …

Member Avatar for ahmedhamdy
0
586
Member Avatar for owenransen

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 …

Member Avatar for Ancient Dragon
0
274
Member Avatar for James19142

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 …

Member Avatar for James19142
0
2K
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
162
Member Avatar for asha12@gmail

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 …

Member Avatar for Agni
0
95
Member Avatar for owenransen

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 ==). …

Member Avatar for rubberman
0
126
Member Avatar for owenransen

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?

Member Avatar for pritaeas
0
75
Member Avatar for owenransen

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. …

Member Avatar for ktsangop
0
475
Member Avatar for chris.vargas.773
Member Avatar for np complete
0
194
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
246
Member Avatar for demingd

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 …

Member Avatar for WaltP
0
229
Member Avatar for Grandiago

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 …

Member Avatar for WaltP
0
167
Member Avatar for AlexSmith069

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 …

Member Avatar for owenransen
0
119
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
199
Member Avatar for owenransen

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 …

Member Avatar for mcriscolo
0
492
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
287
Member Avatar for owenransen

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 …

Member Avatar for owenransen
0
3K

The End.