Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu in dialogs
#1
how do you add menus into your dialogs?? Or is that posible..
#2
What kind of menu are you talking? Like a file menu? What do you want it to do?
#3
Options and Settings Menu
#4
Function DialogWithMenu
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str rea3
if(!ShowDialog("DialogWithMenu" &DialogWithMenu &controls 0 0 0 0 0 0 0 "dialog.ico" "DialogWithMenu")) ret

;BEGIN DIALOG
;0 "" 0x10CF0A44 0x100 0 0 294 190 "Dialog"
;3 RichEdit20A 0x54233044 0x200 0 0 294 190 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020009 "*" ""

ret
;messages
sel message
,case WM_INITDIALOG
,
,case WM_SIZE
,RECT r; GetClientRect(hDlg &r)
,siz r.right r.bottom id(3 hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,;menu items:
,case 101 out "Open"
,case 103 out "Cut"
,case 104 out "Select All"
,case 105 out "Help"
,
,case IDOK
,case IDCANCEL
ret 1

;BEGIN MENU
;>&File
,;&Open : 101 0 0 Co
,;-
,;>&Recent
,,;Empty : 102 0 3
,,;<
,;<
;>&Edit
,;Cu&t : 103 0 0 Cx
,;-
,;Select &All : 104 0 0 Ca
,;<
;&Help : 105 0
;END MENU
#5
Can someone tell me how I can get this to print the text that I type?
#6
I think you going to need to getwintext and send it to notepad or wordpad and print it there if you need an example let me know
#7
I was looking for a way to print from here. If other programs do it then this one should be able to and I think that it would have something to do with the WM_PRINT command but I have no idea how to do it.
#8
I have looked into this a bit more and still the only way that i could get it to print was to send it to word or notepad. If i'm wrong i would love to know how its done.
#9
To print a rich edit control is used EM_FORMATRANGE message and several printing functions. But it is quite difficult. Especially if with margins, title, page number etc. For example I don't know how to calculate correct margin width.
#10
Well it is something to go on thank you
#11
I have tried to do this and it is as hard as Gintaras says it is, if not harder.
#12
I think it is even harder then Gintaras says it is lol


Forum Jump:


Users browsing this thread: 1 Guest(s)