Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
window but not dialog
#1
how do i make an application window ?
dialogs close after action, but i want to have it always available.
pi
#2
Simplest example of main window is Samples2\Hello World. Another example is dialog editor.

But it is not so easy as dialogs. You cannot use dialog editor. Maybe better would be dialog with dialog procedure ("smart dialog").
#3
[Image: qm_blogger.gif]

i think i will use a /multipage

how do i change the icon in the titlebar of qm_editor ?

i have never worked with multipage, can you give me a small example ?
is there a mutlipage variable ?

thanks
pi
#4
Listbox is used to select pages. When listbox is clicked, function DT_Page is executed. It shows controls of selected page and hides controls of other pages.

Code:
Copy      Help
,case LBN_SELCHANGE<<16|3
, g11
,_i=LB_SelectedItem(lParam)
,DT_Page hDlg _i


Icon:

Code:
Copy      Help
int-- hicon
sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam)
,hicon=GetIcon("notepad.exe")
,SendMessage hDlg WM_SETICON 0 hicon
,goto g11
,
,case WM_DESTROY
,DestroyIcon hicon
,DT_DeleteData(hDlg)
#5
how do i set the default button on page 2 when on page 1 already another button is declared as default ?
pi
#6
Use single default button, that is common for all pages. You probably noticed that pages are numbered 0, 1, 2 etc. If Page field is empty, that controls are visible in all pages.

Initially, default button is OK. You can rename it.

Code:
Copy      Help
,[color=blue]case [/color]IDOK
,_i=LB_SelectedItem([color=blue]id[/color](3 hDlg))
,[color=blue]sel [/color]_i
,,[color=blue]case [/color]0 ...
,,[color=blue]case [/color]1 ...
,,...
,DT_Ok hDlg
#7
ok, that works when i use it in combination with a listbox selection.
i first use different buttons on pages, like send and ok ...

how can i get the current page number ?
its needed to use sel for page default button action.
on page 1 (i start with page 1) DT_Page(hDlg 2)
on page 2 DT_Ok hDlg

and when using only one default button how to change the label ?
page1 = "Send"
page2 = "OK"

thanks :roll:
pi
#8
When changing page, store page number into a global variable. To change button text, use str.setwintext or SetDlgItemText:

SetDlgItemText hDlg buttonId buttonText


Forum Jump:


Users browsing this thread: 1 Guest(s)