|
|
Hi JLR, thanks for your response...
My application must support Windows down to Win 95. Is there anything I can do?
Mark
|
|
|
|
|
Jethro63 wrote:
My application must support Windows down to Win 95. Is there anything I can do?
What's your need exactly? I mean, you said you need a parent window to receive notifications about scrolling in a listview, but what do you need this for? Perhaps there's another way to do what you actually need.
For example, would subclassing the control with a class derived from CListCtrl help? Doing that would allow you to handle any windows message...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi Jose:
My problem is that I must provide a list control in report mode that displays records with about five sub-items per row. This view must potentially display a LARGE number of records, sometimes over 200,000. Normally, if the record count was lower, I would just insert all the rows I need and fill out all of the records then the user is free to scroll away. But when the number of records is large, it takes WAY too long to initialize all of those records.
I found that if I simply create the number of rows that I need without filling out any of the record data in the columns, then the amount of time it takes is tolerable (like 30 seconds with a friendly progress bar to amuse the user in the mean time).
My next move, if I can figure out how to do this, is to simply fill out only the records that are currently visible in the view window. Each time the user scrolls by whatever means, I would fill out any rows that become exposed but have not been filled out. This all hinges on me being notified when the user has caused the list control to scroll and to then find out which rows are now visible.
That's my plan. Feel free to rip it apart.
Thanks,
Mark
|
|
|
|
|
Jethro63 wrote:
My problem is that I must provide a list control in report mode that displays records with about five sub-items per row. This view must potentially display a LARGE number of records, sometimes over 200,000.
I figured it was something like that, hence the question
This article seems to be what you need:
Using virtual lists[^]
I haven't tried it, but it's the approach I'd suggest in your case (letting the list ask you for the info as it needs it).
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi Jose:
Thanks, I'll have a look.
Mark
|
|
|
|
|
I have a menu on my dialog app. I want to be able to turn on and off debugging (which is a submenu on my main menu). My menu is setup like this:
File
->Timeouts
->Debug
However when I try and check it I get an assertion error. Can anyone give me some help on this? Here is my code on the event OnSettingsDebug()
<br />
CMenu menu;<br />
CMenu *MainMenu = NULL;<br />
<br />
VERIFY(menu.LoadMenu(IDR_SETTINGSMENU));<br />
MainMenu = menu.GetSubMenu(1);<br />
UINT mState = MainMenu->GetMenuState(ID_SETTINGS_DEBUG, MF_BYCOMMAND);<br />
ASSERT(mState != 0xFFFFFFFF);<br />
if (mState & MF_CHECKED)<br />
{<br />
MessageBox("Checked");<br />
MainMenu->CheckMenuItem(ID_SETTINGS_DEBUG, MF_BYPOSITION |MF_CHECKED);<br />
}<br />
else<br />
{<br />
MessageBox("Unchecked");<br />
MainMenu->CheckMenuItem(ID_SETTINGS_DEBUG, MF_BYPOSITION |MF_UNCHECKED);<br />
}<br />
When stepping thru it, I see that I am not getting back the mState correctly. Is there a different way I should be doing this?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
|
nope....looks like I was missing a pointer to me main menu. Once I got that it worked out. Thanks anyways
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hi all,
I am writing an application to download files from FTP server, but when the connection fails (from the FTP server side)during downloading a file the application stops working.
i used CFTPConnection::GetFile() but it didn't work, also i tried to use CInternetFile::Read() but the function also stop responding when the connection fails during the files download.
can anyone help me , thanx.
|
|
|
|
|
I would like to pass a variable in a edit box from a child dialog box to an other edit box whitch is in a parent dialog box.
My probleme is that the 2 class (child and parent) don't know there variable each other.
How can I do to get a variable from a class to an other class ?
Thank in advance for the answer
|
|
|
|
|
When the child dialog closes, save the contents of the edit control in a public member variable. When control returns back to the parent dialog, you can then access that other dialog's member variable. Make sense?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I tried to but a member variable is declare in only 1 class an the other class don't know her... You can't declare a common public member variable for 2 class.
|
|
|
|
|
I'm not sure exactly what you did, but what I described will work. Perhaps you misinterpreted it. Is this an MFC application?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
You can always make the variable public. Or better still, add a getter that returns the value of the variable.
yourDialog.DoModal();
CString text = yourDialog.GetYourText();
In your child Dialog, add a getter that looks like
CString GetYourText()
{
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thank you for your help, The solution with getYourText is working . I don't why but the solution with the variable public don't work
|
|
|
|
|
Hi,
I am working on scanner driver. The scanner sends the JPEG data in chunks and I am saving the chunks of data in a stream. I need to convert the JPEG stream to BMP stream. I want to know is there any facility from the gdi++ library to process the chunks of data and keep storing it in another stream.
Scanning the image and processing it should be paralel.
Thanks in advance.
Abhiman
|
|
|
|
|
I keep getting the following error
Cannot find import;Dll may be missing, corrupt, or wrong version file "MFC42.DLL", ordinal 6467(error 127)
Can anyone help me with this.
Meena
|
|
|
|
|
What are you doing when this error appears? Does the file exist on the machine? Is there more than one occurrence?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi,
I am trying to make Nishant Sivakumar - "Using global hotkeys" start hidden:
http://www.codeproject.com/system/nishhotkeys01.asp
I have added the hidden modal code from Nishant Sivakumar - "Some handy dialog box tricks, tips and workarounds ":
http://www.codeproject.com/dialog/dlgboxtricks.asp
It compiles, but it doesn't become hidden.
Changes to the "Using global hotkeys" project I made:
In "HotKeyTestDlg.cpp" I added:
void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos)
{
if(!visible)
pos->flags &= ~SWP_SHOWWINDOW;
CDialog::OnWindowPosChanging(pos);
}
and added "visible = FALSE;" to:
CHotKeyTestDlg::CHotKeyTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CHotKeyTestDlg::IDD, pParent)
In "HotKeyTestDlg.h" I added "BOOL visible;" to protected under:
class CHotKeyTestDlg : public CDialog
This wouldn't compile "error C2509: 'OnWindowPosChanging' : member function not declared in 'CHotKeyTestDlg'" till I added "void OnWindowPosChanging(WINDOWPOS * pos);" to public under:
class CHotKeyTestDlg : public CDialog
So it now compiles and runs, but it doesn't start hidden.
|
|
|
|
|
balaclavabob wrote:
This wouldn't compile...
You could have avoided all of this hassle by letting ClassWizard add the method for you. It would have updated both the .cpp and .h files.
balaclavabob wrote:
So it now compiles and runs, but it doesn't start hidden.
Cab you confirm that the pos->flags &= ~SWP_SHOWWINDOW statement is actually executed? If not, is visible being changed to TRUE somewhere?
Do you have any calls to ShowWindow() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
You could have avoided all of this hassle by letting ClassWizard add the method for you. It would have updated both the .cpp and .h files.
MFC is something I have been told to avoid at all costs and just go and learn .Net, so my knowledge of MFC is quite limited.
DavidCrow wrote:
Cab you confirm that the pos->flags &= ~SWP_SHOWWINDOW statement is actually executed? If not, is visible being changed to TRUE somewhere?
It is not executing, I tried both:
void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos)
{
if(!visible)
{
pos->flags &= ~SWP_SHOWWINDOW;
MessageBox("This executed");
}
CDialog::OnWindowPosChanging(pos);
}
void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos)
{
pos->flags &= ~SWP_SHOWWINDOW;
MessageBox("This executed");
CDialog::OnWindowPosChanging(pos);
}
both didn't bring up the message box.
visible is always false for the entire length of the program, I haven't modified it anywhere and it isn't being modified by anything.
DavidCrow wrote:
Do you have any calls to ShowWindow()?
I have no calls to ShowWindow() at all.
|
|
|
|
|
You failed to add ON_WM_WINDOWPOSCHANGING() to the dialog's message map. This is something that ClassWizard would have handled for you!
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I added it manually and it worked.
I was looking thru the ClassWizard and unless I added in ON_WM_WINDOWPOSCHANGING() manually it wouldn't have appeared....
For future reference how should I use ClassWizard todo something like this....
Thanks for your help.
|
|
|
|
|
balaclavabob wrote:
I was looking thru the ClassWizard and unless I added in ON_WM_WINDOWPOSCHANGING() manually it wouldn't have appeared....
Wrong again. ClassWizard has somehow been set to only show dialog-related messages. Click the Class Info tab and select Window in the Message filter: combobox. Back on the Message Maps tab, you should see WM_WINDOWPOSCHANGING in the list of messages.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|