PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 10
 1 
 on: Today at 09:14:04 AM 
Started by SeaVipe - Last post by raymw
You can call 7-zip from a command line, so you could generate the commands you need in fb, and then 'run' the command. Not sure if that is what you want to do

 2 
 on: February 24, 2021, 06:46:15 PM 
Started by SeaVipe - Last post by SeaVipe
General question: I need to work with files in a compressed (zip) folder (reading and writing). I've found a few somewhat convoluted examples in other languages (some time ago now) but porting them to FB looked to be a task most daunting - ergo I gave up :(
I'm going to give it another go so any ideas or even a starting point would be helpful :)

 3 
 on: February 24, 2021, 04:25:34 PM 
Started by jermy - Last post by jermy
I have already tried that, he first runs WM_CREATE but does not automatically pass WM_SIZE  ( TabPage1_WndProc )
I can do this that works also
Code: [Select]

         sendMessage pTabPage1->hTabPage, WM_SIZE, 0 ,0

   FUNCTION = pWindow.DoEvents
END FUNCTION


 4 
 on: February 24, 2021, 04:20:01 PM 
Started by jermy - Last post by Josť Roca
If you want to create the TreeView and the filling code in WM_CREATE, create the TreeView with any size, or even 0, and then resize it in WM_SIZE.

 5 
 on: February 24, 2021, 04:01:12 PM 
Started by jermy - Last post by Josť Roca
After moving the creation code to WinMain, the TreeView control has not yet been created when you receive the WM_CREATE message. Mode the code after pTabPage1->AddControl.

 6 
 on: February 24, 2021, 03:47:02 PM 
Started by jermy - Last post by jermy
Ok tnx

I moved the creation code for the treeview to winmain, now i want to fill the treeview this is also not possible from WM_CREATE Tabpage?
the code does not fill the treeview
Code: [Select]


FUNCTION TabPage1_WndProc (BYVAL hwnd AS HWND, BYVAL uMsg AS UINT, BYVAL wParam AS WPARAM, BYVAL lParam AS LPARAM) AS LRESULT

   SELECT CASE uMsg

      CASE WM_CREATE

        DIM hTreeView AS HWND = GetDlgItem(hwnd, IDC_TREEVIEW)

 
   ' // Add items to the TreeView
   DIM AS HTREEITEM hRoot, hNode, hItem
   ' // Create the root node
   hRoot = TreeView_AddRootItem(hTreeView, "All accounts")
   ' // Create a node
   hNode = TreeView_AppendItem(hTreeView, hRoot, "A")
 

I did some testing the listview window handel is not yet created?

 7 
 on: February 24, 2021, 03:27:12 PM 
Started by jermy - Last post by Josť Roca
In the WM_CREATE message, the size of the page is not know because it has not been resized yet.

Instead, add the control after the tab page has been fully created and resized:

Code: [Select]
' // Create the first tab page
DIM pTabPage1 AS CTabPage PTR = NEW CTabPage
pTabPage1->InsertPage(hTab, 0, "Tab 1", -1, @TabPage1_WndProc)
pTabPage1->AddControl( "TreeView", pTabPage1->hWindow, IDC_TREEVIEW, "", 0, 0, pTabPage1->ClientWidth , pTabPage1->ClientHeight )

 8 
 on: February 24, 2021, 01:59:12 PM 
Started by SeaVipe - Last post by Josť Roca
Ok. I have modified it. Thanks for reporting it.

 9 
 on: February 24, 2021, 01:29:03 PM 
Started by SeaVipe - Last post by Bumblebee
Should also be:
DIM csa AS CSafeArray = cIni.GetKeyNames("Startup")

 10 
 on: February 24, 2021, 01:26:48 PM 
Started by SeaVipe - Last post by SeaVipe
Sorry Josť, I wasn't very clear. I should have written the 'Example' in cInifile documentation for 'GetSectionNames'.
Quote
This line in the example code "print csa.GetString(i)" throws error 18: Element not defined, GetString in 'print csa.GetString(i)'
Change GetString to GetStr and the code compiles and works correctly.
Use 'GetStr' for CSafeArray and 'GetString' for CIninfile.

Pages: [1] 2 3 ... 10