This content has been marked as final.
Show 19 replies
-
1. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 6:31 AM (in response to andrejusc)Is there a specific reason you're using ADM? I believe it's been since SDK 7 (maybe even 6) that we've been warning developers not to use ADM anymore as it will not be upkept in future versions of Acrobat. -
2. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 6:57 AM (in response to andrejusc)Well, ADM allows me create configuration dialog for my plugin in very quick way from Windows resource file. I could also handle all required item selections, enable/disable them, keep track on any pressed key inside text fields.
Do we have any plugin sample code inside SDK v8, which demonstrates another than ADM approach for various dialogs creation? I don't think so, but I maybe wrong.
I think it's still useful for my needs and my potential customer tells me that my dialogs run without any problems even under Acrobat 9.
So, back to the question - how to create multitabbed dialog if Create function already creates it with style kADMTabbedFloatingDialogStyle? -
3. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 7:09 AM (in response to andrejusc)> I think it's still useful for my needs and my potential customer tells me that my dialogs run without any problems even under Acrobat 9
This may be so and is fine as long as you're willing to start from scratch again as soon as (perhaps) the very next major release of Acrobat. Don't be surprised it they just stop working and you have to start all over again.
> I don't think so, but I maybe wrong.
There is a wxWidgets sample with SDK 9 (called wxPlugin in the PluginSupport folder). wxWidgets is just one of several cross-platform dialog libraries freely available. If you're only focused on Windows, why not just use VS2005 to design your dialogs as you design your plug-in? -
4. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 7:19 AM (in response to andrejusc)Yes, I'm designing my dialogs with VS2005, but so far customer requirements were (and will be so unchanged for next 6 months) to support Acrobat 7.x and 8.x, not 9.x. For that purpose only Acrobat SDK 7.x and 8.x were used. Those SDKs have no words about ADM decomission and no samples as your mentioned wxWidgets.
Could you just tell me instead how to use sADMDialogGroup->SetTabGroup call and not switch my attention somewhere else I don't care about right now? -
5. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 7:40 AM (in response to andrejusc)> Yes, I'm designing my dialogs with VS2005
Then you're not using ADM. Are you using a mix of both dialogs? How are you using Visual Studio dialogs with ADM dialogs (they are completely separate)?
> Those SDKs have no words about ADM decomission and no samples as your mentioned wxWidgets.
No, but many people are telling you directly (please feel free to search the forums, it has been said by many different people including Adobe insiders) that it is not prudent to continue development with ADM unless you are OK with starting from scratch in the near future. Just trying to save you having to completely redesign everything ... but if you're OK with doing work twice you only need to do once then I'll try to help you.
You'll also notice that the ADM Reference is no longer distributed with the SDK and hasn't been updated since 2003. ADM support is included entirely for legacy reasons at this point and it is strongly advised not to begin any new developments with ADM. Just so you can't say you haven't been warned.
> But that doesn't work for me
What error code are you getting from SetTabGroup? Can you be more specific than "But that doesn't work for me."? -
6. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 8:02 AM (in response to andrejusc)If needed - I'll start from scratch only UI part, not business logic of my plugin. And that is not big deal for me really. UI is only about 5 percents of whole functionality. But right now I'd like to complete it with already present ADM code.
OK, now about my situation.
I'd like to create multitabbed dialog with 2 tabs. From ADM documentation I assume that for that purpose I need to have 2 dialog boxes created and then somehow inserted into main tab folder (or I don't know how to call that UI item). So, this is part of my code inside plugin dialog initialization function:
ADMUtils::InitializeADM();
ADMDialogRef dialog = sADMDialog->Create(sADMPluginRef, "MyCompany:MyPlugin",
IDD_DIALOG1, kADMTabbedFloatingDialogStyle, (ADMDialogInitProc)DialogOnInit, NULL, NULL);
err = sADMDialogGroup->SetDialogGroupInfo(dialog, "Group1", 1 & kADM_DPTabMask);
ADMDialogRef dialog2 = sADMDialog->Create(sADMPluginRef, "MyCompany:MyPlugin",
IDD_DIALOG2, kADMTabbedFloatingDialogStyle, (ADMDialogInitProc)DialogFiles, NULL, NULL);
err = sADMDialogGroup->SetDialogGroupInfo(dialog, "Group1", 2 & kADM_DPTabMask);
After that nothing is diplayed at all. If I drop those SetDialogGroupInfo calls, then I have both dialogs visible and dragging second one I could make it as a tab near first one.
Do I correctly use kADM_DPTabMask here? -
7. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 8:31 AM (in response to andrejusc)And more to your previous comment - VS2005 resource file (I'm talking here about some file with .rc extension) is made completely transparent for ADM engine and thus having some knowledge of how to enable/disable items via ADM - you don't use VS event mapping at all. That approach is totally suitable for me right now.
So, I'm defining my dialogs in VS2005, but they are created via sADMDialog->Create calls using those IDD_ (see my code above) and thus ADM is used indeed. This exactly same approach is used throughout both SDKs v7.x and 8.x. -
8. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 9:24 AM (in response to andrejusc)I haven't used ADM in a while so bear with me.
Your 2nd parameter in Create() needs to be an internal identifier for the dialog, not the name of your plug-in. And it should be unique. So it should be something like "MyCompanyDialog1" and "MyCompanyDialog2". Then instead of using SetDialogGroupInfo use SetTabGroup and use "MyCompanyDialog1" as the group name (or the name of whichever dialog you want to be the 1st in the group). -
9. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 10:01 AM (in response to andrejusc)Yes!!! That was my fault. Now it works, i.e. I see 2 tabs!
I have 2 questions left:
1. I could see that tab name is painted with some strange font, i.e. not the same and not as that readable as all other items inside my dialog. Do I need to call anything else to fix that? Dialog resources is defined to use:
FONT 8, "MS Shell Dlg"
Should it be:
FONT 8, "MS Sans Serif"
or it's irrelevant here and tab height should be adjusted anyway?
2. If I want initially that second tab to be hidden, do I need to call something like this:
sADMDialogGroup->SetDialogGroupInfo(dialog2, "MyCompanyDialog1", 2 & (!kADM_DPDockVisibleMask));
Or there is other call for that?
Thank you very much for your kind help even with this legacy approach! -
10. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 10:25 AM (in response to andrejusc)1. I can't remember much about tab title fonts - it would be worth trying changing the font as you have suggested, but honestly without looking at the source to refresh my memory anything I give you would be a "best guess" on that.
2. If you don't want the 2nd tab to appear at first, don't call the Create() and SetTabGroup() on it until you want it to appear. Since you created the first dialog with a tab-able template, you should be able to add another tab to its tab group any any point. -
11. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 10:52 AM (in response to andrejusc)1. Besides sADMDialog->Create I have only this line that defines dialog caption inside resources:
CAPTION "Test"
Changing that mentioned FONT size or family to let say "MS Sans Serif" doesn't change anything with tab title.
2. I want that 2nd tab to appear/disappear if I check particular checkbox inside 1st tab. It seems that doing 2nd dialog's destroy and recreation is a little bit expensive operation. And instead something should be done with visibility flag/bit/whatever... -
12. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 11:32 AM (in response to andrejusc)Ah, if you want to toggle it on and off yes - you only mentioned previously that you wanted to delay showing it, so it seemed logical to delay the creating until you want to show it.
Use GetDialogGroupInfo and save outPositionCode. Then set the inPositionCode of SetDialogGroupInfo...
To show use:
(outPositionCode | kADM_DPDockVisibleMask)
To hide use:
(outPositionCode & !kADM_DPDockVisibleMask)
That will preserve any other values that are set (since SetTabGroup autosets some tab-related flags, I believe, and you don't want to wipe those out). -
13. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 3, 2008 1:06 PM (in response to andrejusc)While on this topic - do you know if WS_VSCROLL window style for a dialog is supported in ADM? I want to make whole dialog area to be scrollable, but when that dialog shows up - there is no vertical scroll on it. -
14. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 3, 2008 1:20 PM (in response to andrejusc)There is no equivalent to WS_VSCROLL that I know of. -
15. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 4, 2008 3:30 AM (in response to andrejusc)Hi PDL,
First of all that switch off call should be in form:
(outPositionCode & ~kADM_DPDockVisibleMask)
and not this:
(outPositionCode & !kADM_DPDockVisibleMask)
Second, when I do such switching off of my 2nd tab - whole dialog dies. I've tried to analyze what are those position codes in between.
So, initially (after 2nd tab is created) for 1st tab dialog it's 5000, which means front tab and in visible dock, but no dock/tab position here. Then, after switching off that 2nd tab and checking position code for 1st tab once again - I get 10101, which means it's still front tab, 1st for dock position and 1st for tab position. But it's not inside visible dock! Why? I've applied group switching (i.e. dock visibility off) only for 2nd tab, but why 1st was also affected.
If instead of switching off that 2nd tab - I do just Destroy of its dialog, then 1st tab stays on screen and position code for it is 50101. Which means it's front tab, 1st for dock/tab position and in visible dock.
I have checked several times and that seems strange for me. That Destroy workaround also works for me, but just want to be sure I understand whole groups switching scenario for those existing legacy apps. -
16. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 4, 2008 5:45 AM (in response to andrejusc)That does seem strange, but like I said I haven't used ADM in a long time so there are nuances I'm sure I've forgotten. -
17. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 4, 2008 6:11 AM (in response to andrejusc)Yes, I fully understand all my responsibility here.
Another interesting thing is that tabs titles are shown a little bit more readable if I pass this inOptions parameter into Create:
kADMForceRomanFontForDialog
Though I can't find any method to deal with tabs titles fonts separatedly. And sADMDialog->SetText() allows me to specify only regular C string and not Unicode. -
18. Re: Where could I get more information about SetDialogGroupInfo?
Patrick Leckey Nov 4, 2008 6:16 AM (in response to andrejusc)> And sADMDialog->SetText() allows me to specify only regular C string and not Unicode.
Doesn't surprise me. Like I said ADM hasn't been updated since 2003 - I doubt ADM had full Unicode support back in '03. -
19. Re: Where could I get more information about SetDialogGroupInfo?
andrejusc Nov 4, 2008 6:27 AM (in response to andrejusc)But on other hand we have sADMEntry->SetTextW(), so that was not probably exposed well at the moment of ADM freeze.

