Thread View: comp.windows.ms.programmer
1 messages
1 total messages
Started by Y. Lan
Tue, 28 Jul 1992 14:00
Problem with MakeProcInstance. Help...
Author: Y. Lan
Date: Tue, 28 Jul 1992 14:00
Date: Tue, 28 Jul 1992 14:00
80 lines
2358 bytes
2358 bytes
Hi! my honourable friends:
Could anybody tell me why I can not MakeProcInstance the following
FARPROC ? I can compiler it, but when I run it, it causes
"Unrecoverabale Error".
I checked with Turbo Debugger, the message is
Exception 13 Exit code 0.
What does this mean? (I can not understand the help)
Is anything wrong with INITDIALOG ?
Please help !!
Lan
BOOL FAR PASCAL DwinProc(HWND hdlg, WORD message,
WORD wParam, LONG lParam)
{
HWND hctrl;
char str[12];
short cid; // control id
float prmden ; // prism density
switch(message)
{
case WM_INITDIALOG:
hctrl = GetDlgItem(hdlg,101);
SetScrollRange(hctrl,SB_CTL,1000,8000,FALSE);
SetScrollPos(hctrl,SB_CTL,2500,FALSE);
hctrl = GetDlgItem(hdlg,102);
SetScrollRange(hctrl,SB_CTL,1000,8000,FALSE);
SetScrollPos(hctrl,SB_CTL,2500,FALSE);
hctrl = GetDlgItem(hdlg,105);
sprintf(str,"%f5.1",bkden);
SetDlgItemText(hdlg,105,str);
return TRUE;
case WM_HSCROLL:
hctrl = HIWORD(lParam);
cid = GetWindowWord(hctrl,GWW_ID);
if(cid == 103 ){ // the background density scroll
switch(wParam)
{
case SB_LINEUP :
bkden -=1;
break;
case SB_LINEDOWN :
bkden += 1;
break;
case SB_PAGEUP :
bkden -= 8;
break;
case SB_PAGEDOWN :
bkden += 8;
break;
case SB_THUMBPOSITION :
bkden = LOWORD(lParam);
break;
}
if(bkden < 1000) bkden = 1000;
if(bkden > 8000) bkden = 8000;
if(bkden !=GetScrollPos(hctrl,SB_CTL)){
SetScrollPos(hctrl,SB_CTL,bkden,TRUE);
hctrl = GetDlgItem(hdlg,105);
sprintf(str,"%f5.1",bkden);
SetDlgItemText(hdlg,105,str);
}
}
// another scroll bar message should be processed below:
return TRUE;
} //switch message
} // DwinProc
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads