Click here to Skip to main content
15,912,457 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Resource ID for dynamically created component Pin
l a u r e n22-Feb-01 6:09
l a u r e n22-Feb-01 6:09 
GeneralRe: Resource ID for dynamically created component Pin
Erik Funkenbusch22-Feb-01 12:54
Erik Funkenbusch22-Feb-01 12:54 
QuestionHow to get ip and customer id again!!! Pin
21-Feb-01 21:48
suss21-Feb-01 21:48 
AnswerRe: How to get ip and customer id again!!! Pin
Le Ridder Noir21-Feb-01 22:01
Le Ridder Noir21-Feb-01 22:01 
GeneralDataBase and ATL Pin
ov21-Feb-01 21:42
ov21-Feb-01 21:42 
GeneraliJpeg Image Pin
21-Feb-01 21:38
suss21-Feb-01 21:38 
GeneralRe: iJpeg Image Pin
22-Feb-01 1:46
suss22-Feb-01 1:46 
GeneralHELP! User-defined Msg caused illegal operation at run time Pin
21-Feb-01 19:23
suss21-Feb-01 19:23 
I've defined a private message in my MainFrm.h as below:
#define UWM_USER_APPLY WM_APP+17
afx_msg LRESULT OnUserApply(WPARAM wparam, LPARAM lparam);

In MainFrm.cpp, I've added this within the message-map macro:
ON_MESSAGE(UWM_USER_APPLY,OnUserApply)


I've created a property sheet, when user press "Apply" button, I do the following:

void COptionSheet::OnApply(){
GetActivePage()->UpdateData();
HWND hwnd=AfxGetMainWnd()->m_hWnd;
::SendMessage(hwnd,UWM_USER_APPLY,(WPARAM)this,0);
m_pg1.SetModified(FALSE);
m_pg2.SetModified(FALSE);
}

It work fine at debug version, when I build the release version, it'll cause "illegal operation" at the line:

::SendMessage(hwnd,UWM_USER_APPLY,(WPARAM)this,0);

If I simply changed it to a standard WM_, it'll work. For example:
::SendMessage(hwnd,WM_ENABLE,(WPARAM)this,0);

I'm using Visual C++ 6.0 with SP4 on Win98. I've tried both in NT and Win98, both have the same bad result.

Please help. Thanks in advance.
GeneralRe: HELP! User-defined Msg caused illegal operation at run time Pin
Tim Deveaux22-Feb-01 3:45
Tim Deveaux22-Feb-01 3:45 
GeneralWinsock & SOCKS Pin
Amit Jain21-Feb-01 16:28
Amit Jain21-Feb-01 16:28 
QuestionC++ equivalent of C getch()? Pin
21-Feb-01 15:41
suss21-Feb-01 15:41 
AnswerRe: C++ equivalent of C getch()? Pin
Amit Jain21-Feb-01 16:39
Amit Jain21-Feb-01 16:39 
GeneralRe: C++ equivalent of C getch()? Pin
Christian Graus21-Feb-01 17:35
protectorChristian Graus21-Feb-01 17:35 
GeneralRecord Headers in ListBox and retrival Pin
Ariel21-Feb-01 14:21
Ariel21-Feb-01 14:21 
GeneralTrying to Lock some Records in ODBC - CRecordset Pin
Ariel21-Feb-01 14:13
Ariel21-Feb-01 14:13 
Generalplease...please... Pin
hahyojin21-Feb-01 13:24
hahyojin21-Feb-01 13:24 
GeneralRe: please...please... Pin
Le Ridder Noir21-Feb-01 22:03
Le Ridder Noir21-Feb-01 22:03 
GeneralRe: I know...ㅠㅠ Pin
21-Feb-01 22:09
suss21-Feb-01 22:09 
GeneralUpdate an array of strings in a DLL Pin
21-Feb-01 11:57
suss21-Feb-01 11:57 
GeneralRe: Update an array of strings in a DLL Pin
Julien22-Feb-01 16:22
Julien22-Feb-01 16:22 
GeneralRe: Update an array of strings in a DLL Pin
23-Feb-01 3:08
suss23-Feb-01 3:08 
GeneralCEdit::GetLine HELP!!! Pin
Antonio21-Feb-01 11:30
Antonio21-Feb-01 11:30 
GeneralRe: CEdit::GetLine HELP!!! Pin
l a u r e n21-Feb-01 20:53
l a u r e n21-Feb-01 20:53 
GeneralRe: CEdit::GetLine HELP!!! Pin
Julien22-Feb-01 16:35
Julien22-Feb-01 16:35 
GeneralSome help with rand()! Pin
21-Feb-01 11:25
suss21-Feb-01 11:25 

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.