|
|
I'm trying to use _findfirst and _findnext to find files with a certain extension in a given directory. THe files I'm trying to "find" are in the format "file.ext1.ext1".
_findfirst and _findfirsti64 don't find these files. Anyone got any hints? BTW, this has to work on Win9x and WinNT.
|
|
|
|
|
Nevermind. I had a brain fart.
|
|
|
|
|
I'm subclassing the MFC CListCtrl and am having difficulty getting the header notification message for sorting the list when in report view. There is a KB article, Q250614, that explains a bug with class wizard not generating the proper message map entry, but in my case I not trying to handle the message in a dialog, but in the subclass itself. The class wizard is generating an ON_NOTIFY_REFLECT message, but that doesn't seem to trap a meesage for me. I've also tried to put in an ON_NOTIFY handler, but that did not trap a message for me either. Spy++ shows that the window is receiving a WM_NOTIFY message. I'm probably missing something simple, so a little pointer from someone else would be welcome. Thanks.
Chris
|
|
|
|
|
You mean your control doesn't receive LVN_COLUMNCLICK via reflection?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Now that I have used this message instead, yes I can trap the sort request. Thanks for the assistance.
Chris
|
|
|
|
|
simple newbie question
i have 2 dialogs, main dialog and a child dialog...How to execute a function of the main dialog from the child dialog.
|
|
|
|
|
CMainDlg * pMain = (CMainDlg*)GetParent(); ( or AfxGetMainWnd() )
pMain->RunThisFunctionPlease();
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
|
Ok guys,
I know you can add a title to tooltips, ala W2K. I've got dll that allows me to do it via code, but I have no idea how to do it myself?
I've searched for ages but whilst I find websites that say it can be done, none of them have told me how
Anyone help me out?
TIA
Mark
|
|
|
|
|
Send TTM_SETTITLE to your tooltip control. It sets both icon and bold text.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hello
1) I am new in C++ (acully in windows either ) anyway can any one tell me how can check if there is another copy of my program is running (if you know how in C then its good for me than C++ )? I know its easy for you put please help me
2) anyone know where can I find a good site C/C++ source (I mean site like planet-source-code.com
Thank you
Muslim
mrguest@IamMuslim.org
|
|
|
|
|
Hi !
The most common way is to create a named (with a unique name) kernel object (say - mutex) on your programm start up (::CreateMutex() ). In case if the return value will be NULL you shoudl call to GetLastError() and if you'll get the ERROR_ALREADY_EXISTS - it will show you that this is not a first instance of your programm. And you have to close the object before programm exit... (or you wont be able
to run even first copy
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
I have an MFC application which fills a listctrl with records from a database. It runs fine on my local machine, but if I put the database on another PC and connect to it over the network, it runs really, really slowly. It runs slowly even when you are not doing anything with the database. After about 10 seconds it completely grinds to a halt.
Something I did notice is that when I load the workspace into Visual Studio it eats up at least half my memory which I am sure is not right (the code is only about 4-5MB). Could the workspace/resources/code be corrupt??
Please Help!!
David Osborn
|
|
|
|
|
If you want any *real* help, provide more detailed information, for example: what database are you using.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I am using an MS Access (97) database and linking to it using ODBC. The application runs through all the records and adds them to various customised list ctrls. I am also using an Outlook-style menu component with a 3-way split screen - the main screen switches between different CFormViews depending on what is selected from the "Outlook" bar.
I have other applications which link to Access databases over a network just fine.
David Osborn
|
|
|
|
|
Are your list controls filled OK, and after that program crashes? Or it happens in the middle of operation?
BTW: why are you using ODBC for Access? Aren't MFC DAO classes enough?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
It is not consistent. It just runs really slowly - sometimes it freezes while trying to fill the first list and sometimes it fills the lists but then if I try anything (even just bringing a dialog box up) it goes really slowly until it just stops responding. As I said it runs fine locally.
I am using ODBC because the application will be running on a client/server environment, eventually running with SQL Server.
David Osborn
|
|
|
|
|
When it stops responding, use Break command in the debugger. You'll be able to see which routine hangs your app. I'd also look search Knowledge Base for BUG-style articles related to ODBC/Access - there's a chance that you hit some ODBC problem.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
If you copy a file from one pc to another, the speed of transference of the file is good?
The problem can be that the network is slow.
Carlos Antollini.
|
|
|
|
|
There is no problem with the network. Files copy okay and as I said we have other similar applications which run very quickly over a network. It is something to do with the application.
David Osborn
|
|
|
|
|
This is a bug with Microsoft Data Access Components versions 2.1, 2.5, 2.6
an excessive amount of network packet activity occurs, even when the ODBC connection is idle
It is caused by wrong interpetation of the timout value.
since it is expecting to be in miliseconds and you set it to seconds.
Also, if you create a new ODBC data source with the MDAC 2.1 or later version of the Access ODBC Driver, the driver incorrectly uses a default value of 5 for PageTimeout. The correct default value should be 5000 with the MDAC 2.1 version of the driver.
See MSDN for The resolution:
[SNIP]
"
The recommended setting for PageTimeout with the MDAC 2.1 or later version of the Microsoft Access ODBC driver is 5000. To change this value, click Options in the ODBC data source and modify the PageTimeout value.
You can also add this to your ODBC connection string. For example, here is an ODBC connection string that uses a DSN as well as adds the PageTimeout setting:
"DSN=MyODBCDataSource;PageTimeout=5000;"
Here is an example ODBC connection string that uses a DSN-less connection as well as adds the PageTimeout setting:
"Driver=Microsoft Access Driver (*.mdb);PageTimeout=5000;DBQ=C:\MyFile.doc;"
[/SNIP]
Click here for article
Cheers
Alfadhly
/*
It is Illogical to define an inventor by his invention
*/
|
|
|
|
|
Thanks, this sorted the problem.
David Osborn
|
|
|
|
|
Hi all,
I've written a library and I would like to specify in the source code additionnal include and library path to avoid specify in the Project/Settings in each project I've made...
I know that we can specify libray to include to the linker in this way:
#pragma comment(lib,"test.lib")
...and that work correctly. I've seen on MSDN that we can set some linker options like this:
#pragma comment(linker, "LIBPATH :\lib")
...but it seems to do nothing and we can't specify additionnal include directories...
Thx in advance...
|
|
|
|
|
Just a guess: change d:\lib to d:\\lib.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|