Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAmpersand usage in C++ ? Pin
LudaLuda26-Jan-04 3:27
LudaLuda26-Jan-04 3:27 
AnswerRe: Ampersand usage in C++ ? Pin
David Crow26-Jan-04 4:36
David Crow26-Jan-04 4:36 
AnswerRe: Ampersand usage in C++ ? Pin
Antti Keskinen26-Jan-04 6:09
Antti Keskinen26-Jan-04 6:09 
AnswerRe: Ampersand usage in C++ ? Pin
John R. Shaw26-Jan-04 6:10
John R. Shaw26-Jan-04 6:10 
GeneralTemplates and DLLs from VC6 - VC.net Pin
Leifen26-Jan-04 3:19
Leifen26-Jan-04 3:19 
GeneralCustom Controls - Notifications Pin
peterchen26-Jan-04 1:59
peterchen26-Jan-04 1:59 
GeneralSubclass Pin
Dennis L26-Jan-04 0:45
Dennis L26-Jan-04 0:45 
GeneralRe: Subclass Pin
jhwurmbach26-Jan-04 1:42
jhwurmbach26-Jan-04 1:42 
Dennis L wrote:
WNDPROC OldEditControl; // as a global

OldEditControl = (WNDPROC)SetWindowLong(GetDlgItem(hwnd, IDC_NUM), GWL_WNDPROC, (LONG)EditProc);


It seems you are doing funny things with the return value of the window-function. MSDN has the following information about SetWindowLongs return value:
<br />
 If the function succeeds, the return value is the previous value of the specified 32-bit integer.<br />
<br />
If the function fails, the return value is zero. To get extended error information, call GetLastError. <br />
<br />
If the previous value of the specified 32-bit integer is zero, and the function succeeds, the return value is zero, but the function does not clear the last error information. This makes it difficult to determine success or failure. To deal with this, you should clear the last error information by calling SetLastError(0) before calling SetWindowLong. Then, function failure will be indicated by a return value of zero and a GetLastError result that is nonzero.


It simply is no WNDPROC value.



Who is 'General Failure'? And why is he reading my harddisk?!?
GeneralVC++ .Net migration problem Pin
dene9997026-Jan-04 0:42
dene9997026-Jan-04 0:42 
GeneralRich edit custom line breaking Pin
Shah Shehpori26-Jan-04 0:34
sussShah Shehpori26-Jan-04 0:34 
GeneralRe: Rich edit custom line breaking Pin
Duncan Edwards Jones26-Jan-04 1:46
professionalDuncan Edwards Jones26-Jan-04 1:46 
GeneralRich edit Pin
edwinak26-Jan-04 0:18
edwinak26-Jan-04 0:18 
GeneralRe: Rich edit Pin
David Crow26-Jan-04 2:36
David Crow26-Jan-04 2:36 
General__try / __finally Pin
IceBerG7125-Jan-04 23:58
IceBerG7125-Jan-04 23:58 
GeneralRe: __try / __finally Pin
jhwurmbach26-Jan-04 1:52
jhwurmbach26-Jan-04 1:52 
GeneralRe: __try / __finally Pin
Tim Smith26-Jan-04 4:26
Tim Smith26-Jan-04 4:26 
GeneralRe: __try / __finally Pin
jhwurmbach26-Jan-04 5:03
jhwurmbach26-Jan-04 5:03 
GeneralRe: __try / __finally Pin
IceBerG7126-Jan-04 15:07
IceBerG7126-Jan-04 15:07 
GeneralRe: __try / __finally Pin
jhwurmbach26-Jan-04 21:11
jhwurmbach26-Jan-04 21:11 
Generalreading data from the modem Pin
farrrukh25-Jan-04 23:19
farrrukh25-Jan-04 23:19 
QuestionHow to detect a new device was installed ? (What message/event?) Pin
Led25-Jan-04 22:17
Led25-Jan-04 22:17 
AnswerRe: How to detect a new device was installed ? (What message/event?) Pin
Prakash Nadar25-Jan-04 22:20
Prakash Nadar25-Jan-04 22:20 
GeneralRe: How to detect a new device was installed ? (What message/event?) Pin
Led25-Jan-04 22:24
Led25-Jan-04 22:24 
Generalupdate removable drive info. Pin
Member 80599925-Jan-04 22:06
Member 80599925-Jan-04 22:06 
GeneralWin32 api -ADO- question Pin
Scozturk25-Jan-04 21:56
professionalScozturk25-Jan-04 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.