Click here to Skip to main content
15,899,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalbasic_istream::get calls setstate(failbit) if no elements was extracted Pin
Per G26-Jan-04 3:31
Per G26-Jan-04 3:31 
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 
Hi Everyone!

I'm running WinXP and I have made a project in Win32 C++.
The problem is when I subclass a control(any control).
(In windows 98 I don't have this problem)

My subclass code is :

// IDC_NUM edit control ID

WNDPROC OldEditControl; // as a global

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

and the EditProc is :

LRESULT APIENTRY EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// My messages
return (LRESULT)CallWindowProc(OldEditControl, hwnd, msg, wParam, lParam);
}


the compiler shows me this warning messages:

warning C4311: 'type cast' : pointer truncation from 'LRESULT (__stdcall *)(HWND,UINT,WPARAM,LPARAM)' to 'LONG'

warning C4312: 'type cast' : conversion from 'LONG' to 'WNDPROC' of greater size


What's wrong?

GeneralRe: Subclass Pin
jhwurmbach26-Jan-04 1:42
jhwurmbach26-Jan-04 1:42 
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 

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.