I'm guessing the numbers in the text file are padded with zeros to get a fixed width format, hence a -ve sign in the middle.
Just needs something to trim the leading zeros.
rgds
Andy
Just to elaborate on chipperMDW:
#include <iostream>
using std::cout;
using std::cin;
although I'm not sure that it needed any elaboration, concise and accurate as it was.
rgds
Andy
Straight from MSDN:
The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates.
COLORREF GetPixel(
HDC hdc, // handle to DC
int nXPos, // x-coordinate of pixel
int nYPos // y-coordinate of pixel
);
rgds
Andy
Have you considered a wrapper class, such as the one at
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
You can find plenty more examples with a quick google.
rgds
Andy
Assuming you are using the MinGW compiler (Dev-C++ is only an IDE, and can be used with other compilers), have a look at the bottom of this page:
http://www.bloodshed.net/faq.html
rgds
Andy
Nice idea :)
Unfortunately, I can't use CallByName in an SQL statement, at least not directly. If I wrap the call inside a function that resides in the .mdb (or referenced .mde), just like the MyFunc example above does with the Replace function, then it can be used, but that brings me back to...
I do understand all you say regarding the difference between Access and the database engine it is using, but say I have:
' Test function for illustration
Public Function MyFunc(varValue as Variant) as Variant
If Not IsNull(varValue) Then
varValue =...
Bad news? Not at all. I'm no worse off for your comments - I can still do what I need to with the work arounds I'm currently using. Just much more slowly :)
But why can I use the very same functions in this manner if I copy/paste the code into a code module of a seperate .mdb and then set a...
I've written a COM Add-In for Access 2000. While most of it seems to work OK, I'm having trouble executing any SQL statements (using a Command object) that contain custom functions, e.g.
strSQL = "UPDATE MyTable " & _
"SET MyField = StrConv(MyField, vbUpperCase)"...
Why not declare the variables properly, eg Dim intA as Integer, or Dim lngB as Long. At the moment you've got them declared as variants. Then use Val(Text1.Text) to assign the value to the variable.
rgds
Andy
Close, but by using finder.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY
it misses any folders marked as Read-Only, System, etc..
If I change the bitwise-AND operator to '==' in the code I was trying to use it has the same effect.
rgds
Andy
Haven't had a chance to test this in C/C++, but it works fine in VB:
SendMessage(hwndOfEditBox, WM_SETTEXT, NULL, string), where "string" is the text you wish to fill the edit box with.
rgds
Andy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.