Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scrolling Dialog
#1
Subclass control (I think)

Ok I give; I have tried and I can not seem to make it work.
I have been studding
Subclassing dialog controls to receive messages
And
Using QM for forms instead of HTML
To find a way to have a Vertical and a Horizontal scroll control in a smart dialog that allows me to scroll to any BMP I want (without having to use something like dlg_cd_smart_child to make it work).

Can I get an example of how this can be done please?

Function Scrolling_Dialog
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4 5 6 7 8 9 10 11"
str sb3 = "$windows$\Greenstone.bmp"
str sb4 = "$windows$\Greenstone.bmp"
str sb5 = "$windows$\Greenstone.bmp"
str sb6 = "$windows$\Greenstone.bmp"
str sb7 = "$windows$\Greenstone.bmp"
str sb8 = "$windows$\Greenstone.bmp"
str sb9 = "$windows$\Greenstone.bmp"
str sb10 = "$windows$\Greenstone.bmp"
str sb11 = "$windows$\Greenstone.bmp"
if(!ShowDialog("Scrolling_Dialog" &Scrolling_Dialog &controls)) ret

;BEGIN DIALOG
;0 "" 0x90FF0A40 0x100 0 0 222 134 "Dialog"
;3 Static 0x5400110E 0x20000 2 2 18 18 ""
;4 Static 0x5400110E 0x20000 112 2 16 16 ""
;5 Static 0x5400110E 0x20000 222 2 18 18 ""
;6 Static 0x5400110E 0x20000 2 105 16 16 ""
;7 Static 0x5400110E 0x20000 112 105 18 18 ""
;8 Static 0x5400110E 0x20000 222 105 16 16 ""
;9 Static 0x5400110E 0x20000 2 210 16 16 ""
;10 Static 0x5400110E 0x20000 112 210 18 18 ""
;11 Static 0x5400110E 0x20000 222 210 16 16 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030109 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case STN_CLICKED<<16|3
,mes 1
,case STN_CLICKED<<16|4
,mes 2
,case STN_CLICKED<<16|5
,mes 3
,case STN_CLICKED<<16|6
,mes 4
,case STN_CLICKED<<16|7
,mes 5
,case STN_CLICKED<<16|8
,mes 6
,case STN_CLICKED<<16|9
,mes 7
,case STN_CLICKED<<16|10
,mes 8
,case STN_CLICKED<<16|11
,mes 9

,case IDOK
,case IDCANCEL
ret 1
#2
This way of displaying and scrolling multiple items is unusual, not flexible, and quite difficult. Why don't use Using QM for forms instead of HTML ?
#3
I am trying to clean up my code and I thought that since the main dialog had scrollbars it would be cleaner code if I used them.

Question – Why does the main dialog have scrollbars?


Forum Jump:


Users browsing this thread: 1 Guest(s)