|
I found an article on codeguru that solved my problem. Thanks.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
is there a way to deselect an item from a list.
i have tried
m_drvlist.SetItemState(iItem, LVIS_DROPHILITED,LVIS_DROPHILITED);
but it does not seem to do anything.
thank you.
|
|
|
|
|
found my problem
m_drvlist.SetItemState(iItem,0,LVIS_SELECTED);
|
|
|
|
|
Anyone seen an OO command line parser for regular C++/ATL/WTL?
Figured I'd ask before I write my own.
Todd Smith
CPUA 0x007 ... shaken not stirred
|
|
|
|
|
Check out the one from Sells Brothers.
Tools
Look for command line parser.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
look in the C++/MFC section under "parsers", there's like 5 of them in there. (including my own STL-based parser)
-c
All programmers are playwrights, and all computers are poor actors.
Smaller Animals Software, Inc.
|
|
|
|
|
CCmdLine works great. I tried the Sells Brothers parser first but found it to be a little bit over-engineered for my purposes.
thanks all
Todd Smith
CPUA 0x007 ... shaken not stirred
|
|
|
|
|
Hello programmers, i want to make my application start everytime my computer is turned on. Does anybody have the knowledge of doing this ??????? THANK YOU ALL IN ADVANCE !!!!!!!!! HAPPY PROGRAMMING
the smelly man ? lol
|
|
|
|
|
this has nothing to do with programming..
if you look at the help system for windows it tells you how to make things run at startup.. just put a shortcut in start/programs/startup.. and if you are talking about something you have coded that you want to run at startup then you would have your installer do this for you.
btw.. nice topic
-dz
|
|
|
|
|
Mr I DONT NO wrote:
THANK YOU ALL IN ADVANCE !!!!!!!!! HAPPY PROGRAMMING
YOU COULD WRITE IT AS A SERVICE
Oops. Dunno how that happened. I turned the caps lock on and all the letters went big
Nish
Make MSDN universal, FREE!
|
|
|
|
|
Nish [BusterBoy] wrote:
Dunno how that happened
And you think I'll believe you?
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
You can also put a registry entry under Run, I always forget where that is, I search for RunOnce and it's just above.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Christian Graus wrote:
You can also put a registry entry under Run, I always forget where that is, I search for RunOnce and it's just above.
It's in two places:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
and
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
with the obvious difference between the two.
Sometimes i only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
I just add an internet explorer object to the project, add a test method and propertie, and compile. When I open the html test file, close it, and try to recompile the source, this menssage apper:
Compiling...
TesteCtl.cpp
Linking...
LINK : LNK6004: Debug/Teste.dll not found or not built by the last incremental link; performing full link
LINK : fatal error LNK1104: cannot open file "Debug/Teste.dll"
Error executing link.exe.
Teste.dll - 1 error(s), 0 warning(s)
And, when I can't delete the file from windows explorer.
Any one know how to solve this?
Thanks
|
|
|
|
|
Reboot the machine, delete Debug/teste.dll (hopefully you'll be able now) and perform a "Build all". Good luck!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Your app is not releasing the dll when it is finished.
Check this out in MSDN
BOOL FreeLibrary(
HMODULE hModule // handle to DLL module
);
|
|
|
|
|
Your shell is set to run all Explorer/IE windows in the same process, so after the IE windows closes, the process is still running and the DLL is still in use. You need to change that setting so each window is a separate process. Check out my shell extension article part 1 in the shell section where I describe what to do.
BTW in the meantime, you can open a DOS box, CD to the dir and rename the DLL to some other name. Then you'll be able to rebuild it.
--Mike--
"Jobs that don't allow you to visit the Lounge 25 times a day at the minimum are not worth having anyway."
-- Nish, 3/28/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
I've been looking into how to handle updates to my files that may happen in the future.. i see that if i use:
IMPLEMENT_SERIAL(CMyObject, CObject, VERSIONABLE_SCHEMA|1)
then i can do an if statement based on ar.GetObjectSchema() when i do my loading.. which looks like is just what i need.. my own serializable class i have written (based off CObject) has this 'IMPLEMENT_SERIAL' command in it, however my built in Document class does not have this command anywhere..
how do i set the version of the document if there is no 'IMPLEMENT_SERIAL' command? I have all the serialization done, and it has been working fine, but I don't know if it is safe for me to put the IMPLEMENT_SERIAL command in there, or if this is somehow derived from CDocument?
thanks in advance!
-dz
|
|
|
|
|
Any advice? i could write my own serializable object, but im using the document with the views i have.. if i call the ar.GetObjectSchema() from the serialize function of the CDocument i always get '-1', which means its an unknown version, any help, plz?
-dz
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
dazinth,
I just had a similar problem. When you use CArray<cmyobj, cmyobj&=""> then you need to override SerializeElements (see MSDN). My solution was to store and load the version right before the elements were serialized and then set the object schema member variable as each element was serialized. Hope this helps.
Ted
//////////////////////////////////////////////////////////////////////
// Serialize the FEVface
// necessary because CArray does not provide this function itself
//////////////////////////////////////////////////////////////////////
template <> void AFXAPI SerializeElements <cmyobj> ( CArchive& ar, CMYobj* pNew, int nCount )
{
UINT version;
if (ar.IsLoading() == TRUE) {
ar >> version;
}
else {
ar << CONST_CURVERSION;
}
for ( int i = 0; i < nCount; i++, pNew++ ) {
ar.m_nObjectSchema = version;
pNew->Serialize( ar );
}
}
|
|
|
|
|
Change the Serialize function in your data class as follows
void CMyData::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar.WriteClass(RUNTIME_CLASS (CMyData));
ar << m_szName;
ar << m_szAddress;
}
else
{
try
{
ar.ReadClass(RUNTIME_CLASS (CMyData));
}
catch(CArchiveException *e)
{
AfxMessageBox("invalid file");
e->Delete();
return;
}
ar >> m_szName;
ar >> m_szAddress;
}
}
This will save the schema number properly.
|
|
|
|
|
Are there any office XP menu classes that actually do everything? so far i havent seen any that do the shadow behind the menus. This is what impresses me more than the blue toolbar etc...
I'm not late, I'm just not as early as I could have been.
MSN Messenger address: jonathann4@hotmail.com feel free to chat!
|
|
|
|
|
For the ahadows check this http://www.codeproject.com/menu/shadowmenu.asp, tha flat look, well i'm working on that, but is really hard for me
|
|
|
|
|
Some hints
- See the Fakemenu sample in an older PSDK dsitribution (emulates a menu, capturing mouse)
- In WTL, see http://viksoe.dk, for a flat (no shadows, but flat ) sample.
- Generic
Set a Hook, once again, the WTL files show you how to set the hook and the magic number to detect the menu window (somewhere in CCommandBarCtrlImpl<t,...> , don't remember where)
Regards,
R.
|
|
|
|