|
for w2k and win XP don't forget the IO Completion Ports for network connections, they rule...
[]D [] []D []
|
|
|
|
|
Yeeah, forgot that... and I agree they rock
|
|
|
|
|
From the C++ coder 's point of view, i think the NT family is the best because it has more useful technologies then the previous and also is more stable while programming.
From any other point of view, you could have had infinite superior chances to be answerd if you would have post it in the Lounge
rechi
|
|
|
|
|
Hello,
in MDI project,to open a new document (like File->New), i do this :
AfxGetApp()->OnCmdMsg(ID_FILE_NEW, 0, NULL, NULL);
Is it possible to open new document with specific height and width ?
Thx in advance
|
|
|
|
|
I create a zip file and do not want winzip to open it. that is say I have a.zip now I only want my app to be able to open this file and not winzip. Once my app takes control then winzip can be used internally to extract the file contents. Any idea?
|
|
|
|
|
Add your own header onto the start, confusing winzip. Then when your app opens it, strip the header off, and get winzip to unzip the original zip. Messy and ineffecient yes, but easy.
|
|
|
|
|
How do you "get winzip unzip the original zip"? Does winzip support command line parameters or is there anyway to make winzip work for my own application? Thanks.
|
|
|
|
|
Winzip does support command line parameters, it is a add-on. You can download it from their web site.
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
If you want custom stuff you can use the PKWARE Data Compression Library. I have use them before to compress very large amounts of data. They allow you to create your own file formats and use PKZIP quality compression.
http://www.pkware.com/products/developers/dcl/
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
Hi,
I'm creating a program that does the following:
- create an Access database using CDaoDatabase
- create in this db a table with a number of fields, for which I use CDaoTableDef
So far, no problem.
But now I need to insert data into de table, and I cna't figure out how.
Could anybody show me some code to do this?
Thanks
n
|
|
|
|
|
move to place u want to add new data
//i can't remember exact name of each function
1. call New() (?)
2. Add(),Add(),..., add whole row
3. call Update()
New() locks ur table
Update() ends the action and put data into table
if edit then step 1 is Edit()
by the way, VB is wanderful for database, and easy to learn, C++ is too complex for database.
includeh10
|
|
|
|
|
Excuse me,
your New() function is a member of which DAO class? where can I find it?
Thanks
|
|
|
|
|
i can't remember exact name of each function as i said, but u definitely can find similar function.
if u can't, i will find for u tommorow.
it should belong to Table or RecordSed class.
includeh10
|
|
|
|
|
I finally solved it wil CDaoTableDef!
Thanks
|
|
|
|
|
I have a static instance of a class that basically handles memory allocation for a certain module. This way when the application quits this destructor will handle freeing memory for the whole module. An alternative would be to call an 'exit' type function in this module to do a similar thing.
As this is a static object, the constructor and destructor get called before and after calling 'main()'. However in the main() function just before we return, we call our own CheckMemory function that checks all allocated memory has been freed (we also have out own new & delete functions for this). As the memory in my module is not freed until the destructor we get a few warnings.
Any ideas as to how to fix this?
I am considering putting the CheckMemory() into it's own class and call the check in the destructor but how can we guarantee when each destructor will be called?
Is there a Visual C++ 'work around' for this problem?
Thanks
Kris
|
|
|
|
|
C++ does not guarentee any particular order of static initialization across compilation units (different .cpp s in plain English). But there's a nifty trick to ensure that a given static constructor is executed the first in your program, and hence its destructor is called the very last:
class memory_checker
{
memory_checker();
~memory_checker()
{
CheckMemory();
}
public:
static void launch()
{
static memory_checker mc;
}
};
struct memory_checker_laucher
{
memory_checker_laucher()
{
memory_check::launch();
}
};
static memory_checker_launcher mcl__; Now, if you #include "memorycheck.h" at the beginning of every .cpp of your program, you will get CheckMemory to be called when everybody else has left the party.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi everybody,
Perhaps a simple question but, i would like to suggest it o you:
In my application, i have an "access violation" message which appear to this following line:
*(pHistoDBNorm+ j- *(pInflex+i)- *pInflex), when i=0 and j=16, just with this indications, you will tell me to check if th e allocation is well done, but the problem is if i remove *(pInflex+i)- *pInflex (which is equal to 0), in the debug window, the following
*(pHistoDBNorm+ j) is evaluated correctly whereas
*(pHistoDBNorm+ j- *(pInflex+i)- *pInflex), always in the debug window couldn't be evaluated (instead of reading a value which would have to be the same than *(pHistoDBNorm+ j), i could read something like that:"expression couldn't be read..."
why??????
thanks in advance
gerald
|
|
|
|
|
All clues suggest that pInflex is invalid. Maybe you have freed it before time?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i'm not sure because i have tested at the same time and both *pInflex and *(pInflex+i) have a correct value (equal to 0). i have seen it in the debug window!
|
|
|
|
|
Wait! There's a typo in your expression, instead of
*(pHistoDBNorm+ j- *(pInflex+i)- *pInflex) it should be
*(pHistoDBNorm+ j- <font color=#ff0000>(</font>*(pInflex+i)- *pInflex<font color=#ff0000>)</font>)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
you're right, sorry for this stupid mistake and thanks for your help
|
|
|
|
|
Sorry just a little mistake in my answer: "both *pInflex and *(pInflex+i) have a correct value (equal to 15)", not really important i know, but..!
|
|
|
|
|
Hi Folks I'm pretty new to this ao any help would be very much appreciated. I'm building a Dialog based application which carries out some maths on the user input.
Would anyone be able to give me a simple example of how to drag an Icon within a defined rectangle in a Dialog based application? I need to be able to monitor the x,y position of the Icon. I think I need to use WM_LBUTTONDOWN and WM_LBUTTONUP messages but I'm not sure of the easiest way to do it.
I'm using Windows 98 and Visual C++ 6
Thanks in advance
Damien
|
|
|
|
|
hi..
how to use WM_MOUSEHOVER,I have not seen more example about this message.
I am using Win32api,not mfc.
I want to get button's text when mouse cursor on button.not push or select.
please help!!!
|
|
|
|
|
I think you can make WM_MOUSEMOVE Work. and jast say GetWindowFromPoint().check for the class name of button..and then GetwindowText..what do you say?
|
|
|
|