|
You last visited: Today at 01:30
Advertisement
[C++]Problem FindWindow
Discussion on [C++]Problem FindWindow within the C/C++ forum part of the Coders Den category.
05/01/2011, 11:41
|
#16
|
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
|
|
|
|
05/01/2011, 13:11
|
#17
|
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
|
Quote:
|
Rewrite the code every time you want to port it to a new operating system?
|
Die Idee finde ich doch ganz sinnvoll.[/IRONIE]
Nun gut, solange ich weiß, dass ich auf einer 32bit Maschine kompiliere und ich nicht vorhabe meinen Code weiter zu verbreiten, solange kann ich auf diesen Datentyp ja verzichten, auch wenn es schlechter Stil ist.
|
|
|
05/01/2011, 13:38
|
#18
|
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
|
Verstehe den Grund nicht. long ist doch 8 Bytes, also genau die Größe, die ein Pointer auf x64 hat.
|
|
|
05/01/2011, 13:56
|
#19
|
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
|
Nicht unbedingt. Bei mir ist long 4Bytes groß (sizeof()). Hängt stark von dem verwendeten Compiler ab.
EDIT: long long wäre 8Bytes groß. Was ja dann auch logisch ist. Mit unsigned long long könnte man also auf den Windows-Datentyp verzichten. Jedoch wäre das auf einer 32Bit Maschine Speicherverschwendung.
|
|
|
05/01/2011, 19:58
|
#20
|
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
|
Stimmt nicht ganz, in VS scheint das zwar so zu sein, aber eigentlich hat long laut C++ Standard 8 Bytes!
|
|
|
05/01/2011, 20:11
|
#21
|
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
|
Quote:
The standard does not specify the size in bytes, but it specifies minimum ranges that various integral types must be able to hold. You can infer minimum size in bytes from it.
Minimum ranges guaranteed by the standard (from "Integer Types In C and C++"):
signed char: -127 to 127
unsigned char: 0 to 255
"plain" char: -127 to 127 or 0 to 255 (depends on default char signedness)
signed short: -32767 to 32767
unsigned short: 0 to 65535
signed int: -32767 to 32767
unsigned int: 0 to 65535
signed long: -2147483647 to 2147483647
unsigned long: 0 to 4294967295
signed long long: -9223372036854775807 to 9223372036854775807
unsigned long long: 0 to 18446744073709551615
Actual platform-specific range values are found in <limits.h> in C, or <climits> in C++ (or even better, templated std::numeric_limits in <limits> header).
|
Source:
|
|
|
05/02/2011, 17:17
|
#22
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,385
Received Thanks: 1,006
|
Ich hab mir auch ein ebook zu C++ geholt indem folgendes steht:
Code:
Ein long belegt auf 64-Bit-Prozessoren also beispielsweise 8 Bytes.
|
|
|
 |
|
Similar Threads
|
C++ Winapi FindWindow Problem
01/27/2011 - C/C++ - 0 Replies
Hi,
hab folgendes Problem:
Will ein Fenster umbennen, das will aber nicht wirklich.
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
|
[C++]FindWindow findet nichts.
09/13/2010 - C/C++ - 18 Replies
http://www.paste-code.com/paste.php?id=kbC95ZHRry
Aber sobald ich zum Beispiel :
FindWindow(NULL,"PVP.net-Client") angebe, findet er es und gibt mir dann die HWND aus.
Wo liegt das problem?
Ich hab es auch schon so:
FindWindow("\\„League of Legends\\“-Startprogramm - 1,0,0,31 - ", NULL); versucht, geht trozdem nicht :/
|
FindWindow parameter richtig nutzen...
06/15/2010 - General Coding - 14 Replies
HWND xxx = FindWindow(NULL ,"XXX");
ShowWindow(xxx, SW_RESTORE);
FindWindowW': Konvertierung des Parameters 2 von 'const char ' in 'LPCWSTR' nicht möglich
<<
Diese meldung beim compilen
|
Kal FindWindow help
12/15/2008 - Kal Online - 2 Replies
yup, what the title is saying, i'm trying to find the window of kalonline ... but failed.... dont work idk why, name is correct.... hope someone can help
Source:
// Basic Include's
#include <windows.h>
#include <iostream>
// The Namespace
|
All times are GMT +1. The time now is 01:32.
|
|