Results 1 to 8 of 8

Thread: UI: How to detect minimizing of Dialog?

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171

    UI: How to detect minimizing of Dialog?

    I'm almost getting a crisis again - as usual when using "UI" for more complicated stuff.
    Problem is: I have some multiple Dialogs. One Main-Dialog and a few "Tool-Windows". Now I want them Tool-Windows to hide when the Main-Window get's minimized.

    On microsoft-page about %WM-messages it says one has to check for %WM_Size - but that does not occur when minimizing - now I tried and let it print out all callback-parameters whenever something occured but this are so many... I'm almost about to delete the whole stuff I already wrote - how do I find out if the Main-Window got minimized - so I can hide the other windows?
    Last edited by ReneMiner; 21-08-2013 at 09:15.
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    try WM_SYSCOMMAND instead:
        Case %WM_SYSCOMMAND
          If ((CBWPARAM And &h0FFF0) = %SC_MINIMIZE) Then
            PrintL "Minimised..."
          End If
    
    Just tested it, worked for me...


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    thanks. It works- but see for yourself: "If" & "Case" are basic. The other unreadable stuff has nothing to do with Basic at all... quite frustrating and somehow no fun programming with - these microsoft-sites are all explained in c++ where I have no idea of, so I don't understand what's meant and I can barely read it. To refer to these sites within tB-help does not really help because it ends up in searching & reading for hours on various sites without finding any useful hint. I hate these sites and just opening them in the browser leads me to loose any passion to code for the rest of the day.

    Stuck again already: how do I get information together about what the mouse does on a Canvas-Control? Left button, right button, wheel, pointer-position etc.?

    I fear I'll never get friends with that callback-stuff.
    Last edited by ReneMiner; 21-08-2013 at 10:54.
    I think there are missing some Forum-sections as beta-testing and support

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    the advantage of current approach is that it closely matches how Windows platform works - it is easy to port code from other languages here, and Win32 programmers feel at home.

    On the other, dark side , it can be frustrating for people with zero previous experience with Win32.

    I would like to see having object oriented dialog and control handling, like C# offers. With full documentation, so no need to seek on MSDN. It would be a huge amount of work, but if the constellation is right, we might see something like that in ThinBASIC one day. The OOP module interfaces are the first step making this possible.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    I see. So have to wait until Win32 becomes obsolete and it's time for something new. That will probably be before I learn how this works- since we got Win64 already and the step to 128 is not far.

    In the meantime I'll have to use a large TBGL-Window with own Dialogs inside. Needs a few days - or weeks - but honestly I'd like to wait until I know how the new heap-functions work - which get implemented and how I can make up the memory then. What for I still need own routines etc.

    I anyway wanted to create some multiple-use GUI for a long time - the problem of refreshing data-bound controls is solved I think - I can either use Variable_GetInfoEx-functionality or just tell the control WHERE a pointer can be found...Also solved the "waste of memory" when using units which makes the required memory for a Timer-Control as large as a Listview or Gridview - because now I know possibilities to "node" a different subtype at each and every element of the same array quite easy...
    I think there are missing some Forum-sections as beta-testing and support

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Rene - Microsoft is trying to wrap Win32 since... forever. The Windows Forms in .NET are nice OOPish wrapping for example. But Win32 still lives as the underground layer, no matter how much hoax has been about Win32 being replaced completely in Windows 8 for example. I would definitely keep it in ThinBASIC as low level door to Windows, but some OOP wrap would be nice to have.

    Quote Originally Posted by John Spikowski View Post
    If you haven't noticed, you can't can't buy a 32 bit version of Windows anymore
    John - I am not sure what is the source of your information: even US Amazon continues to offer 32bit versions... in Europe it is the same. New tablets ship with 32bit or 64bit too, you can choose.


    Petr
    Last edited by Petr Schreiber; 21-08-2013 at 20:54.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    Quote Originally Posted by Petr Schreiber View Post
    Rene - Microsoft is trying to...
    But I don't get it- I used microfrost visual basic for years and that's definetely based on windows. How comes all other languages just have those creepy cumbersume, intransparent callbacks while theirs basic just uses readable words and function names alike "myTextbox_MouseDown(Index, Button, X, Y)" - are they doing this on purpose and spread the wrong information for all the other developers so anyone goes back to vb after trying something else?
    I think there are missing some Forum-sections as beta-testing and support

  8. #8
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    They knew Win32 is a bit hardcore for VB coder Having something similar in TB would be definitely nice.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Similar Threads

  1. close dialog from second dialog
    By Lionheart008 in forum thinBasic General
    Replies: 0
    Last Post: 05-11-2009, 21:26
  2. Confusion with DIALOG GET/SET CLIENT, DESKTOP GET SIZE and DIALOG SET LOC
    By Michael Hartlef in forum UI (User Interface)
    Replies: 3
    Last Post: 03-10-2008, 19:23
  3. How to detect if dialog is maximized and set maximized at runtime?
    By Michael Hartlef in forum UI (User Interface)
    Replies: 2
    Last Post: 03-10-2008, 17:25

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •