What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » pParam ...

Pages: (3): « First « 1 [ 2 ] 3 » Last »
pParam ...
Author: Message:
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: pParam ...
Oki!
Thank you!
I want to display a dialog box :^)

I'm proceding like that... but it's not the good method :(
quote:

LRESULT CALLBACK MyDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
   switch (message)
   {
        case WM_INITDIALOG:
           return TRUE;
        case WM_COMMAND:
            if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
            {
                EndDialog(hDlg, LOWORD(wParam));
                return TRUE;
            }
         break;
    }
    return FALSE;
}
....
....
....
...
if(stricmp(sCommand, "/xdialog") == 0)
{       
   HWND hWnd=GetActiveWindow();
   HINSTANCE hInst = (HINSTANCE)GetModuleHandle(NULL);         
   DialogBox(hInst , (LPCTSTR)IDD_DIALOG1, hWnd, (DLGPROC)MyDlg);
   return TRUE;
}




Could you help me please ?


       

This post was edited on 09-01-2004 at 07:25 PM by WDZ.
08-30-2004 01:58 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: pParam ...
Change DialogBox(hInst , (LPCTSTR)IDD_DIALOG1, hWnd, (DLGPROC)MyDlg);
to DialogBox(hInst , MAKEINTRESOURCE(IDD_DIALOG1), hWnd, (DLGPROC)MyDlg);

This works with VC++: not sure about others though. Also, make sure that you include the 'resource.h' file in all cpp files that deal with the dialog.
[Image: spartaafk.png]
08-30-2004 01:58 PM
Profile PM Web Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: pParam ...
Hi,

thanks for your answer...

but it's the same thing... when i'm trying /xdialog, that's doing nothing at all :S


This post was edited on 08-31-2004 at 12:58 AM by Orkblutt.
08-31-2004 12:57 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: pParam ...
You clould also try using strcmp() instead of stricmp().

Basically, just try all sorts.
[Image: spartaafk.png]
08-31-2004 09:21 AM
Profile PM Web Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: pParam ...
yes yes :)
but the problem isn't here...

the DialogBox fails... but don't know why :s
08-31-2004 10:09 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: pParam ...
You may want to check the return value of DialogBox, and you may also like to look at GetLastError().
[Image: spartaafk.png]
08-31-2004 10:58 AM
Profile PM Web Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: pParam ...
DialogBox is failed and return -1
GetLastError give the error number 1813
1813 The specified resource type cannot be found in the image file.  ERROR_RESOURCE_TYPE_NOT_FOUND.

I've created my dialog with the Visual Studio editor. Just a basic window without new control.
The wizard have created and insered resource.h automaticaly in the project.
In MPPluginC.h, I have add  #include "resource.h"

my .rc file:

quote:
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_DIALOG1 DIALOGEX 0, 0, 206, 134
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
    WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,149,7,50,14
    PUSHBUTTON      "Annuler",IDCANCEL,149,24,50,14
END




I'm not undrstanding why this error? :s

This post was edited on 08-31-2004 at 03:32 PM by Orkblutt.
08-31-2004 03:18 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: pParam ...
quote:
Originally posted by Orkblutt
GetLastError give the error number 1813
When I tried getting DialogBox to work, I kept getting that. Never did find out why though.
[Image: spartaafk.png]
08-31-2004 09:50 PM
Profile PM Web Find Quote Report
Orkblutt
Junior Member
**

Avatar

Posts: 74
Joined: Aug 2004
O.P. RE: pParam ...
hummm :(

All people here is coding in VB ? No one in C++ ?

Patchou!! please!! help me :D

09-01-2004 12:34 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: pParam ...
Maybe TB could shed some light on this, as I've had this problem too.
Although I got round it by using VB :undecided:
[Image: spartaafk.png]
09-01-2004 09:23 AM
Profile PM Web Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On