Hi,
When trying to subclass an richedit control within a
class, I ran accross a problem. When I include a
subclass procedure in a class (the code shown below),
I get the error (Generated by Dev-C++): "aggregate
value used where an integer was expected", yet when I
include the subclass procedure outside the class, it
runs fine. How can I solve this?
class akorichedit{
private:
//...
WNDPROC wpOrigRichEditProc;
LRESULT CALLBACK RichEditSubclassProc(HWND hwnd, UINT
uMsg, WPARAM wParam, LPARAM lParam);
//...
public:
void create();
//...
};
void akorichedit::create(){
//... ERROR BELOW
wpOrigRichEditProc =(WNDPROC) SetWindowLong(
(HWND)_hwnd, // handle of window
(int)GWL_WNDPROC, // offset of value to set
(LONG)RichEditSubclassProc
); // LINE 130
//... ERROR ABOVE
}
//...
LRESULT CALLBACK
akorichedit::RichEditSubclassProc(HWND hwnd, UINT
uMsg, WPARAM wParam, LPARAM lParam){
//...
}
Respectfully,
Brian
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|