|
|
Hello
I Am building a windows form application that accept an expression involving two variables and two numerical values for the variables through a text box.
the App is then suppose to display a functional value for the user.
I tried everything possible but keep getting error "input string was not in correct format"
Thanks in advance for your help (anyone).
|
|
|
|
|
F_Square wrote: error "input string was not in correct format" Most likely you are trying to convert some characters into a numeric, but it contains letters or special characters. However, since you have not shown us your code, or the data that it is trying to access, that is just a guess.
|
|
|
|
|
you're right
what I want the program to do is accept an expression involving two variables from the user together with values.
the program is then suppose to return a functional value as double
|
|
|
|
|
That sounds simple enough.
|
|
|
|
|
Hi,
Need technical help . I am debugging the code and getting this
"Source information is missing from the debug information for this module" . while debuggin.
I am referring .dll in the code, that .dll is also build debug. and while debugging the code i have added (dll refered) project
in my project. still it not loading to breakpoint.
Could you please guide me on this?
|
|
|
|
|
Check your project settings for the dll file to ensure that all the debugging information is being created when the file is built.
|
|
|
|
|
Whether that dll is built in debug mode doesn't matter for debugging, in spite of the name! What you need is the .pdb file for that DLL. The .pdb file contains all the references that link the compiled code segments to the original code statements. If you have the .pdb, make sure it's accessible, e. g. in the same directory as the .dll file, or in the directory of your application.
If you have that DLL in your solution, includ9ing the source code, you should check your build options and make sure a .pdb is actually built.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Hi there, I am having the big problem with getting the area of hwind with
routine GetWindowRect. Even Spy++ or his implementation returns rectangle, that is smaller than real
area. Its a some special kind of application, I am looking for some alternative to GetWindowRect,
or how can I get all the window area programmatically correct.
|
|
|
|
|
The GetWindowRect function returns the correct size of any window. If your code is not working then you need to provide more details.
|
|
|
|
|
Its casino application, I am using GetWindowRect standard way.
|
|
|
|
|
Sorry, but that tells us nothing.
|
|
|
|
|
Could you show your code?
|
|
|
|
|
HWND hwnd = FindWindow("HwndWrapper[PokerClient.exe;;518cf654-e6cb-47c5-9916-be16cbf1e961]", NULL);
GetWindowRect(hwnd, &wr);
AdjustWindowRect(&wr, WS_BORDER, true);
As I said its weird behaviour of GetWindowRect
Edited code, it was from the last operation when I was trying
get also parent window.
modified 30-Mar-20 7:59am.
|
|
|
|
|
lacir wrote:
HWND hwnd = FindWindow("HwndWrapper[PokerClient.exe;;518cf654-e6cb-47c5-9916-be16cbf1e961]", NULL);
GetWindowRect(parrent, &wr);
AdjustWindowRect(&wr, WS_BORDER, true);
You call FindWindow but then ignore the value it returns.
Then you are using some other value parrent as a windows handle to obtain the window rectangle for.
Is it what you want?
|
|
|
|
|
This line:
GetWindowRect(parrent, &wr);
Should (probably!) either be:
GetWindowRect(hwnd, &wr);
Or:
GetWindowRect(GetParent(hwnd), &wr);
|
|
|
|
|
I don't know...
The OP seems to disappear...
|
|
|
|
|
You are calling AdjustWindowRect with the Window's dimensions. But the first parameter to AdjustWindowRect is supposed to be the dimensions of the client area of the Window.
|
|
|
|
|
i have the Following vb.net 2008 routine i am trying to get c++ to have the same functionality having alot of issues with c++ conversion, any help with this would be great...
Public Sub New()
Try
If ORIHoles Is Nothing Then
ReDim ORIHoles(49)
Dim ff As Integer = FreeFile()
Dim tempstr As String
Dim atempstr() As String
FileOpen(ff, "postable.csv", OpenMode.Input, OpenAccess.Read, OpenShare.Shared)
Do While Not EOF(ff)
tempstr = LineInput(ff)
atempstr = tempstr.Split(",")
If atempstr.GetUpperBound(0) = 2 Then
ORIHoles(CInt(atempstr(0))).Angle = CDbl(atempstr(1))
ORIHoles(CInt(atempstr(0))).Hypot = CDbl(atempstr(2))
End If
Loop
FileClose(ff)
End If
Catch ex As Exception
GeneralErrorHandler(ex.ToString)
End Try
End Sub
|
|
|
|
|
ccodebase wrote: having alot of issues with c++ conversion Unless you tell us what thos issues are we cannot help you correct them. And please post your questions once only.
|
|
|
|
|
ok well, the issue is i need exact functionality in C++ with a class or function that performs as the vb.net code does, i do have this that i am hard coding all the Values into,
CSV Structure is
01,-0.12343,1.34532
02,-0.62343,1.74532
03,-0.22343,1.34532
04,-0.62343,1.74532
using namespace std;
int main()
{
map<int, int> mp;
mp.insert({ -0.12343, 1.34532});
mp.insert({ 0.22343, 1.74532});
mp.insert({ -0.12343, 1.34532});
mp.insert({ -0.12343, 1.34532});
auto it = mp.upper_bound(11);
cout << "The upper bound of key 11 is ";
cout << (*it).first << " " << (*it).second << endl;
it = mp.upper_bound(13);
cout << "The upper bound of key 13 is ";
cout << (*it).first << " " << (*it).second << endl;
it = mp.upper_bound(17);
cout << "The upper bound of key 17 is ";
cout << (*it).first << " " << (*it).second;
return 0;
}
9:23
The upper bound of key 11 is 12 30
The upper bound of key 13 is 14 40
The upper bound of key 17 is 4 0
|
|
|
|
|
Sorry I don't understand. You declare a map<int, int> and then try to store double values into it. And what are 11, 13 and 17 supposed to relate to?
|
|
|
|
|
so would it be
map<double, double>
|
|
|
|
|
If you want to save double values then obviously yes.
|
|
|
|
|
Try this:
map<int, int> mp;
mp.insert({5,7}); mp.insert({7,33});
mp.insert({11,1});
mp.insert({16,5});
auto it = mp.upper_bound(11);
cout << "The upper bound of key 11 is ";
cout << it->first << " " << it->second << endl;
|
|
|
|