Hey,

I've been following Iczelion's tuts, and got to tut 10 ... where, when I copied both tutorial example code into radASM (nice app BTW), they compiled fine ... but, the dialog box wasn't being displayed.

Thanks in advance,
Posted on 2002-09-02 07:04:05 by Dracton
To create an app based on a dialog here's all you need

You'll need to replace standard.inc with
the various inc and lib files which virtually all programs will need.
It's a radasm project so as long as you've got radasm set up properly then it should compile
Posted on 2002-09-02 07:45:37 by MArtial_Code
Hey,

So, what your saying is, in order for me to create a dialog box as my main window, I have to replace to normal includes of kernel32.inc, user32.inc, etc tec to features.inc and standard.inc ?!?

But the tutorials don't ? They just use the normal includes. If I was to change the normal includes to the new ones you have told me too, and I still use kernel32.inc and the others ?

My code compiles fine, it's just that the dialog box isn't being displied ?? And I don't understand why ?

Thanks for the help, hope you can help me again here, and give me more advice :)
Posted on 2002-09-03 06:39:38 by Dracton
hey,

I just had a quick glance and I noticed that you're not calling CreateDialogParam correctly...
MSDN defines it like this :


HWND CreateDialogParam( HINSTANCE hInstance,
LPCTSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc,
LPARAM dwInitParam
);


You're missing to specify the lpDialogFunc which should be pointing at the WndProc in your case.

So call it like this:


invoke CreateDialogParam, hInstance, addr TemplateName, hwnd, addr WndProc, 0


Regards,
JimmyClif
Posted on 2002-09-03 07:15:27 by JimmyClif
Hey,

But how do I obtain the hWnd .... don't for get, it being used as the main window, so it WILL be the main window ... so where am I getting this hWnd from ??
Posted on 2002-09-03 07:17:49 by Dracton
Heya,

Forget about the earlier CreateDialogParam nonsense I told you, I see Icz did the same as you did.

Did you try using Icz original .rc file with your code ?

Or try compiling the rc file with
#define MyDialog 1000
commented out as your not using that in your proggy either.

(I can't try it out as I'm at work ;) )
Posted on 2002-09-03 08:29:31 by JimmyClif
Hi Dracton

Here I have it working.

KetilO
Posted on 2002-09-03 09:04:56 by KetilO
Your a god Ketilo ... and you can pat my sheep ;)

Thanks for your help JimmyClif :P

Ketilo, it would help if you told me what you did ?

Here's another way you can create a dialog box as the main window, this isn't working too (sorry !!) .... Could help me out here could ya ?

I think I know what you did to the last DlgTest2 file Ketilo, but am not totally sure, so you'll have to tell me to make sure am right :)
Posted on 2002-09-04 07:51:33 by Dracton
Here it is ... thye second one am having trouble with !!!
Posted on 2002-09-04 08:05:57 by Dracton