AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[module] CmnDlg 4.03 - Common Dialogs
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sun Apr 29, 2007 5:30 pm    Post subject: Reply with quote

would you know how to do print, page setup, or print preview dialogs?
Back to top
jballi



Joined: 01 Oct 2005
Posts: 297
Location: Texas, USA

PostPosted: Mon Apr 30, 2007 1:37 am    Post subject: Reply with quote

jballi wrote:
v1.2.2

Minor bug. The ChooseColor function modifies the value of the pColor parameter even if the Cancel button is clicked.


v1.2.3

Same problem with the idx parameter on the ChooseIcon function.


Edit: Also the pColor parameter on the ChooseFont function.

I'm just reporting these as I'm finding them. You might want to check all parameters on all functions...

Thanks.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Mon Apr 30, 2007 8:35 am    Post subject: Reply with quote

Jballi wrote:
I'm just reporting these as I'm finding them. You might want to check all parameters on all functions...

I will check them. U are demanding user Very Happy


Guest wrote:
would you know how to do print, page setup, or print preview dialogs?
Sure.


Thx
_________________
Back to top
View user's profile Send private message MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Mon Apr 30, 2007 8:55 am    Post subject: Reply with quote

v1.24

- Fixed bugs reported by jballi
- Added pEffects parameter to ChooseFont. Set it to false to disable effects. Currently documented only in source code. For instance:

Code:
ChooseFont( font := "Courier New", style := "s16 bold underline italic", color:=0x80, false)



Thx jballi, your tests and ideas made those functions much better.
_________________
Back to top
View user's profile Send private message MSN Messenger
jballi



Joined: 01 Oct 2005
Posts: 297
Location: Texas, USA

PostPosted: Tue May 01, 2007 4:32 am    Post subject: Reply with quote

Thanks for making the fixes. Updates are appreciated.
Back to top
View user's profile Send private message
jballi



Joined: 01 Oct 2005
Posts: 297
Location: Texas, USA

PostPosted: Wed May 02, 2007 2:41 am    Post subject: Reply with quote

v1.24

ChooseIcon function does not appear to be working. The idx is always set to 1 or lastIdx+1. Was working in v1.23.

Thanks.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Wed Jun 20, 2007 12:51 pm    Post subject: Reply with quote

New version 2.0

    - Fixed bug with ChooseIcon returning wrong index
    - Removed dependencies to InsertExtractInteger
    - Added About function
    - Added CmnDlg prefix to each function. File is now named CmnDlg.ahk and you can put it in StdLib

_________________
Back to top
View user's profile Send private message MSN Messenger
Guest






PostPosted: Wed Jun 20, 2007 2:57 pm    Post subject: Reply with quote

any chance for a print dialog in the near future, or is that possible?
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Wed Jun 20, 2007 3:42 pm    Post subject: Reply with quote

Quote:
any chance for a print dialog in the near future

Who knows. I do things as I need them.

Quote:
is that possible

Yes.
_________________
Back to top
View user's profile Send private message MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Tue Jun 26, 2007 12:58 pm    Post subject: Reply with quote

Documentation updated
_________________
Back to top
View user's profile Send private message MSN Messenger
Icarus



Joined: 24 Nov 2005
Posts: 323

PostPosted: Mon Jul 16, 2007 1:23 pm    Post subject: Reply with quote

Hello majkinetor,

Just wanted to drop a quick thanks for this script.
Helps me a lot.

So, thanks a lot.= for a nicely done script.
Back to top
View user's profile Send private message Visit poster's website
tic



Joined: 22 Apr 2007
Posts: 1271

PostPosted: Thu Oct 04, 2007 11:30 am    Post subject: Reply with quote

yes very nice work! i love this.....small errors were present though, so ive fixed them:

Code:
CmnDlg_ChooseIcon(ByRef sIcon, ByRef idx, hGui=0)
{     
   global      

    VarSetCapacity(wIcon, 1025, 0)
    If sIcon
    {
        R := DllCall("MultiByteToWideChar", "UInt", 0, "UInt", 0, "Str", sIcon, "Int", StrLen(sIcon), "UInt", &wIcon, "Int", 1025)

        If !R
      Return False   
    }
   
   idx--
   R := DllCall(DllCall("GetProcAddress", "Uint", DllCall("LoadLibrary", "str", "shell32.dll"), "Uint", 62), "uint", hGui, "uint", &wIcon, "uint", 1025, "intp", idx)
   idx++
   
   If !R
   Return False

   Len := DllCall("lstrlenW", "UInt", &wIcon)
   VarSetCapacity(sIcon, len, 0)
   R := DllCall("WideCharToMultiByte" , "UInt", 0, "UInt", 0, "UInt", &wIcon, "Int", len, "Str", sIcon, "Int", len, "UInt", 0, "UInt", 0)

    If !R
   Return False

    Return True
}


Edit: I've just read through the posts....and saw the whole idx thing, but it was still not fixed. Im not complaining or anything. I think youve done great work here. the code ive posted above should fix the issue
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Thu Oct 04, 2007 12:56 pm    Post subject: Reply with quote

There is no error , just index is 1 based, not 0 based.
You can check out the example on the first page.

Thx for good words.
_________________
Back to top
View user's profile Send private message MSN Messenger
tic



Joined: 22 Apr 2007
Posts: 1271

PostPosted: Thu Oct 04, 2007 1:04 pm    Post subject: Reply with quote

Ok yeh ive just tested it. youre right....it was fixed, i only had a quick look and it didnt look like it was fixed at a glance. keep up the good work!
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1271

PostPosted: Mon Oct 15, 2007 4:56 pm    Post subject: Reply with quote

Sorry to contradict my previous pst, but it's not fixed. The following fixes it:

Code:
CmnDlg_ChooseIcon(ByRef sIcon, ByRef idx, hGui=0)

   global
                             
    VarSetCapacity(wIcon, 1025, 0)
    If sIcon
    {
        R := DllCall("MultiByteToWideChar", "UInt", 0, "UInt", 0, "Str", sIcon, "Int", StrLen(sIcon), "UInt", &wIcon, "Int", 1025)

        If !R
        Return False
    }
   
   idx--
   R := DllCall(DllCall("GetProcAddress", "Uint", DllCall("LoadLibrary", "str", "shell32.dll"), "Uint", 62), "uint", hGui, "uint", &wIcon, "uint", 1025, "intp", idx)
   idx++
   If !R
    Return False

   Len := DllCall("lstrlenW", "UInt", &wIcon)
   VarSetCapacity(sIcon, Len, 0)
   R := DllCall("WideCharToMultiByte", "UInt", 0, "UInt", 0, "UInt", &wIcon, "Int", len, "Str", sIcon, "Int", len, "UInt", 0, "UInt", 0)

    If !R
    Return False
 
    Return True
}


I can give you an example another day if my reasoning for it not working isnt clear. thanks for making such a good function!

There is also another error when you try to load a standalone .ico then it will give an error message. it will however still correctly load the ico, but the error message is annoying
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group