OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27-11-2002, 10:52
joexx
Guest
 
Posts: n/a
Default Assign macro to toolbar

Is it really a matter of fact, that there is no chance, to assign a macro to a symbol on a toolbar in Corel-PP 11?

:?:
Reply With Quote
  #2  
Old 27-11-2002, 11:25
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Assign macro to toolbar

Quote:
Originally Posted by joexx
Is it really a matter of fact, that there is no chance, to assign a macro to a symbol on a toolbar in Corel-PP 11?
It is sad, but true. There is no way you can add a script or macro to toolbar in Photo-Paint... Maybe version 12?
Reply With Quote
  #3  
Old 27-11-2002, 12:23
joexx
Guest
 
Posts: n/a
Default Re: Assign macro to toolbar

Quote:
Originally Posted by Alex
Maybe version 12?
Well, I hoped it wouldt be a feature in 11, since I already missed it in 10.
There leastwise was the script manager, wich is removed in 11.
Kind of disappointingly. :cry:

Nevertheless thanks for your response, Alex.
Reply With Quote
  #4  
Old 27-11-2002, 18:26
BitPusher
Guest
 
Posts: n/a
Default

The ability to do this exisisted in Corel Photo-Paint 7 along with the ImageBCI and GetFolder functions (among many others) that do NOT work in Photo-Paint 10 and 11.

Carl E. Johnson
Reply With Quote
  #5  
Old 27-11-2002, 22:28
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Quote:
Originally Posted by BitPusher
The ability to do this exisisted in Corel Photo-Paint 7 along with the ImageBCI and GetFolder functions (among many others) that do NOT work in Photo-Paint 10 and 11.
Carl,

You can create a VBA code to replace GetFolder which uses a Windows API function SHBrowseForFolder and get the real Browse For Folder dialog that shows the directory structure as a tree. Here is an example:

Code:
Public Type BROWSEINFO
    hOwner As Long
    pidlRoot As Long
    pszDisplayName As String
    lpszTitle As String
    ulFlags As Long
    lpfn As Long
    lParam As Long
    iImage As Long
End Type

Declare Function SHGetPathFromIDList Lib "shell32.dll" _
    Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Declare Function SHBrowseForFolder Lib "shell32.dll" _
    Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long

Function GetFolder() As String
    Dim bInfo As BROWSEINFO
    Dim Path As String
    Dim pidl As Long, pos As Integer
    
    Path = ""
    bInfo.pidlRoot = 0
    bInfo.lpszTitle = "Select a folder"
    bInfo.ulFlags = 1
    pidl = SHBrowseForFolder(bInfo)
    If pidl <> 0 Then
        Path = Space$(512)
        If SHGetPathFromIDList(pidl, Path) Then
            pos = InStr(Path, Chr$(0))
            Path = Left$(Path, pos - 1)
        Else
            Path = ""
        End If
    End If
    GetFolder = Path
End Function
As far as ImageBCI and other commands are concerned, they all are replaced with BitmapEffect function. You can read more on this here: http://www.oberonplace.com/products/pp9-10cnv/index.htm
Reply With Quote
  #6  
Old 28-11-2002, 09:48
BitPusher
Guest
 
Posts: n/a
Default

Alex,

Thanks for the reply. I just tried your code for the GetFolder and it works great! I had seen similar code in the SlideShow .gms of the PP11 Trial, but since I don't have (or at least don't know that I have) the documentation for the Windows API calls I was reluctant to experiment with it.

Since I've got to start helping prepare Thanksgiving dinner, I'll have to wait until later to check out the BitMapEffect functions you mentioned. I'll let you know if I can get them to work for me. Time now to power-down the computer for the rest of the day.

Again, I thank you,
Carl E. Johnson
Reply With Quote
  #7  
Old 04-02-2004, 00:05
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Assign macro to toolbar

Just a heads-up, Photo-Paint 12 now has the ability to add VBA Macro buttons to toolbars/menus.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An Idea for a handy and easy to make macro vallentin Macros/Add-ons 2 16-03-2004 12:35
asign macro stored in a CDR file to toolbar icon joexx CorelDRAW/Corel DESIGNER VBA 4 15-03-2004 13:02
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 08:50
How to draw macro on toolbar? lywlywlywlywlyw Corel Photo-Paint VBA 2 04-04-2003 19:57
Speeding up a macro Rick Randall CorelDRAW/Corel DESIGNER VBA 2 12-12-2002 11:51


All times are GMT -5. The time now is 22:17.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com