|
Yeah that got it.
But you lose all the folders and organisation etc....
cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Jawache wrote:
But you lose all the folders and organisation etc....
Huh?
I still have my projects organisation, since that is contained in the *.dsp files.
I never used the ClassViews context menu 'New Folder', but I always thought that it refers to actual filesystem-folders.
Perhaps you can experiment with which of the files I mentioned really have to be deleted to help the IDE to recover?
|
|
|
|
|
jhwurmbach wrote:
I never used the ClassViews context menu 'New Folder', but I always thought that it refers to actual filesystem-folders.
No its just some virtual folders to help you organise your classes. Thats all i lose, wasn't must trouble remaking them again though.
jhwurmbach wrote:
Perhaps you can experiment with which of the files I mentioned really have to be deleted to help the IDE to recover?
Will do, the next time it f*cks up.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
|
Hi,
It happened again and i experimented.
All you need to do is remove the .ncb file and not the .opt or .position files.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
If a class disappears from the workspace pane, there is a very simple solution:
Go to FileView, open the header file, and add any character to the class-name. I usually use a white-space You might have to save the file.
The classwizard will notice you made a change to the file, and updates the class (showing it again in the workspace pane)
|
|
|
|
|
In this case i make "Save All" and the classes are in the class tree again.
Marco
|
|
|
|
|
I need to simulate the mouse click on a row
being part of a MSFlexGrid control.
In other words, is need to highlight a specific
row by the code (let this row to ).
I have used the SetRowSel but it doesn't do what i
want. It only set the focus in the specified row but
it doesn't paint the row.
How can I do ???
|
|
|
|
|
Hi
I am working on an HTML Editor.
When I want to insert a code which is bigger than a line (Let's say a JavaScript, for example), instead of just something simple as ' <br> ', I need to use \r\n istead of \n, since \n won't make a new line, but a kind of black ''
symbol.
My problem is that when I want open a page which was not made by my program, let's say it was made using Notepad, as example, the code will display normally, but instead the new lines, I'll see plenty of black '' symbols.
I would like to be able to use the \n function for a new break instead of \r\n, since I would be able to read files normally.
I use a Dialog-Based application, instead of a SDI/MDI, and that's what I need.
Thanks a lot.
|
|
|
|
|
Are you using a multline edit control?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Try setting the mode to text before reading the archive, as in:
_setmode(ar.GetFile().m_hFile,_O_TEXT); (Not sure whether this will work.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yes, it is a Multiline, want-return EditBox
|
|
|
|
|
The \r\n is only required for an Edit Box in other applications you should only need \n. Have some sort of conversion filter in your code when loading and saving a file.
OnLoading file convert all \n to \r\n
and OnSave convert all \r\n to \n
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Can you explain me how to do that please?
Sorry I haven't been programming in C++ for a long while.
By the way, I've tried to add a RichEdit control instead of an EditBox but it didn't worked.
When I add one and try to execute the program, nothing/no window appears...
|
|
|
|
|
How are you loading and saving a file?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
To save and open I use:
int saved = 0;
CString fileinfo;
void CFastPHPDlg::OnFileSave()
{
char szFilter[]="Fichier HTML(*.html)|*.html|Fichier SHTML(*.shtml)|*.shtml|Fichier PHP(*.php)|*.php|Fichier PHP3(*.php3)|*.php3|Fichier PHP4(*.php4)|*.php4|Fichier PHTML(*.phtml)|*.phtml|";
CFileDialog dlgFile(FALSE, "html", "*.html", OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, szFilter, this);
CString output;
if(saved == 0)
{
if(dlgFile.DoModal() == IDOK)
{
htmlfile = fopen(dlgFile.GetFileName(), "w+");
m_phpEdit.GetWindowText(output);
fputs(output, htmlfile);
fclose(htmlfile);
CFastPHPDlg::SetWindowText(dlgFile.GetFileName());
CFastPHPDlg::GetWindowText(fileinfo);
CFastPHPDlg::SetWindowText("FastPHP - " + dlgFile.GetFileName());
saved++;
}
}
else
{
htmlfile = fopen(fileinfo, "w+");
//CString output;
m_phpEdit.GetWindowText(output);
fputs(output, htmlfile);
fclose(htmlfile);
CFastPHPDlg::SetWindowText("FastPHP - " + fileinfo);
saved++;
}
}
void CFastPHPDlg::OnFileOpen()
{
char szFilter[]="Fichier HTML(*.html)|*.html|Fichier SHTML(*.shtml)|*.shtml|Fichier PHP(*.php)|*.php|Fichier PHP3(*.php3)|*.php3|Fichier PHP4(*.php4)|*.php4|Fichier PHTML(*.phtml)|*.phtml|";
CFileDialog dlgFile(FALSE, "html", "*.html", OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, szFilter, this);
if(dlgFile.DoModal() == IDOK)
{
CString input;
char temp[200];
htmlfile = fopen(dlgFile.GetFileName(), "r+");
while(!feof(htmlfile))
{
fgets(temp, 200, htmlfile);
input=input+temp;
}
m_phpEdit.SetWindowText(input);
fclose(htmlfile);
CFastPHPDlg::SetWindowText(dlgFile.GetFileName());
CFastPHPDlg::GetWindowText(fileinfo);
CFastPHPDlg::SetWindowText("FastPHP - " + dlgFile.GetFileName());
saved++;
}
}
*Fichier = File, in french. Because my program is in french.
Thanks for helping me
|
|
|
|
|
Cerb wrote:
m_phpEdit.GetWindowText(output);
fputs(output, htmlfile);
fclose(htmlfile);
m_phpEdit.GetWindowText(output);
output.Replace(_T("\\r"),_T(""));
fputs(output, htmlfile);
fclose(htmlfile);
Cerb wrote:
m_phpEdit.SetWindowText(input);
input.Replace(_T("\\n"),_T("\\r\\n"));
m_phpEdit.SetWindowText(input);
or something along those lines i reckon should work.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
To use richedit you should call AfxInitRichEdit() first.
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
Hi,
when the List is scrolled, i've to hide a edit control ( editable sub items ). But i can't find the scroll event message in the class wizard.
I use a scroll mouse.
Can somebody help me ?
Marco
|
|
|
|
|
I am doing something like:
std::string id=(char *)(_bstr_t)m_pRecordSet->GetCollect(L"id");
i.e I am collecting the "id" field value from record set object and assigning it to string. This works fine for me. But the problem is that the value of "id" field can be NULL. And whenever such situation appears, my program raises an exception. How can i prevent this error and copy NULL to string successfully when this situation happens.
|
|
|
|
|
std::string id=(char *)(_bstr_t)m_pRecordSet->GetCollect(L"id");
Hi I think that GetCollect returns a variant, and in case of
NULL values, this variant has a VT type of VT_NULL,you
could check for it.
|
|
|
|
|
hi all,
I am creating a web browser thing using CHtmlView. In this application I wish to get the value entered by a user in a particular text box in an HTML page which is opened in my browser. I know the url of the page. Can you help me in getting this done.
Thanking all in anticipation
Regards,
Onkar
|
|
|
|
|
Steps :
- get the current document (IHTMLDocument2)
- then get the document.forms collection
- for each IHTMLFormElement, retrieve the target IHTMLInputElement edit box by going through the .elements collection (edit box are usually identified by their names : IHTMLInputElement::get_name(BSTR* p);)
- set/get the appropriate value with IHTMLInputElement::put_value(BSTR v);
And I swallow a small raisin.
|
|
|
|
|
Hi Mr Rodriguez,
Thanks for your reply. But I guess this method is a bit tedious and also it won't solve all my purpose. So I have figured out a different approach. Can u help me in modifying the url to navigate. I have sinked the BeforNavigate2 event in my CHtmlview class. I have read in an article that I can modify the navigation by sinking event BeforeNavigate2. I have to modify the url. Pls help me with code fragment to achieve the same. I ahve seen an article in MSDN periodicals but it has a vb example. Pls help me
Regards,
Onkar
|
|
|
|
|
I want a ComboBox that doesn't accept the user typing in some data.
I'm pretty sure this is just a flag to be set on creation, WM_EX_NOINPUT or something but I can't remember which one.
Can anyone help?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|