|
I didn't realize that the code left off the <double>
The function looked more like
RFMAccess::parseData(vector<double> v)
does this look corret?
steven
|
|
|
|
|
I got my hands on a Xerox copy of some notes, which says that AfxWinTerm() is called *after* ExitInstance() in an MFC application.
MSDN doesn't even have an entry for AfxWinTerm() . MSDN search and Google weren't very helpful.
I'm beginning to suspect these notes I have are very old and refer to outdated content. Am I right?
Vikram.
-----------------------------
KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames.
pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.
|
|
|
|
|
Was just poking around CP and found this article..
http://www.codeproject.com/cpp/mfcprogflow.asp
Quote from the article..
Once WM_QUIT is received Run returns and control returns to AfxWinMain which performs clean-up and lastly calls AfxWinTerm which deletes all the global application structures that were created.
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I wanted to know how Could i Send email in an Visual C++ App. Is there any API to do that ?
|
|
|
|
|
Several. Look at:
CDocument::OnFileSendMail()
(Extended) MAPI
SMTP
CDO
|
|
|
|
|
|
|
Hi All,
I would like to iterate through every item in a list control and change each item's icon based on a time criteria. I have tried GetItem() but I haven't been able to use it correctly (the documentation is very vague) as I only get an empty structure back even though I put the index I am after in iItem. Could someone please help me out here?
Cheers,
Clint
|
|
|
|
|
Before calling GetItem(), you need to set the mask member of your structure with the flags (or'ed together) for the element values that you want to retrieve.
struct LVITEM sItem;
sItem.mask = LVIF_IMAGE | LVIF_PARAM | ... whatever else you want...
m_oMyListCtrl.GetItem(&sItem);
onwards and upwards...
|
|
|
|
|
Guys,
How can I get text info into the systray? Something like the clock. All the examples I see are to put icons there but I need to put a small amount of text there (and it would be great if I could change the color of it too - maybe even make it scroll.)
Thanks!
|
|
|
|
|
There's no support for this in the API. If your text can fit on a 16x16 icon, then you can create an icon dynamically with the text on it. Otherwise, you'll have to be extremely creative, possibly finding the system tray window, and creating a child window inside it. It's not that simple either. You might even have to subclass the taskbar so that you can stop the taskbar's default tray positioning, which means writing a DLL and using either SHLoadInProc() or a system-wide hook to get into explorer's address space...
If you manage it, write an article . You might want to find another way of showing the information though. It's probably not worth the effort of reprogramming Windows.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi all,
I have an an application that is a Popup Dialog box in a dll. I'm using MFC 6.0.
my problem is I'm trying to load a menu bar icon on the sucker, and I just can't get it to load. I thought I do this:
SetIcon(::LoadIcon(NULL,MAKEINTRESOURCE(IDR_MAINFRAME)),FALSE);
in the OnCreate Overrideable in my CDialog-derived class. Doesn't work though. It always returns 0x000000 for the HICON.
any suggestions on how to do this? I'm sure I'm just putting it in the wrong place or performing the operation wrong.
Any insight, comments or suggestions are greatly appreciated.
Thanks!
|
|
|
|
|
in debug(watch) window enter the following
"@err, hr"
What is the value of that expression after the line above is executed?
|
|
|
|
|
As it turns out,
when using the LoadIcon you must get the HINSTANCE of the dialog in the dll, not the application HINSTANCE. That fixed my problem.
thanks for the help though!
|
|
|
|
|
Hey my name is Renaud and I have a serious DirectX related problem… any help??
I build this full screen menu with directX...This Directx menu can cycle through various DirectX games and launch each one. When the user selects the game he wants to play the menu application clears out all the surfaces and then launches the new direct x game and then closes the menu app.
The problem is the same game cannot be played twice thought the menu without getting a DirectDraw error ... I believe the error is created while the game is trying to SetCooperativeLevel... so you can launch the game through the menu the first time, but the second time it crashes...weird eh?
I am completely clueless on how to fix this.
well anyway any feedback would be greatly appreciated!!
Thanks
Renaud Richard
|
|
|
|
|
What version of the DirectX interfaces are you using? Since you mention DirectDraw, I'm guessing DX7.
What is the HRESULT return code from the call to SetCooperativeLevel() , and what flags are you passing to the dwFlags parameter?
- Mike
|
|
|
|
|
Hello,
I need to enable/disable secondary monitor from my program.
I found out how to get information about monitors, but nothing about how I can automatically extend desktop to the monitor or undo such action.
I need to enable/disable my secnodary monitor time to time, and I could not find a FREE program which would do it for me, so I want to write my own.
Thanks.
Regards, Alexander.
|
|
|
|
|
I think I've done this with the ChangeDisplaySettingsEx API call some time ago.
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
It looks like it is possible to do so with this function, I still hope to find plug-and-call solution, so I would not have to read help. Maybe someone has an example?
Thanks.
|
|
|
|
|
Hi,
If I have in my *.h:
double** m_GLdouble;
and in my *.cpp:
m_GLdouble = new double*[m_Size * 12];
when it's time to delete, do I have to do?
for(int i = 0 ; i < m_Size * 12 ; i++)
{
delete m_GLdouble[i];
}
delete m_GLdouble;
->or<-
delete [] m_GLdouble;
m_GLdouble = NULL;
Also is there a way to return a pointer such a way that the receiving function cannot modifie the returned object? Something like:
Object* myClass::myReadFunction()
{
return m_Object;
}
void otherClass::otherfunction()
{
Object* pObj;
pObj = m_myClassObj->myReadFunction();
//Is there a way to make pObj impossible to modify?
}
hope you understand
Thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
The way have allocated memory to the pointers, I suppose that one delete statement should be sufficient.
Reg. your second question,
may be you can consider using
const Object obj;
obj=&m_myClassObj->myReadFunction();
Harsha
----------------------------------
http://www.ece.arizona.edu/~hpg
----------------------------------
|
|
|
|
|
For every new, you'll need a matching delete. So if your allocation looked like:
double **m_GLdouble;<br />
m_GLdouble = new double*[m_Size * 12];
the deallocation would be:
delete [] m_GLdouble;
But if you also had allocations for each of those pointers:
for (int x = 0; x < (m_Size * 12); x++)
{
m_GLdouble[x] = new double;
} you'd have to delete those before deleting m_GLdouble itself. The deallocation would be:
for (x = 0; x < (m_Size * 12); x++)
{
delete m_GLdouble[x];
}
delete [] m_GLdouble;
|
|
|
|
|
Hi guys
I'm converting some code from Watcom C to Visual C++ and the compiler tells
me this.
C:\AppDoc.cpp(508) : error C2664: 'qsort' : cannot convert parameter 4 from 'int (const short *,const short *)' to 'int (__cdecl *)(const void *,const void *)'
None of the functions with this name in scope match the target type
My declarations are
In AppDoc.h
int accept (const short int *a, const short int *b);
In AppDoc.cpp
qsort((void *)order,BLQ_EIGHT,sizeof(short int), accept);
int AppDoc::accept (const short int *a, const short int *b)
{
return (q[*b].accept-q8[*a].accept); //q is an struct
}
What I have to change to make this work?
Best Regards
Dr.Pi
|
|
|
|
|
Change the accept function to take void *s. Then, in the accept function, cast the void pointers to whatever you need them to be.
onwards and upwards...
|
|
|
|
|
Hi basementman
Thanks for your fast answer but now the error has changed
C:\AppDoc.cpp(508) : error C2664: 'qsort' : cannot convert parameter 4 from 'int (const void *,const void *)' to 'int (__cdecl *)(const void *,const void *)'
None of the functions with this name in scope match the target type
Do you know why it sais this?
Best Regards
Dr.Pi
|
|
|
|