Hello EveryBody

I am having trouble trying to place a edit box and an ListView box inside the PDDEMO.asm.

This is from the example in the new masm32 version8 in the example folder named Dialogs.

I bend trying all day and can't seem to get anywhere. All i get is A4006: Too many argument and Constant value too long ERRORS.

It may be to new but have anyone worked this out or just know what to do. These Dialog Windows seem to
live and be ALL about Marcos and is very interesting. So another questions is do all Windows versions handle this type of coding including XP.

Thanks in advance
Posted on 2003-02-13 22:37:53 by cmax
I am still trying to work with the Dialog Examples. I now realize when it say pre-build it means PRE-BUILD. So maybe soon i can re-build the pre-built to suit my needs. But can someone P L E A S E test them out on XP so that i know what i am trying to do will work in XP machines ALSO. There is a executionable named PBDDEMO.exe and it it calls ICC_WIN95_CLASSES so i am afraid to continue because all of the work i have done HAS stay with all basic API calls so that it will always work on all Windows Versions. So i really need to know.

mov icce.dwICC, ICC_WIN95_CLASSES
invoke InitCommonControlsEx,ADDR icce

Posted on 2003-02-14 21:39:27 by cmax
ICC_WIN95_CLASSES does not mean that its only going to run on windows 95... look at this page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/common/structures/initcommoncontrolsex.asp as you can see from the table it simply means load support for animate control, header, hot key, list-view, progress bar, status bar, tab, ToolTip, toolbar, trackbar, tree-view, and up-down. AKA the common controls that have been supported by windows since windows 95. As far as getting that pbddemo running with an edit and listview, modify the code to the following...

    Dialog "Prebuilt Library Dialog Demo", \; caption

"MS Sans Serif",8, \ ; font,pointsize
WS_OVERLAPPED or \ ; styles for
WS_SYSMENU or DS_CENTER, \ ; dialog window
[B][color=red]8[/color][/B], \ ; number of controls
50,50,180,105, \ ; x y co-ordinates
1024 ; memory buffer size

DlgButton "Cancel" ,WS_TABSTOP,126,10,40,13,IDCANCEL
DlgButton "GetText" ,WS_TABSTOP,10,10,50,13,100
DlgButton "AboutBox",WS_TABSTOP,10,25,50,13,101
DlgButton "GetFile" ,WS_TABSTOP,10,40,50,13,102
DlgButton "GetIP" ,WS_TABSTOP,10,55,50,13,103
DlgStatic 0 ,SS_LEFT or WS_TABSTOP,10,75,160,9,104
[B][color=red]DlgEdit WS_BORDER, 70, 10, 50, 13, 105
DlgListView WS_BORDER, 70, 25, 50, 50, 105[/color][/B]
CallModalDialog hInstance,0,dlgproc,NULL

The red parts are what I added... and yes I am running XP ;)

On a side note, I dont understand why you would ever want to use InitCommonControlsEx because it just allows you to load specific parts of the DLL, why not just call InitCommonControls and load the whole thing? I surely dont notice any major slow down of my app when loading the whole thing, maybe someone else can shed some light on this...?
Posted on 2003-02-15 01:27:43 by BubbaFate
Thank you very much Bubba ... I never got into resource Windows until now. I use to turn all samples into real windows it and i i had a time doing it because i did not like r.w. But now since the new Dialog examples i don't have a clue of how to reverse my habits. I really like the way it do things while useing resources in a different and more secure OR presonal way.

Now it's on...

Thanks again VERY, Very Much
Posted on 2003-02-15 17:08:36 by cmax
"I dont understand why you would ever want to use InitCommonControlsEx"
I saw it but i never use none of it before and never got interested until a few days ago.... It's like the PE format coding stuff... I don't know it until i try it for myself. I am saving that for next month after i get over this :) So i guest this is what i was really looking for but now it too late to ask about IT.... I'll study that link...

"maybe someone else can shed some light on this...? "

NOT MUCH LIGHT HERE BUT this is what i being doing:
As i said i really is just getting into it because i was interested in Joe's example that use the regular Resource Window BUT all i wanted to use was the calender and put it on a REAL Window. So after striping it all down a WHOLE program to end up with the amazing 3 or 4 lines of code again i could not make the calender show without clicking on the button. Than i downloaded masm32 v8 and lucky for me it had the New Dialog Examples that use Marcos (in memory) and PoP the thing Right Up ...but still on a RW i guest but in an more interesting way.

I tried to make what i got out of Joe's example to work even in RW but never had success. Than after exploring the Dialog Example and it seem to to closer to what i was trying to do and lead me to other use for Dialog Windows. So either way i plan to use them for other idea's that i got if not for the simple calender and my record will still be clean of non use of resource windows ... :) :)

BUT STILL MY TRUE GOAL WAS ONLY TO PUT a CALENDER ON A REAL WINDOW... in the left hand corner on my program maximized window to be honest about it all.

But if i have to use resource window just to get the calender i rather go the Dialog style because at lease i know how things are at work and i can see all the code that make it work. That's what makes it Sooo interesting to me. I hope i never have to use regular resource windows. I forgot my reasons why. (Habits i guest)

Even tho i still want to know, i now don't care about the real window because i see a lot more in those Dialogs and as long as it work for XP i dare not ask for mo.

I can go on and on ... "I do hope someone else would shed some true daylight on this"
Anyway i was about to give up on it all and come back to it next year...Soooo

Thanks again BubbaFate

either way .... it's ON
Posted on 2003-02-15 19:09:32 by cmax