hi
i only want to launch a DialogBox
the point is that the parent window is a shell window but that shouldn't be a problem
so i wrote : (ok basically it's msdn example )
...
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDM_DELETEITEM:
if (DialogBox(hinst,
MAKEINTRESOURCE(DLG_DELETEITEM),
hwnd, (DLGPROC)DeleteItemProc)==IDOK)
{
...
BOOL CALLBACK DeleteItemProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
...
...
this is how it's done almost everywhere
now when i try to buld it, i get :
error C2440: 'type cast' : cannot convert from '' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
to me that means that (DLGPROC) is not recognised !!!!! what could i do ???
if i change the call to :
DialogBox(hinst,MAKEINTRESOURCE(DLG_DELETEITEM), hwnd, DeleteItemProc)
i get :
error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'int (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
so i'm just missing the (__stdcall *) part ????
please help ! as you can see i'm a bit lost as i'm new to vc++ and not doing "standards" things !!!!
i only want to launch a DialogBox
the point is that the parent window is a shell window but that shouldn't be a problem
so i wrote : (ok basically it's msdn example )
...
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDM_DELETEITEM:
if (DialogBox(hinst,
MAKEINTRESOURCE(DLG_DELETEITEM),
hwnd, (DLGPROC)DeleteItemProc)==IDOK)
{
...
BOOL CALLBACK DeleteItemProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
...
...
this is how it's done almost everywhere
now when i try to buld it, i get :
error C2440: 'type cast' : cannot convert from '' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
to me that means that (DLGPROC) is not recognised !!!!! what could i do ???
if i change the call to :
DialogBox(hinst,MAKEINTRESOURCE(DLG_DELETEITEM), hwnd, DeleteItemProc)
i get :
error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'int (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
so i'm just missing the (__stdcall *) part ????
please help ! as you can see i'm a bit lost as i'm new to vc++ and not doing "standards" things !!!!