|
baerten wrote: I load all the time new data from a database into it.
Ouch! 126 Columns reloaded frequently & how many rows? Sounds like it might be time to rethink the design.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
No,
in the default case only 10-11 columns are displayed in the Grid. The others are hidden.
The User can choose another columns from out the column-chooser ( a part of the CBCG Component )
I think all columns, even the hidden ones will be refreshed each time ...
But where is the logic to refresh columns who aren't displayed ?
If it's really bad programmed, so i create my own ColumnChooser who adds only the "Columns to display".
So i'm sure that there are really only 10-11 columns refreshed
You use the BCGSoft Component ?
Thanks
|
|
|
|
|
From the sounds of it all of the columns where being refreshed. It would seem logical that that’s where you’re getting the performance hit at. No I have never worked with the aforementioned grid. When ever I have to design an application that displays data in a grid I’m very cautious about how often I’m fetching data & refreshing it to the user. Coarse in staff I create I’m often a user as well so I need to pay more attention
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi friends,
I am writing a windows service which access a directory/file from N/W mapped drive from my system using API FindFirstFile().
Here if I run this service as normal exe from console. I am able to access the directory/file. But If I run it as a "service" it says "System can not find the path specified".
I tried running the service using
1) local accout
2) Administrator account.
But results are same. Please help.
|
|
|
|
|
My guess would be that the mapped (or subst -ed) drives are specific to the user account they were created under.
Perhaps some option to make the mapped drives part of the local system users' profiles? Dunno - just making a guess there...
You may be able to do it by using the UNC name instead of the drive mapping. For example, \\SomeMachine\SomeShare or \\SomeMachine\SomeShare\SomeDir\SomeSubDir may work because it does not involve a specific mapping.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I tried using UNC names. but it started giving me errors like
" Login failure: Unknown user name or bad password"
|
|
|
|
|
My guess is that the share requires authentication. My guess is that you will have to have the service authenticate itself either directly, or by impersonation.
See the NetUseAdd(...) function (and related functions) for details on how to use the API to get access to a share.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Dear All,
I want to change Dialogbox's title text by coding ?
How can i do this?
Kindly Help me.
Thanks.
|
|
|
|
|
Override OnInitDialog .
Call SetWindowText(_T("Changed Title")) there.
|
|
|
|
|
prasad_som wrote: Override OnInitDialog
not necessary there...
the OP might need to change the caption at any time (not only at the dialog's construction). basically, this->SetWindowText() may be called in any event handler of the dialog itself...
|
|
|
|
|
toxcct wrote: not necessary there...
But it is one way.
toxcct wrote: the OP might need to change the caption at any time (not only at the dialog's construction). basically, this->SetWindowText() may be called in any event handler of the dialog itself...
True.
|
|
|
|
|
Hi,
I need to assign hot keys - Ctrl + M etc. to my CToolBar class. How can I do that?
I load the toolbar images, set the separtors and then set the button texts. This toolbar has been created by framework via CMainFrame class.
Any pointers?
Regards
Misha
Be the change you want to see.
|
|
|
|
|
buttons in toolbars are associated with commands/menus.
you will simply need to add an accelerator in the resources.
|
|
|
|
|
Thanks Maximilien,
I added accelerator in the main menu bar. But couldn't add it in the toolbar..
but it works..
Thanks a ton again
Misha Grewal,
Be the change you want to see
|
|
|
|
|
Hello All,
I have a SDI MFC Application created with:
1. Application class derived from CWinApp,
2. Frame window class derived from CFrameWnd,
3. Document class derived from CDocument and
4. View class derived from CView.
I have all the required message maps and handlers in place and required registered doc templete.
My problem is when I bring up the SDI Window and try to write on the window some text, I am not able to even bring the cursor control on to the SDI window.
Please comment.
Thanks and Regds.
Amar.
|
|
|
|
|
While creating your SDI app, make your view class to derive from CEditView instread of CView .
|
|
|
|
|
I have this error "SQL:statement too long" how can i edit what is wrong ?
void CDialogDlg::OnSalveazaCr()
{
CWaitCursor wait; // Display a wait cursor
for(int i=0; i<m_list.getitemcount();i++)
{
="" if(m_list.getcheck(i))
="" {
="" m_log.setwindowtext("log="" -=""> NU exista !!");
CString sTemp,sTemp1,sTemp2,sTip1,sTip2,,sTest1,
sAnul1,sLuna,sLuna1,sZiua1,sData,sValore;
CMainSpace pMainSpace;
pMainSpace.m_sTextDatabase.Empty();
pMainSpace.m_sTextDatabase1.Empty();
pMainSpace.m_sTextDatabase2.Empty();
pMainSpace.m_sTextDatabase3.Empty();
m_cod.GetWindowText(pMainSpace.m_sTextDatabase);
pMainSpace.m_sTextDatabase.TrimLeft();
pMainSpace.m_sTextDatabase.TrimRight();
m_nrCod.GetWindowText(pMainSpace.m_sTextDatabase1);
m_datanota.GetWindowText(sLuna1);
m_datanota3.GetWindowText(sZiua1);
m_datanota1.GetWindowText(sAnul1);
pMainSpace.m_sTextDatabase2 = sLuna1 + "/" + sZiua1 + "/" + sAnul1;
CDatabase_Cod pBun;
pBun.m_strFilter="cod="+ pMainSpace.m_sTextDatabase;
pBun.m_strFilter="nr="+ pMainSpace.m_sTextDatabase1;
pBun.Open();
while (!pBun.IsEOF())
{
int nIndexA = pBun.m_cod.Find(pMainSpace.m_sTextDatabase);
int nIndexB = pBun.m_nr.Find(pMainSpace.m_sTextDatabase1);
if ((nIndexA != -1) & (nIndexB != -1))
{
pBun.Edit();
sTemp = m_list.GetItemText(i,22);
pBun.m_nr = sTemp;
pBun.Update();
pBun.Requery();
pBun.Close();
pBun.Open();
pBun.MoveLast();
pBun.Close();
m_log2.SetWindowText(pBun.m_nr);
m_log.SetWindowText(sTemp);
break;
UpdateData(FALSE);
}
pBun.Close();
break;
//while
}
}
m_list.DeleteItem(i);
i--;
}
}
Bravoone
|
|
|
|
|
Just set a breakpoint and debug your code. Single-step from the breakpoint and check what's happening.
When you know where (in your source code) you get the SQL error, then you probably can figure out how to fix the cause of the problem.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Bravoone_2006 wrote: I have this error "SQL:statement too long"...
How long is it?
Bravoone_2006 wrote: how can i edit what is wrong ?
By shortening the SQL statement.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
how to read the notepad file using vc++
naveen padiyar
|
|
|
|
|
naveen padiyar wrote: how to read the notepad file using vc++
Which notepad file ? You mean '.txt' files ? They are simply text files, so you can open them (with fstream for example) and read the data out of it.
|
|
|
|
|
If you are using MFC, you can perform file read/write operations with the help of CFile class. Read more about CFile on msdn[^]
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Perhaps the question is:
how to read a text file using C++?
Is it?
(Yes) Then you can use C++ fstream class, or C fopen, fread, fclose stuff, or, maybe, MFC CFile class, or, finally, win32 APIs such as OpenFile (hey, you've a lot of alternatives!)
(No) Formulate again (in a more comprehensible way) the question.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Do you want to run NotePad.exe ?
|
|
|
|
|
In my appliaction I've modeless child dialog on the main application dialog. On the child dialog there is a combobox with properties set as:
Type->Drop List; Owner draw->Fixed; Vertical scroll checked.
I've derived a new class from base CComboBox class and overridden the DrawItem method in base class. I used the code available in MSDN inside this method. When I execute the application it gives a runtime error.
Can someone guide me how to solve the problem or implemement the owner drawn combobox ?
The same code works fine when the combobox is used on the main application dialog but not on the modeless dialog.
Please help.
Thanks,
Gajendra
|
|
|
|