|
I have de same problem.
With any solution posted here I need access to CSAPreferDialog, and I don't know how.
Can anyone post or send me some code example.
Thanks in advance.
Amauta.
|
|
|
|
|
Hi,
Im new to vc++ but would like to use saprefs in one of my apps.. How do i bring in the microsofts font dialog and add it as a dialog in saprefs ?? can any one please help me out ?
|
|
|
|
|
Is there a problem with using this as a modeless dialog?
I can create a model dialog with pages, which works great.
But if I Create a modeless dialog it does not work i.e.
If I Create only the CSAPrefsDialog without adding a page (AddPage(...), it works, but as soon as I add a page it crashes.
The first call to ShowPage from OnInitDialog() works correctly, but after the first call to PostMessage(WM_CHANGE_PAGE...) from OnSelchangedPageTree, ShowPage crashes due to an invalid m_hWnd.
Any Help?
Thanks
|
|
|
|
|
Sorry... I've never tried this as a modelesss dlg. i suspect there could be problems since each sub-dlg is already a modeless dlg. unfortunately, i'm not familiar enough with the guts of dlg message handling to say anything more.
-c
Smaller Animals Software, Inc.
|
|
|
|
|
Excellent GUI control!
I want to add 20 yes/no questions, one question per page.
It would be wonderful if the nodes in the tree view can display both the page title and the current answer for the page's question, something like:
- 20 Questions
Question 1: /YES/
Question 2: /NO/
Question 3: /YES/
.....
Would you know of any easy way for me to modify the code to accomplish this?
Thanks for all pointers!
Philip Chang
|
|
|
|
|
I've completed this. I would be willing to share the code if interested.
Thanks,
Philip Chang
|
|
|
|
|
Hi,
In one of my apps,the CSAPrefsSubDlg Derived dialog is a tabbed control, containing three more dialogs as child inside it.
Now the values inside this dialog are not retrieved on OnOK.
While debugging I found that the window handle of these dialogs becomes NULL and hence the OnOK or UpdateData is not being called. can you suggest me on how to go about this issue.
Cheers
Kannan
|
|
|
|
|
I had written a dialog based application using this control.It works great.
Now i'm working on an application which is implemented as a Prop. Sheet based Wizard. Is it possible to make this control as one of the pages of the wizard.
Thanks
Cheers
Kannan
|
|
|
|
|
yes, it should be possible. but, you'll have to try it to be sure.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I just finished integrating it into my application (and removing the old property sheet and pages). I had no problems at all, and on the whole it took about 5 minutes. Good job making it simple and easy to use!
|
|
|
|
|
nice work man ... looks quite impressive
|
|
|
|
|
This helped me a lot thanks!
|
|
|
|
|
from time to time it crushes my application and after that windows became unstable.
if i look into the Call Stack it seems that it crushes in DefWindowProc(512,0,5898364) - i think this is WM_MOUSEMOVE.
i can't reproduce it on a regular basis but it shows up let say at 10 runs...
besides this , the control is very cool
regards,
adiz
|
|
|
|
|
FYI, i've had this code running in our ThumbNailer app for at least two years and haven't seen anything like what you describe.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I tried putting a spreadsheet control in one of the dialog pages and it prevents any other controls from being displayed? Is this a problem with the picture box that hold the page?
|
|
|
|
|
there is no picture box on these pages. (not as i wrote them, anyway)
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Sorry, my mistake. The SAPrefs Dialog has a picture box (IDC_DLG_FRAME) which holds each page as they are selected in the TreeView, right? In fact any ActiveX control does the same thing.
Any suggestions?
|
|
|
|
|
Hello:
I'm not usually in the habit of responding to my own questions, but the answer to this particular problem was :
1.) Add AfxEnableControlContainer() to CPrefsApp::InitInstance()
2.) In the page where you want the ActiveX control you code something like this:
BOOL CDlg1::OnInitDialog()
{
CSAPrefsSubDlg::OnInitDialog();
CLSID clsid = m_spdGrid.GetClsid();
CRect rcWnd;
GetClientRect(rcWnd);
DWORD dwstyle = WS_CHILD|WS_VISIBLE;
m_spdWnd.CreateControl(clsid,"",dwstyle,rcWnd,this,IDC_SPREAD_CONTROL);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
|
|
|
|
|
These classes are very useful and wonderful but I have a question about processing Tab key.
When I try to move mouse focus with "Tab" key,the focus could not be moved correctly.
Of course, when ShowPage is called, just mouse focus is moved.
Is there any good way to process "Tab" key from/to outer controls?
Sometimes , we have to implement all user interface with Keyboard.
Please help for that.
Thanks in advance
|
|
|
|
|
Sorry, i do not know how to do that. I have run into the same problem myself...
-
|
|
|
|
|
Finally, I found how to fix this problem. (It's simple way.)Just add "Control" property in each dialog then we can use Tab key porcess.
If you set "Control" property in dialog (Resoruce editor/Dialog property), then each sub dialog will behave like control. This means that each sub dialog can receive tab key from outer control in main dialog.
Jeth Chang.
|
|
|
|
|
I changed the dialogs property as control. Now I am able to go to the sub dialogs(CSAPrefsSubDlg). The problem is with the tab order.
Tab key works focuses the controls in the following order:
1. Tree control
2. Ok button
3. Cancel button
4. CSAPrefSubDlg class.
How can I change the tab order like this...
1. Tree control
2. CSAPrefSubDlg class.
3. Ok button
4. Cancel button.
radha
|
|
|
|
|
Hi,
just make a call to:
pPS->pDlg->SetWindowPos (&m_pageTree,0,0,0,0,0);
right before:
pPS->pDlg->MoveWindow(m_frameRect.left, m_frameRect.top, m_frameRect.Width(), m_frameRect.Height());
in SAPrefsDialog::ShowPage(int iPage)
regards,
Flo
--
Florian Heidenreich
WWW: http://www.mp3tag.de
eMail: codeproject@mp3tag.de
|
|
|
|
|
I just spent 3 days working on a problem like this. I didn't have the control flag set in an ATL composite control.......
Time for some sleep.
|
|
|
|
|
Hi,
I definetly like this code. The idea is great. I have a small question. How can I make a similar application, but with the difference that the tree-dialog is the program's main window? What I mean is a program without the first small dialog.
Thanks,
Kar
|
|
|
|