News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Calling Listview From Menu

Started by Force, February 19, 2012, 11:20:46 PM

Previous topic - Next topic

Force

Is it possible calling Listview from menu or by clicking button  in a new window?
Never Stop Until You Are Better Than The Best

dedndave

if you mean having the listview in the menu - not sure about that
but, you can always open a dialog with a listview in it

you may enjoy this demo by Chib777 with source, though...
http://www.4shared.com/file/m1BJWoRF/XXControls.html
shows you how to do owner-drawn menus and controls

Gunner

Of course you can call it, it's phone number is 212-555-2368  :toothy

You can send messages to the listview to do many things to/with it http://msdn.microsoft.com/en-us/library/windows/desktop/bb774737(v=vs.85).aspx
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

Force

I will make an accountany program so i will need open listview in dialog

for daily accounts for general accounts etc....

so i need listview again and again

i dont know how to make it yet  :bg
Never Stop Until You Are Better Than The Best

Force

Gunner

that phone is busy  maybe Listview is talking with his girlfriend  :bdg
Never Stop Until You Are Better Than The Best

Force

dedndave

connecting to that site is forbidden to my IP
Never Stop Until You Are Better Than The Best

Gunner

That number will never be busy...  Change the area code to your area code and call it, it will direct you to 411 for your area code :-)  Actually it is - (area code)555-1212 but any number after 555 should work.

If you need to create a few listviews, use CreateWindowEx
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com


dedndave

send me a PM with your email   :P

all controls, dialogs, scrollbars, etc are really windows created using a system-defined class
i.e., you can create them with CreateWindowEx
for a listview control, i think it is
szListViewClass db 'SysListView32',0
so - to learn about that and find some examples, google "SysListView32"

there are a few different functions for creating dialogs in code
a bit fun to play with - lol
CreateDialog
CreateDialogIndirect
CreateDialogIndirectParam
CreateDialogParam

again, they all wind up calling CreateWindowEx, internally   :P

qWord

maybe a simple popup window/listview is what you want?
FPU in a trice: SmplMath
It's that simple!

dedndave

cool qWord   :U

i had to add InitCommonControls for XP and fix the INCLUDE path

seems like you ought to be able to stick that in a menu, somehow   :P

qWord

Quote from: dedndave on February 20, 2012, 01:26:49 AM
i had to add InitCommonControls for XP and fix the INCLUDE path
fixed  :bg
FPU in a trice: SmplMath
It's that simple!

Force

Never Stop Until You Are Better Than The Best

Force

I made it by using button

but after close Listview ....Closing Menu too

I dont know What's wrong
Never Stop Until You Are Better Than The Best

qWord

Create WndProcs for each window. Your windows/dialogs have different behaviours -> the program is closed, because the pretended child-Dialog send the quit message.
Also it is a very bad idea to jump out of the WndProc back to the entry point.
(seems like a failed try to create a superclass...)
FPU in a trice: SmplMath
It's that simple!