Frage zu GetDlgItemInt
-
ich hab in msdn gelesen, aber mich irretiert folgendes
UINT WINAPI GetDlgItemInt(
__in HWND hDlg,
__in int nIDDlgItem,
__out_opt BOOL *lpTranslated,
__in BOOL bSigned
);bSigned [in]
BOOL
Indicates whether the function should examine the text for a minus sign at the beginning and return a signed integer value if it finds one (TRUE specifies this should be done, FALSE that it should not).return a signed integer value
Letzte Parameter gibt doch an, ob es nach minus zeichen am anfang der zeichenkette absucht und gibt gegebenfalls eine vorzeichenbehaftet zahl zurueck, doch der rueckgabewert ist unsigned int, also nur positive zahlen. hab ich falsch verstanden oder koennt ihr mich da aufklaeren?
-
Weiterlesen wär auch ned schlecht gewesen.
MSDN schrieb:
To obtain the proper value in this case, cast the return value to an int type.
Ist reine Interpretationssache:
unsigned int ui = -1; cout << hex << ui << endl; // ffffffff int si = 0xffffffff; cout << dec << si << endl; // -1