|
George_George wrote: But why in my following sample, pi can be binded to a and later binded to b without any issues?
It is not. The line
pi = b;
does not bind pi to b , but assignes a new value to a
|
|
|
|
|
You are correct, Nemanja!
regards,
George
|
|
|
|
|
Hi, I just want to know if it's possible to access a vector object by it's unique id.
In vector objects don't have id's you can just access them by their locations!
for example:
std::vector<myobject> objs;
objs.at(1).my_property = 'qwerty';
here 1 is the location of the object in that vector and it's not unique..
it can change if you delete or add a object on top of this object.
but i want to give them a unique id and access them by that.
Any suggestions?
|
|
|
|
|
you must use a std::map instead if you want to identify a record with a unique key.
|
|
|
|
|
Hi all,
i m using *.chm as a help file of application.i m open this through menu of application.
In help file diffrent categories like Contents,Index,Search,Favorite etc.
i want if i click on contents menu than help file open with Contents category,same for others.
so please tell me how can i do this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi all,
i am trying to use a vista icon in my vc2005 application, by vista i mean that it changes it size according to its view. Now when i import that icon in my application and compile that application it gives error
error RC2176 : old DIB in G:\all__size_ico\Custom Software Box CD.ico; pass it through SDKPAINT
..
How to resolve this error???
Can anybody help me in this...
thanks in advance
|
|
|
|
|
|
Hello everyone,
Mentioned here,
--------------------
http://www.codeproject.com/KB/COM/CCOMThread2.aspx
However, one down side to this feature is that it does not support the marshaling of proxies. This is a disappointment because table marshaling of proxies is most useful in many situations especially in distributed applications.
To cater to this specific requirement, Windows NT 4.0 Service Pack 3 introduced the Global Interface Table (GIT).
--------------------
Really confused about reading it. Does it mean in current Windows version, GIT has supported the marshalling of pointer to proxies, but in early version of Windows, it is not supported?
thanks in advance,
George
|
|
|
|
|
Hello everyone,
When using GIT to perform inter-apartment marshalling, what is the guideline whether need to call Release method of GIT?
Currently, I just call Release in the methods,
- which register interface to be marshalled into GIT;
- which retrieves unmarshalled interface from GIT.
Not sure whether there are more accurate practices when we should call Relase.
thanks in advance,
George
|
|
|
|
|
Hi all,
i m using a dialogbox witout close button.i want this dialog box is auto close after some time.
so please tell me how can i do this?
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Add a timer using SetTimer() function and when the timer triggers, call EndDialog() .
|
|
|
|
|
thanks
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
what you want is called a SplashScreen.
|
|
|
|
|
"_$h@nky_" wrote: so please tell me how can i do this?
By reading here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi Friends,
Could any one tell me how to add VBScript in MFC Applications.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
|
Hi all,
i m using this for TVN_ITEMEXPANDING,here its working fine when i exand or collapse tree item by keyboard.
But when i exand or collapse tree item by mouce click than it is change image of previously selected item.
please tell me where i m wrong.
void CTree::OnTvnItemexpanding(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
NMTREEVIEW* pnmtv = (NMTREEVIEW*) pNMHDR;
CTreeCtrl& tc = GetTreeCtrl();
HTREEITEM item = tc.GetSelectedItem();
if ( pnmtv->action == TVE_EXPAND )
{
tc.SetItemImage(item,1,1);
}
else if ( pnmtv->action == TVE_COLLAPSE )
{
tc.SetItemImage(item,0,0);
}
*pResult = 0;
}
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
"_$h@nky_" wrote: HTREEITEM item = tc.GetSelectedItem();
Because you are setting the image of selected item. Use pnmtv->itemNew.hItem
HTREEITEM item = pnmtv->itemNew.hItem;
|
|
|
|
|
Thanks
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi,
Under XP I store values under 'HKLM/Software/MyCompany/Product/%Version%/
In order to make things work under vista,
Totally ignoring the MS Access Policy (which is switched off as far as Possible), and assuming that EVERY User is logged in as Administrator, and also assuming that the computer will only ever have one user, and that the Language locale is English(US)
What is equivalent Reg Location to store values.
Please NOT a CSIDL, just a FIXED path.
Regards,
Bram van Kampen
|
|
|
|
|
If there's only one user then using the current user key (HKCU) would work fine.
It doesn't matter if the user is logged in as an admin...
the code that modifies HKLM entries needs to run with elevated privileges.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
Sounds Good!
Does that mean that if I macro Across the board HKLM to HKCU under the stated constraints that all will install and work well under both vista and xp. All works well Now under XP, using HKLM. I'm not using COM, or anything sophisticated, all I'm storing is a few Path Names, and a few environment strings.
BTW Is it still possible under Vista to run a '.REG' file modifying HKLM,or, can HKLM be changed by regedit.
thanks + regards
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: if I macro Across the board HKLM to HKCU under the stated constraints that all will install and work well under both vista and xp
It should work given your previous constraints, yes.
It's not a good design though. For proper app data/settings
management, you may want to check this out:
Data and Settings Management[^]
Bram van Kampen wrote: BTW Is it still possible under Vista to run a '.REG' file modifying HKLM,or, can HKLM be changed by regedit.
I imagine it's possible but it's still going to require
elevated privileges.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: It should work given your previous constraints, yes.
It's not a good design though. For proper app data/settings
management, you may want to check this out:
Data and Settings Management[^]
Thanks Mark,
I've read this document, but I don't think it is helpful for my needs, for the following reasons:-
My App is essentially a Store Cash Register Application.
I typically have a Local network of three of four machines (max 16).
This is referred to as the 'Shop System'.
One of these contains a single set of some 20 files in proprietary formats, which act as a Database. The machine containing this Database is loosely known as the Server. It is purely Passive though, Reading and Writing is implemented through File Sharing. This database is created during My Apps System Setup. Each Shop System can have One and Only One such Database. Having two, when detected will immediately trigger an attempt to close down all the terminals, as multiple DB's would be a Licence contravention and constitute a massive Security Risk.(Setup does not allow it to happen, so,if another DB is found, Someone or Somethingis messing with files) In the normal course of events, the Database should Not be moved or Replicated. (leaving out Backups as a Separate Issue)
The document gives imho no guidance on where to place such kind of database. I Place it under
"//Server\Program Files\Manufacturer\Product\Version\Data\"
The Users Modules have no Open-Close-Save facilities. The User modules access the central database as needed. This is hardcoded into the Software. (After you finish a transaction in your Supermarket, the Cash Operator is NOT given the choice to store the transaction to the Store's database, or, maybe on a Floppy for him/her to take home, along with the cash you paid).
The Software however needs to know where the Central Database is Located. Once the Database is installed, that location is Fixed, and Independent of which User is logged On. It has essentially become a Hardware Feature. Imho, the logical place on each machine to store the URL for such Database is in HKLM\Software. If a module at any stage cannot locate the Database, it bows out gracefully. Only One module of each type can be active on a machine at anyone time, and No Module can run 'Stand Alone', i.e. without sight of and access to the Database.
The Software needs at all times Full Read/Write Access to the Database Files. This was never a problem under Win98. We accomplish this under XP by configuring All machines to Fire Up in Admin mode (Leave the Admin PW Blank when Installing XP). Access Control is handled by the Modules, and the MS Security Architecture is irrelevant as far as my apps are concerned. The Terminals are NEVER used for anything else but this Software. It runs on a Custom Installed Bare XP, with all un-used features removed. It is essentially a Cash Register.640 x 480 16 colour 18 inch monitor, etc.
The Original inception worked well under WIN98, although it struggled with T-Windows under DOS 6. I was not waiting with baited breath for Vista or even 2000 to come along to get a zipping performance. Rather, Vista is being foisted upon me, at a most unwelcome time.
So, the question is: What would be good design under this Circumstance.
Bram van Kampen
|
|
|
|
|
Hello,
I am tying to alter the icon, on the top left of the program,
using the followong statements:
HICON hIcon = AfxGetApp()->LoadIcon(IDI_ICON1);
SetIcon(hIcon, TRUE);
***to that effect***
When I run the program
I get a Debug assertion failed, regarding File: afxwin2.inl
I have tried various place's in placing the code, but to no success.
I have read in a artical that after loading you must pass it to the
windows manager, is this the problem? can anybody help?
Thanks
Simon
|
|
|
|
|