|
Does anybody have an example that reads Unicode text file?
Thanks in advance!
Best regards,
Vladimir
|
|
|
|
|
I very badly need to get an old copy of Borland C++ 4.5 or 5.0 with OWL for an old project....my old hard drive died, and i need to rebuild something!
Please email me if anyone can find the old CD.....
|
|
|
|
|
My school provides a link to an old copy (yes, I'm sad to say that my school actually uses Borland)...
Try this
Hope it's what your looking for,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
I created a dialog box and added a button to close the dialog box when I was finished. I added CDlg::EndDialog(nResults); and it didnt work when I moved the source code onto the PDA?
RebelCause
|
|
|
|
|
I created a long dialog box. I added a scrollbar in the properties of the dialog box. When I load the dialog box on the PDA I dont get a scroll bar?
Need Help
RebelCause
|
|
|
|
|
I can make my dialog to become a full screen dialog by using following putting code inside the OnInitDialog()
SetWindowPos(&wndTopMost,0,0::GetSystemMetrics(SMCXSCREEN),::GetSystemMetrics(SM_CYSCREEN),SWP_SHOWWINDOW);<br />
Only dialog get full screen but all the items, listctrl, combo box,etc.. on the dialog still the same size.. how can i make a full screen dialog and resizing all the item on that dialog as dialog get larger.
Thanks
|
|
|
|
|
|
I have a modeless dialog that pops up a MODAL dialog. What I want to do is position that MODAL child relative to the "parent" modeless dialog - offset upper-left corner by +50.
What I can't do is get a pointer to the modeless (parent) dialog. My code just references the governing MainFrame window. Here is what I'm trying:
BOOL CPopUpDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CRect pRect;
CWnd *pParentWnd;
pParentWnd = GetParent(); // tried GetParentOwner() too
pParentWnd->GetWindowRect(&pRect);
MoveWindow(pRect.left + 50, pRect.top + 50, 400, 400, NULL);
return (TRUE);
}
Can you help/explain how I reference the correct modeless parent I want?
Thanks.
John
|
|
|
|
|
GetParent() should return a pointer to the modeless dialog, if that is in fact who created CPopUpDlg .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ok, here is what I have:
A modeless CPropertySheet derived dialog with a CButton that pops up a modal dialog. The modal dialog I use to collect a couple fields of data SPECIFIC to the parent modeless Sheet.
What happens now is when I pop up the modal dialog, the positioning is relative to the Main Frame.
I want the modal dialog to be placed right over the modeless Sheet (dialog).
Also, I can see that my method of placing the modal dialog is relative to the Main Frame because when I move the Main Frame around, the modal dialog is offset +50 from the Main Frame.
Thanks for help (in advance)
|
|
|
|
|
Try using SetWindowPos() if MoveWindow() doesn't work. (Cheesy answer, I know).
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
GetWindowRect() returns screen coordinates and MoveWindow() uses client coordinates for child windows. Try using ScreenToCLient(). Also how do you know GetParent() is returning the MainFrame. Have you verified this somehow.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
The displacement of the window works (one way or the other - sans ScreenToClient()),
However, I see that the coordinates and thus my ParentWnd reference are with respect to the MainFrame.
When I move the main frame (the window with the menu bar and tool bar for my app), the modal window is offset the same amount with respect to the main frame's window. This is the case every time I popup the modal window from my modeless property sheet.
Any ideas???
|
|
|
|
|
Does the code the creates the modal popup dialog specify the modeless dialog as its parent? Also if you look at the Window info for the Modal dialog in Spy++ or WinSpector is it correct?
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
I don't do it explicitly. The modeless property sheet (or the property page on the sheet) calls DoModal().
So it happens like this:
void CPage2Dlg::OnButton()
{
CPopUpDlg dlg;
dlg.DoModal(); // position WRT the modeless parent
}
Using Spy++, I get some wacked results -- in the OnInitDialog() of the modal dialog, GetParent() returned and address different that what I found using Spy++ for:
(Main Frame) - 0x002204EC
Prop Sheet - 0x000D0534
modal dialog itself - 0x00030DC0
GetParent() -- 0x00355290
Oh the agony!!!!
|
|
|
|
|
<br />
void CPage2Dlg::OnButton()<br />
{<br />
CPopUpDlg dlg(WHATEVER_TEMPLATE_ID_YOU_ARE_USING,this);<br />
<br />
dlg.DoModal();
<br />
}
afaik, it should work
eperales
|
|
|
|
|
Well I think you are getting a bit closer. Track down what window 0x00355290
is on Spy++. You either need to set the Modal dialog up so GetParent() returns the right thing, or find another way to get the Modeless dlg hWnd.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Save the property sheet's pointer in the property page, and pass it to CPopUpDlg in OnButton() . That will guarantee that you have the right origin window.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hello there,
I wrote a MFC exe project, How can i make an ActiveX of it ?
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Is there a way with the CWebBrowser2 Control to know if URL that i want to display is invalid (wrong URL, File does not exist, Connection Problem ....) ?
Thanks
Olivier
|
|
|
|
|
I have found the solution :
In the event sink map, you have to add
ON_EVENT(CWebBrowser2, ID_WEB_CTRL, DISPID_NAVIGATEERROR, OnNavigateError, VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PBOOL)
and in the code :
<br />
void CWebBrowser2::OnNavigateError (LPDISPATCH lpDisp,VARIANT FAR* URL, VARIANT FAR* TARGET , VARIANT FAR* STATUS, VARIANT_BOOL * CANCEL)<br />
{<br />
*CANCEL = VARIANT_TRUE;<br />
}<br />
|
|
|
|
|
Hi,
I have created a modeless Property Sheet. I now want to add pages at run time (remove pages then add pages) so that my property sheet has at most 2 pages at one time.
THE PROBLEM IS that I get an error when I try to do this. The debugger replys that a window handle is null (0x00000).
If I create the sheet and add the pages in while in the Sheet's constructor, I don't get an error. But if I try to add a page during run time, I get an error. What is wrong and how can I correct this? Please help.
Here is what I want:
Page 0 (zero) -- page that will be swapped in/out
Page 1 -- page that always appears. Must be the right most page (on tab)
I have my callbacks in CMainFrame class and I have done the modeless Property Sheets before -- when pages are not removed/added dynamically.
Thanks in advance for the help. Code snipet follows
Johnny
void CMainFrame::OnModelessPropSheet()
{
CBasicEventPage pageBasicEvent;
CPageBlue pageBlue;
/********** // 11/12/02 - dynamic add/removal of pages not yet working
int nPageCount;
// Remove both pages (event and the Basic Event Data)
nPageCount = m_pSheetManEvents->GetPageCount();
for (int i=0; i < nPageCount; i++)
m_pSheetManEvents->RemovePage(i);
// Add pages back in (starting with Blue and then Basic Event Data)
m_pSheetManEvents->AddPage(&pageBlue);
m_pSheetManEvents->AddPage(&pageBasicEvent);
m_pSheetManEvents->SetTitle("Insert Blue", 0);
**********/
if (m_pSheetManEvents->IsWindowVisible())
{
m_pSheetManEvents->SetFocus();
}
else
{
m_pSheetManEvents->ShowWindow(SW_SHOW);
}
}
|
|
|
|
|
There is one alternative solution. You can setup the sheet to not show a certain page. In other words, you can keep the sheet from diaplaying a page via redirecting the active page as the user tries to focus the hidden page. This solution, however, does not hide the tabs.
As an experiment, see if there is a member function for CPropertySheet that hides a page.
|
|
|
|
|
Thanks. That sounds like a good work around.
I might include all the pages (I will have at most 7) and then hide the 5 that I don't use (including their tab). There should be a method to hide pages with the TAB not displayed. ???
I also found an example on a Property Sheet alternative from Chris Losinger - a Preference dialog (http://www.codeproject.com/property/saprefs.asp) This may come later as time permits.
Thanks for the reply.
Johnny
|
|
|
|
|
Hello,
I had a question concerning non-visual C++, but I figured I'd ask you guys anyways because you guys know a lot. I am using the string class in C++ (not a char array), and I want to convert it to an uppercase string. I know that char arrays have a toupper() function where you can turn the array, letter by letter, into uppercase values. If I use c_str() and convert my string into a null terminating string. Is it possible though to acces the values of the string, letter by letter?
Thanks a bunch,
Nickone
|
|
|
|