|
Vaclav_Sal wrote: Please ignore the "->" is is correct in the code just not here!
Please use the code formatting tags on your message, and then we will be able to understand better what your code is trying to do.
|
|
|
|
|
I am using all the formatting options and do not understand why this is happening with my text. Besides it is not that important in this case to resolve this issue. It is not my syntax which is the problem.
Thanks anyway for replying. Appreciate that.
|
|
|
|
|
Hi,
I was making a tests and i need to change my computer date and time ...
After return it to the correct date my compiling allways compile all C++ programs ...
When I start a program directly without compiling i receive a message informating that is out of date ...
How can correct this ... ?
Tanks for help ...
|
|
|
|
|
Chances are you have one or more project files whose time are set to the future. Find out which ones they are and "touch" them or set their times to be the present and then one more build should have everything up to date.
|
|
|
|
|
MAPIResolveName() returns 0x80004005 when called under Windows 7. The same code is working on Vista and XP. The mail client doesn't seem to matter as I get the same error from both Outlook 2007 and Windows Live Mail. Anyone got any ideas what has changed in Windows 7?
|
|
|
|
|
Hi Steve,
Stephen Griffin[^] over at Microsoft has a tool called MFCMAPI [^]. You should probably check and see if his application exhibits the same behavior. If not check his source code[^] and see what hes doing differently.
Best Wishes,
-David Delaune
|
|
|
|
|
I'm pretty sure that's extended MAPI but I'll check just in case. Thanks for the suggestion.
|
|
|
|
|
I need auto-update software.
My tcp/ip program will be heavily accessed (many many clients).
I don't want client detects file info on website (download place), because the process is slow or causes domain suspended (shared server), and software update rarely happens.
I decide to do this:
Save newly software info in database, when user logs on, client obtains the info from database - it is very fast.
Then client compares the info with actual files installed on harddist to see if any differences - download if yes.
But it is too hard to make decision what kind file info I should save to database.
At this stage, I save file size in database then client compares file size with actual installed files on harddisk.
I quite suspect about myself: is it trusted for auto-update by comparing file size?
I may add file-modified-time as comparing info - not sure.
It is too hard to make decision about this.
I need your suggestion.
Thanks
|
|
|
|
|
includeh10 wrote: quite suspect about myself: is it trusted for auto-update by comparing file size?
I may add file-modified-time as comparing info - not sure.
I used version information on an application level (only update when newer version available), plus modification time on a per file basis (only replace binaries with a newer date). If you plan to update multiple files, make sure they will be replaced together (to avoid dependency issues).
Cheers, M
|
|
|
|
|
The file size may not work - what if new file size == old file size? The modified timestamp may not work if user copies files, etc. The version info is good, but only applies to exe and dll files.
Maybe you should include a "versions.dat" file with your software, that has the version numbers of all software components, including non-exe and non-dll files. Then you could compare version numbers in versions.dat with version numbers from your server. This will remove "guesswork".
You can make this as complicated as necessary - e.g., use encryption on versions.dat file, add crc, etc., to make sure user doesn't mess with it.
|
|
|
|
|
Thanks for both of you.
File version is not suitable in my case, because file lists are not fixed, some files may be added or removed in the future.
a dat file is possibly a good idea, but things will be more complicated, let me think around ...
|
|
|
|
|
hi everyone
when i login some web site after input username and password
i also need to input the image of authentication code
picture show below:
http://ptlogin2.qq.com/getimage?aid=15000102&0.6606817924136001[^]
now i want to get this images and show in picturecontrol
i don't know how to implement it ,
help me thank you
|
|
|
|
|
it's hard ?
or you not understand what i say ?
|
|
|
|
|
How can I be notified when the selection changes in a list ctrl with multiple selection? And if many items are selected, how can I know where the focused item is? That would correspond to the punctured rectangle (if that doesn't make sense try moving the selection with ctrl+up/ctrl+down, *not* up/down).
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Monday, September 28, 2009 11:18 AM
|
|
|
|
|
Have you looked at the LVN_ITEMCHANGED and LVN_ODSTATECHANGED notifications?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
What is the difference between LVN_ITEMCHANGED and LVN_ODSTATECHANGED? Also can you give me some help on using those functions?
void CMyDialog::OnOdstatechangedListFilenames(NMHDR* pNMHDR, LRESULT* pResult)
{
NMLVODSTATECHANGE* pStateChanged = (NMLVODSTATECHANGE*)pNMHDR;
*pResult = 0;
}
void CMyDialog::OnItemchangedListFilenames(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
*pResult = 0;
}
I have trouble figuring out how what those NM_LISTVIEW and NMLVODSTATECHANGE structures contain and how to glean from them whether an item has been selected/deselected.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: What is the difference between LVN_ITEMCHANGED and LVN_ODSTATECHANGED?
The former is sent when an item has changed. The latter is sent when the state of an item or range of items has changed.
sashoalm wrote:
I have trouble figuring out how what those NM_LISTVIEW and NMLVODSTATECHANGE structures contain and how to glean from them whether an item has been selected/deselected.
MSDN is your friend.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Are there MAKEQWORD() , HIDWORD() , and LODWORD() macros in VS2005? I can make my own easy enough, but I wanted to use any standard/official ones if they existed.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: Are there MAKEQWORD(), HIDWORD(), and LODWORD() macros in VS2005?
Not any that I know of.
So now you can create and publish it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I needed these recently myself. Searched through all files in VS distribution and couldn't find them.
Here is what I'm using:
#ifndef _QWORD_DEFINED
#define _QWORD_DEFINED
typedef __int64 QWORD, *LPQWORD;
#endif
#ifndef MAKEQWORD
#define MAKEQWORD(a, b) \
((QWORD)( ((QWORD) ((DWORD) (a))) << 32 | ((DWORD) (b))))
#define LODWORD(l) \
((DWORD)(l))
#define HIDWORD(l) \
((DWORD)(((QWORD)(l) >> 32) & 0xFFFFFFFF))
#endif
|
|
|
|
|
You can use the LARGE_INTEGER union and a little casting to accomplish everything those macros would do. There is also a ULARGE_INTEGER for unsigned use.
|
|
|
|
|
Hi,
I have following problem:
Suppose I have such class:
class NiceRectangle{
private:
Display dispHnd; //display handle
void DisplayRectangle(); // displays rectangle on screen
public:
unsigned int width; // dimensions
unsigned int height;
COLOR color; // interior color
unsigned int GetArea(); // return area
};
Is to it possible to perform some operations when I assign value to the width or height member.
Let`s say I write:
NiceRectangle nRect;
nRect.width = 100;
And when I assign 100 to nRect.width I want to perform instructions:
width = 100;
ShowDisplay(dispHand);
DrawFrame(width, height, Black);
...
and with
nect.height = 9;
I want to play a sound, open the fridge and finally assign 9 to height.
Another words, I want assigment operator = to act like function, but I want to be able to use it for any public member(variable).
I know it is possible to overload operator for a class, but I don`t want to overload an operator for a whole class, but only for its particular member.
I`ve heard about MFC which, I believe, performs similar tasks, but I want a more general solution, for example for linux.
Can this be done? How?
Thank You
|
|
|
|
|
In general, it is not good practice to make the members of your class public. In your specific case, it makes even more sense to make them private and provide getter and setter functions. In the setter function, you can them simply put any code you would like:
void NiceRectangle::SetWidth(unsigned newWidth)
{
width = newWidth;
}
On the other hand, I doubt that you would be able to open your fridge, I see some technical limitations here
|
|
|
|
|
It is a solution, but it os not very convenient.
I prefer the way it works in DELPHI. You change value of a property and change is instantly displayed.
|
|
|
|
|
Acutura wrote: It is a solution, but it os not very convenient.
Why ? This is how it should be done in C++.
Acutura wrote: You change value of a property and change is instantly displayed.
You have to make a separation between your "model" and your "view". In this case, it is much better to leave anything of refreshing or drawing out of your setter. Instead, you should refresh your "view" (which will probably in turn ask the figure to redraw itself).
I guess you are making a kind of drawing application in which you can draw rectangles ?
|
|
|
|