|
Hi!
I've created a class derived from a CObject class.
I use the serialisation method like it is explained in MSDN.
When I call the Serialize method of my object, I get the folling message:
"Unexpected file format."
when I trie to open a file previously saved.
Does anyone can help me?
Here my code, where m_MyObject is a MMOject object member of my document class:
<br />
void CMyAppDoc::Serialize(CArchive& ar)<br />
{<br />
CDocument::Serialize (ar);<br />
m_MyObject.Serialize (ar);<br />
}<br />
<br />
.....<br />
<br />
void MMObjects::Serialize( CArchive& archive )<br />
{<br />
CObject::Serialize (archive);<br />
<br />
if (archive.IsStoring ())<br />
{<br />
archive << m_Rect;<br />
archive << m_Type;<br />
}<br />
else}<br />
{<br />
UINT Type;<br />
archive >> m_Rect;<br />
archive >> Type;<br />
m_Type=(TYPEOBJECTS) Type;<br />
}<br />
<br />
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
|
Did you put the correct schema level in?
My neighbours think I am crazy - but they don't know that I have a trampoline. All they see my head bobbing up and down over the fence every five seconds
|
|
|
|
|
can any one tell me a way, how to send message from a multithreaded server to one of the connected clients.
|
|
|
|
|
Hello
I have outlook exp not outlook.
Can someone who has Outlook run regedit and tell me if you can find the following keys?
HKEY_CURRENT_USER\Identities\{xxxxxx-xxxx-xGUIDxxxx-xxxxx-xxxxxxxxxx}\Software\Microsoft\Outlook\Version
1. Dial During Poll
HKEY_CURRENT_USER\Identities\{xxxxxx-xxxx-xGUIDxxxx-xxxxx-xxxxxxxxxx}\Software\Microsoft\Outlook\Version\Mail
2. Poll For Mail
If not could you tell me what they do look like?
Also if anyone has older version of either outlook or outlook exp could you please tell me what they look like?
I am trying to avoid buying a copy of Outlook but need the REG info for a project.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
I use Outlook but have neither of the keys mentioned.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi all,
My application writes some per user preference in their local settings(/documents and settings/usrname) and their HKCU\software\myapp key. I want to remove all of it during uninstall, any one has idea how to do it (using coding to automatically load hive other user, and remove the key, etc).
B'coz, right now the uninstaller only remove one user, the one that uninstalled my application and has admin rights.
Thanks.
|
|
|
|
|
One solution is to search the entire registry.
Kuphryn
|
|
|
|
|
I'm sure you're trying to be really tidy, but I don't think there's any easy way to do this. You'd probably need to CreateProcessAsUser to run a separate process under their credentials. That process would have to LoadUserProfile in order to ensure that the right user's registry hive was loaded.
I can't find any APIs that will allow you to find the set of user profiles on the local computer. You won't want to modify roaming profiles in case your application is installed elsewhere on the network (probably!)
|
|
|
|
|
Once upon a time, distributing an Access database project required a special license for the redistributable bits, or the client had to buy Access and install it. I assume that was the Jet dbEngine. When creating a VC++ app that uses a .mdb file created in Access as its datasource, is this still necessary? Or does the driver selected when creating the project contain all the necessary stuff to talk to the database file?
I know I can do this better by developing on SQL Server and distributing MSDE, but this is a tiny db and it's much easier to bang out the skeleton in Access.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Roger Wright wrote:
Once upon a time, distributing an Access database project required a special license for the redistributable bits, or the client had to buy Access and install it.
There is a runtime version of Access included with MS Office 200 Developer. You can dist. the mdb and runtime version of Access to as many workstations as you want.
Roger Wright wrote:
When creating a VC++ app that uses a .mdb file created in Access as its datasource, is this still necessary?
No, a license is not required to distribute the mdb, Jet engine, or MDAC.
If you are using InstallShield to build your installation, (from memory) I think you can select the Jet engine merge module to be installed. However, I recommend distributing, and using, MDAC to connect your database with the application.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Roger Stewart wrote:
I recommend distributing, and using, MDAC to connect your database with the application.
That's what I was looking to find. Thanks! I've never in the past 12 years made enough money to afford Office Developer edition, so that route was beyond reach. MDAC is the way to go...
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
I believe whatever front end you come up with via VC++ will be better than using the MS Access database project w/Access runtime
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Definitely! Access' only value is as a quick and dirty tool for making a database file for simple projects. But, since I have it installed, there's no way for me to tell whether my program works on its own, or is drawing from something installed with the Access program. MDAC solves that nicely, and as you mentioned, I can distribute that.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
As you're using the Standard Template Library.
|
|
|
|
|
Hi all;)
I would like to know how can I make my listbox scroll down automatically when its items is page-full. I think GetScrollInfo, ScrollWindowEx is probably what I need. However, I don't know how to put them together to make an atuo-scroll listbox possible. Can anyone please give me some hints?
regards,
UWO
|
|
|
|
|
call this function when ever you add a list item
listObject.SendMessage(WM_VSCROLL, SB_LINEDOWN, 0);
|
|
|
|
|
Thanks for your quick answer! You are really helpful
regards,
UWO
|
|
|
|
|
If you are using MFC and your listbox is derived from CListCtl:
m_MyList.EnsureVisible( m_MyList.GetItemCount()-1, FALSE );
If using WIN32 inlude windowsx.h and use the following macros:
#include <windowsx.h>
...
ListBox_SetCurSel(hwndCtl, ListBox_GetCount(hwndCtl))
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Your solution just work perfect for me, Thanks!;)
regards,
UWO
|
|
|
|
|
Does UWO stand for University of Western Ontario?
My neighbours think I am crazy - but they don't know that I have a trampoline. All they see my head bobbing up and down over the fence every five seconds
|
|
|
|
|
no..It's my nickname only.
regards,
UWO
|
|
|
|
|
|
|
How to find item or string in ListCtrl
I am using finditem but it is searching in first column only.
|
|
|
|
|