Hi,
A few weeks back I modified my code and found that i cannot work anymore. In the file Intoxicator.asm, this code will always return NULL from what I got in my debugger and the error will always be "Invalid Window Handle" even though I never changed this line of code and it worked in previous versions of my program:

invoke CreateDialogParam, hInstance, IDD_DIALOG2, hTabCtrl, OFFSET DialogProc, 0


Please take a look and my code and help me. Thnx in advance.

--- attachment removed, please read the rules ---
Posted on 2003-02-08 03:20:52 by SubzeroHeat
I don't think you will get much help here.

Did you read the forum rules?
Posted on 2003-02-08 04:28:43 by Guerrilla
What is so bad about CreateDialogParam? Anyway if you are getting an error message that says invalid window handle then I'm guessing hTabCtrl is an invalid window handle?
Posted on 2003-02-08 05:02:45 by BubbaFate
Strange situation,what about is it?
Posted on 2003-02-08 07:10:10 by Vortex
This current attachment has no spamming code. ANyways, CreateDialogParam returns NULL for any HWND handles that i supply.
Posted on 2003-02-08 07:58:10 by SubzeroHeat
You specify a child window as owner of a dialog. I guess that is not allowed, even if your dialog is a WS_CHILD as well.
Posted on 2003-02-08 12:00:16 by japheth
i copied and pasted your code and everything works, i did not use your data section however so I am guessing this is where the problem lyes
and btw, of course you can make a dialog a child of another window, thats what tab controls are all about... and imho u should use the property sheet api to create tab controls because regular tab controls and windows xp dont mix.
Posted on 2003-02-08 13:55:31 by BubbaFate
Thanx for the advice, but can you please send me your code? Thnx.
Posted on 2003-02-10 02:25:30 by SubzeroHeat
its a little banged up... but essentially the same =/
Posted on 2003-02-10 02:42:39 by BubbaFate
Sorry to be bothering again, but I still can't find the irritating bug. I've tried searching the whole source code, but I couldn't find any, so I haf included all my source code, but I haf removed the email spamming module. SO thnx in advance for any help.
Posted on 2003-02-10 04:06:05 by SubzeroHeat
In your source you specify:

invoke CreateDialogParam, hInstance, IDD_DIALOG2, hTabCtrl, OFFSET WndProc, 0

WndProc is a window proc, but it should be a dialog proc (with no calls to DefWindowProc allowed)

And a richedit control in a dialog requires to load that library before.
Posted on 2003-02-10 13:17:05 by japheth
Tried your advice, but it still returns the same error. One thing to note though my current way of putting it in the WndProc function worked in my last version even though there was DefWindowProc.
Posted on 2003-02-11 03:52:15 by SubzeroHeat
to get it runnin all u need to do is add this before you start creating dialogs...
.data

szRicheditDll db "riched32.dll", 0
.code
invoke LoadLibrary, addr szRicheditDll


Dont change that defwindowproc mess, it fails for some odd ball reason =/
Posted on 2003-02-11 07:26:38 by BubbaFate
Yeah, I tried that, but it doesnt work. Even when i remove the richedit control totally. Thnx a lot, anyways.
Posted on 2003-02-11 08:19:24 by SubzeroHeat