English
Bugs and vermeintliche

XProfan X2

GroupBox overlay UpDown-Control one Spin-Edits, not but the Edit-area

 

Nico
Madysa

 $H windows.ph
cls
var Long upDownIsVisible = Create("SpinEdits", %hWnd, "0;0;10", 25, 25, 100, 20)
var Long hidesUpDownControlsAfterIt = Create("GroupBox", %hWnd, "a", 0, 0, 200, 200)
var Long upDownIsHidden = Create("SpinEdits", %hWnd, "0;0;10", 25, 50, 100, 20)
Create("Text", %hWnd, "Press any key to repair the second spin edit", 230, 5, 100, 100)
waitinput
RescueLostUpDown(upDownIsHidden)
waitinput
end

proc RescueLostUpDown

    parameters Long spinEdit
    ' Retrieve lever of updown control
    var Long theLostOne = GetHandle(%hWnd, ItemID(spinEdit) + 1)
    ' move GroupBox behind updown control
    ~SetWindowPos(hidesUpDownControlsAfterIt, theLostOne, 0, 0, 0, 0, ~SWP_NOMOVE | ~SWP_NOSIZE)
    ' this line shouldn't even be necessary.
    SendMessage(theLostOne, $469, spinEdit, 0)' UDM_SETBUDDY

endproc






one mind, that the UpDown-Control in the first Image still there's.
It can klicked go, IsWindowEnabled  and IsWindowVisible  liefern both true , the only Auffälige is, that the User not see can.

14 kB
Kurzbeschreibung: Window to the Tastendruck
Hochgeladen:02/20/14
Downloadcounter159
Download
15 kB
Kurzbeschreibung: Window after the Tastendruck
Hochgeladen:02/20/14
Downloadcounter156
Download
 
02/20/14  
 




E.T.
it's hardship a bow, it's a feature 
...
var Long upDownIsVisible = Create("SpinEdits", %hWnd, "0;0;10", 25, 25, 100, 20)
var Long upDownIsHidden = Create("SpinEdits", %hWnd, "0;0;10", 25, 50, 100, 20)
var Long hidesUpDownControlsAfterIt = Create("GroupBox", %hWnd, "a", 0, 0, 200, 200)
...

... and already it fits
 
XProfan X2
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
02/20/14  
 




Nico
Madysa
this method the Problemlösung be I me thoroughly deliberate. therefore have I the two SpinEdits in my example so squared: in order to show, that it The Groupbox is, which on the Z-axis between Edit and UpDown-Control mogelt.

me falls it only gelinde said heavy, a Anwendungsbereich for so one "Feature" to find.

Also feel it not straight konsistent on, that the Groupbox on the Z-axis straight between two very heavy  zusammengehörige Controls schiebt.

Also  becomes the code neither straight lesbarer, if any Groupboxen to all Spinedits ereugt go.

Also has me this Mist several hours Debugging cost[ed] and has me moderate aufs Gemüt beaten.
 
02/21/14  
 




E.T.
Hm, the the UpDown-Control to the RescueLostUpDown  in the Edit the SpinEdits lying is neither sense the the thing, or
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
02/21/14  
 




Nico
Madysa
it's located not Edit-area, separate the Editfeld becomes verkürzt, circa Space for the UpDown-Control To make. can you review, in the You The Message number of times versendest. the MSDN [...] says too:


on up-down control with the UDS_ALIGNLEFT or UDS_ALIGNRIGHT style aligns with the left or right edge of its buddy window. The width of the buddy window is decreased to accommodate the width of the up-down control.


and clear is it only a very krude Solution. for me functions tappt im dunkeln but, because I for my größenveränderbares Window anyhow regularly SetWindowPos  the Editfeld utilize must and the UpDown-Control thereby same along into The bill include can.
' neckline: mainwindow.inc
/* <...> */

proc ?_Init

    /* <...> */
    Window x, y - dx, dy
    /* <...> */
    ?_form.intervalEdit& = Create("SpinEdits", %hWnd, intervalEditCaption, 0, 0, 0, 0)
    ?_intervalUpDown = GetHandle(%hWnd, ItemID(?_form.intervalEdit&) + 1)
    /* <...> */
    ' Workaround for updown control being overlaid by GroupBox!
    SetWindowPos(mainwindow.advancedGroup, mainwindow.intervalUpDown, 0, 0, 0, 0, ~SWP_NOSIZE | ~SWP_NOMOVE)
    /* <...> */
    Subclass %hWnd, 1

endproc

/* <...> */

proc ?_AdjustContents

    parameters Long width, height
    declare Long currentX, currentY, currentHeight
    /* <...> */
    var Long tracker = BeginDeferWindowPos(controlCount)
    casenot tracker: return 0
    /* <...> */
    ' the Editfeld takes here The entire to
    ' Disposal stehende wide one.
    tracker = DeferWindowPos(tracker, ?_form.intervalEdit&, 0, \
    currentX, currentY, groupInnerWidth, editHeight, flags)
    /* <...> */
    var Int result = EndDeferWindowPos(tracker)
    ' here becomes the Editfeld so verkürzt, that the UpDown-Control enough Space has.
    SendMessage(?_intervalUpDown, ~WM_USER + $69, ?_form.intervalEdit&, 0)' UDM_SETBUDDY
    return result

endproc


Dass with one SetWindowPos  the SpinEdits the zugehörige UpDown-Control not  mitverschoben becomes, is yet so one Joke, whom I not yet time erwähnt have ...
 
02/21/14  
 




RGH
Dummerweise are both Controls separated Controls and the a white nothing of others. only the Programmer self, white, that they zusammengehören.
I see there in the momentum no sinnvolle Possibility, with the erträglichem hoisted To Change.

Greeting
Roland
 
XProfan X2
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
09/25/14  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.748 Views

Untitledvor 0 min.
KJ12/06/15
Heltal11/04/15
XpKurt01/21/15
Sascha Haak01/20/15
More...

Themeninformationen

this Topic has 3 subscriber:

Nico Madysa (3x)
E.T. (2x)
RGH (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie