{"id":209,"date":"2008-05-03T15:14:15","date_gmt":"2008-05-03T15:14:15","guid":{"rendered":"http:\/\/6teen.ru\/?p=204"},"modified":"2008-05-03T15:14:15","modified_gmt":"2008-05-03T15:14:15","slug":"6668","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=209","title":{"rendered":"\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 TreeView \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u0441\u043a\u0430 \u0421:"},"content":{"rendered":"<p>\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 TreeView \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u0441\u043a\u0430 \u0421:<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 TreeView \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u0441\u043a\u0430 \u0421:\n\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:\nfindfirstfile\nfindnextfile\nfindclose\n\n\u0410 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0451\u0433\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 listbox \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 lb_dir.\n\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:\nsendmessage(hwndlb, lb_dir, ddl_readwrite | ddl_directory, (long)\"c:*.*\");\n\n\u0430 \u0437\u0430\u0442\u0435\u043c\n\n\u0446\u0438\u0442\u0430\u0442\u0430:\n--------------------------------------------------------------------------------\nadding tree-view items\nyou add an item to a tree-view control by sending the tvm_insertitem message to the control. the message includes the address of a tvinsertstruct structure, specifying the parent item, the item after which the new item is inserted, and a tvitem structure that defines the attributes of the item. the attributes include the item's label, its selected and nonse vel; \/\/ heading level\n\n\/\/ open the file to parse.\nif ((hf = createfile(lpszfilename, generic_read,\nfile_share_read, (lpsecurity_attributes) null,\nopen_existing, file_attribute_normal,\n(handle) null)) == (handle) invalid_handle_value)\nreturn false;\n\n\/\/ call private function to parse the file looking for headings.\nwhile ( getnextheadingandlevelfromfile(hf, szitemtext, &nlevel) )\n\/\/ add \/\/ add the item to the tree-view control.\nhprev = (htreeitem) sendmessage(hwndtv, tvm_insertitem, 0,\n(lparam) (lptvinsertstruct) &tvins);\n\n\/\/ save the handle to the item.\nif (nlevel == 1)\nhprevrootitem = hprev;\nelse if (nlevel == 2)\nhprevlev2item = hprev;\n\n\/\/ the new item is a child item. give the parent item a\n\/\/ closed folder bitmap to indicate it now has child items.\nif (nlevel > 1) {\n\n\u0410 \u0435\u0441\u043b\u0438 \u0442\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 explorer'\u043d\u043e\u0441\u0442\u0438, \u0442.\u0435. \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e c: \u043d\u043e \u0438 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0432\u0435\u0449\u0438\u0447\u043a\u0438 \u043a\u0430\u043a network negihbourhood, printers \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0430\u043f\u043a\u0438 (\u0438 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435) \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c msdn: enumerating items in the shell (\u0442\u0430\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 tree view +list view). c\u043c. \u0432 booksprogamming windows 95 user interfacepart 3chapter fourteen\n\u0410 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0430 delphi, \u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 demosvirtuallistview\n\u0410 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 (long)\"c:*.*\"? \u0410 \u0442\u043e \u044f \u0432 \u0441\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c.\n\u041a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0447\u0435 \u0442\u0430\u043c \u0432 \u0414\u0435\u043b\u044c\u0444\u044f\u0445 \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c?\n\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:\nmask := '*.*';\nsendmessage(hwnd, lb_dir, ddl_readwrite or ddl_directory, integer(mask));\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 TreeView \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u0441\u043a\u0430 \u0421:<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[430,386],"tags":[1924,701,726,854],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/209"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/209\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}