Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Iterate through controls on Dialog Box Pin
User 665827-Dec-04 6:38
User 665827-Dec-04 6:38 
GeneralRe: Iterate through controls on Dialog Box Pin
Mandar D. Sahasrabuddhe31-Dec-04 0:21
professionalMandar D. Sahasrabuddhe31-Dec-04 0:21 
GeneralNot quite understand TRACKMOUSEEVENT & _TrackMouseEvent() Pin
LiYS26-Dec-04 22:41
LiYS26-Dec-04 22:41 
GeneralRe: Not quite understand TRACKMOUSEEVENT & _TrackMouseEvent() Pin
User 665827-Dec-04 6:16
User 665827-Dec-04 6:16 
GeneralCommunicate with USB device Pin
ty cheng26-Dec-04 20:25
ty cheng26-Dec-04 20:25 
Generaldevice driver Pin
vc-programmer-26-Dec-04 19:04
vc-programmer-26-Dec-04 19:04 
GeneralRe: device driver Pin
Henry miller27-Dec-04 3:34
Henry miller27-Dec-04 3:34 
Generala problem about dll Pin
yingkou26-Dec-04 19:03
yingkou26-Dec-04 19:03 
I have written a dll,codes as below:
void __declspec(dllexport) __stdcall TestDialog(HWND hWnd)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
AfxSetResourceHandle(theApp.m_hInstance);
AfxEnableControlContainer();
CTestDlg dlg;
dlg.DoModal();
AfxSetResourceHandle(AfxGetInstanceHandle());
}

void TestHello(HWND hWnd)
{
hMainDlg=hWnd;
MessageBox(hMainDlg,"Hello","Test",MB_OK);
}

µ÷Óãº

typedef void (*TestHello)(HWND);
TestHello t=NULL;
HINSTANCE hin=LoadLibrary("Test.dll");
if(NULL == hin)
return ;
t=(TestHello)GetProcAddress(hin,"TestHello");
if(NULL == t)
return;
t(m_hWnd);
FreeLibrary(hin);

typedef void (__stdcall *TestDlg)(HWND);
hin=LoadLibrary("TestHello.dll");
if(NULL == hin)
return ;
TestDlg t1=(TestDlg)GetProcAddress(hin,"TestDialog");
if(NULL == t1)
return;
t1(m_hWnd);
FreeLibrary(hin);

both the dll and exe are ok,but if I change
typedef void (*TestHello)(HWND);
into
typedef void (__stdcall*TestHello)(HWND);

Error happens in EXE,correspondingly.
typedef void (__stdcall *TestDlg)(HWND);
into
typedef void (*TestDlg)(HWND);

EXE also has a error







Generalproblems with istream Pin
BSRK26-Dec-04 19:02
BSRK26-Dec-04 19:02 
GeneralRe: problems with istream Pin
ThatsAlok26-Dec-04 19:34
ThatsAlok26-Dec-04 19:34 
Generalrawinput in background Pin
balaclavabob26-Dec-04 18:44
balaclavabob26-Dec-04 18:44 
GeneralMultithreading Anti-Patterns Pin
SpaceMonkey_uk26-Dec-04 17:52
SpaceMonkey_uk26-Dec-04 17:52 
GeneralButton size algorithm Pin
Chris Hills26-Dec-04 16:31
Chris Hills26-Dec-04 16:31 
GeneralRe: Button size algorithm Pin
PJ Arends26-Dec-04 22:20
professionalPJ Arends26-Dec-04 22:20 
Generaltwo errors in using GDI+ &VC++.net Pin
Brillianxe26-Dec-04 16:13
sussBrillianxe26-Dec-04 16:13 
GeneralRe: two errors in using GDI+ &VC++.net Pin
wpxu26-Dec-04 21:01
professionalwpxu26-Dec-04 21:01 
GeneralRe: two errors in using GDI+ &VC++.net Pin
PJ Arends26-Dec-04 21:49
professionalPJ Arends26-Dec-04 21:49 
GeneralCrystal Reports... Pin
dSolariuM26-Dec-04 15:39
dSolariuM26-Dec-04 15:39 
GeneralModeless Propertysheet Pin
lisoft26-Dec-04 15:27
lisoft26-Dec-04 15:27 
GeneralRe: Modeless Propertysheet Pin
PJ Arends26-Dec-04 21:45
professionalPJ Arends26-Dec-04 21:45 
GeneralRe: Modeless Propertysheet Pin
lisoft27-Dec-04 13:40
lisoft27-Dec-04 13:40 
QuestionHow to display a specifique layer from a photoshop file ? Pin
Dani10000126-Dec-04 15:26
Dani10000126-Dec-04 15:26 
Questionwhat's the unit of the return value of GetTextExtent()? Pin
Fei Xu26-Dec-04 15:14
Fei Xu26-Dec-04 15:14 
QuestionHow to change the button's text color? Pin
chenbuaa26-Dec-04 14:02
chenbuaa26-Dec-04 14:02 
GeneralEnums alignment Pin
TheSharkOfDil26-Dec-04 8:57
sussTheSharkOfDil26-Dec-04 8:57 

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.