|
1) create a font (see CFont)
2) pBtn->SetFont(&oNewFont);
|
|
|
|
|
Hi,
Is there a way to display swf's in my dialogs or views? Is there any article on this subject?
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
sure, find the activex flash control (you have to install it on your pc, it is usually installed when you install flash) it is quite simple to use
if you have flash (the auditing program) you can read about its functionality. i have done this last year and do not remember much but it was surprisingly easy to use
|
|
|
|
|
its too easy. Insert Shockwave Flash ActiveX control.Set its URL property, use its Play , Stop etc functions to do your job.
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
When I try:
#ifdef WIN32
#include "stdafx.h"
#endif
I get an error that no matchin #ifdef was found for #endif. What's wrong with this? How can I do something like:
#ifdef WIN32
#include "windows.h"
#endif
#ifdef UNIX
#include "unix.h"
#endif
etc.
|
|
|
|
|
What error did you get?
I got no error when I tried that in VC++ ver 6.0
What compiler are you using.
Regards,
Melwyn
|
|
|
|
|
.NET
Have I forgotten to mention it?
|
|
|
|
|
This is the way precompiled headers work. If your .cpp is set to use PCHs, then the compiler looks for the #include "stdafx.h" line and ignores everything that goes before this, hence the unbalanced #ifdef .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thanks, this makes sense now
but how to make a multiplatform program that uses precompiled headers in VS.NET?
is it impossible then? should I remove stdafx.h?
|
|
|
|
|
There was an article on DDJ a few months ago exactly about this. If I find it when I get home, I'll send you the exact month/year.
Kant wrote:
Actually she replied back to me "You shouldn't fix the bug. You should kill it"
|
|
|
|
|
ok, thanks if you send it to this email:
hr_hristov at hotmail.com
|
|
|
|
|
this is the exact error (sorry for my mistake before)it happens only with stdafx.h (precompiled header)
unexpected #endif
The #endif directive has no matching #if, #ifdef, or #ifndef directive. Be sure each #endif has a matching directive. The following sample generates C1020:
// C1020.cpp
// uncomment the below line to resolve the error
// #if 1
#endif // C1020
int main() {
}
|
|
|
|
|
Dear All,
I want to control the operations taking place on a folder in my application (for Windows 2000). I suppose it can be with help of ICopyHook.
Can somebody provide me some relevant code for this ?
Or any sample implementing ICopyHook.
Thanks in Advance.
Lalit
|
|
|
|
|
Hi all
How do you calculate the inverse of a 6x6 matrix (assuming it exists). I'm working on my final year project which requires me to do all sorts of matrix calculations...and I'm stuck at this one. I've tried searching in the numerical recipes book but couldn't find one. Thanks for your help
|
|
|
|
|
|
Easiest way (IMO) would be to transform it in a diagonal matrix. If A is your matrix, then look for the eigenvectors and stuff and get P and D (D is diagonal) so that A=(P)(D)(P-1) where (P-1) is the inverse of (P). Search and the web a way to diag your matrice, there are many algorithm to do it, provided that your original matrix can be inverted (but if it can be inverted, it can be made diagonal).
And then (A-1)=(P)(D-1)(P-1), and D-1 is very easy to find, just make 1/dii, dii being the coordinates on the diagonal.
~RaGE();
|
|
|
|
|
|
Hi guys
What I have to do to execute just once an application?
My problem is that I've tried the below code in the initinstace of the app but I have 2 problems
First is that the second time I start the app, the window of the app doesn't get the focus.
And another more complicated is that sometimes my app is crashing and when this happens it never can start again.
Why do you suggest me?
Best Regards
::CreateMutex(NULL,TRUE,m_pszExeName);
if (GetLastError()==ERROR_ALREADY_EXISTS)
{
CWnd *pPrevWnd = CWnd::GetDesktopWindow()->GetWindow(GW_CHILD);
while (pPrevWnd) {
if (::GetProp(pPrevWnd->GetSafeHwnd(),m_pszExeName)) {
if (pPrevWnd->IsIconic())
pPrevWnd->ShowWindow(SW_RESTORE);
pPrevWnd->SetForegroundWindow();
pPrevWnd->GetLastActivePopup()->SetForegroundWindow();
return FALSE;
}
pPrevWnd = pPrevWnd->GetWindow(GW_HWNDNEXT);
}
return FALSE;
}
|
|
|
|
|
|
Consult these two resources:
http://www.naughter.com/sinstance.html
http://www.flounder.com/nomultiples.htm
|
|
|
|
|
Thank you guys!!!!
That's perfect!!!!
Best Regards
Dr.Pi
|
|
|
|
|
I have an MFC application with an atl object. Now I want to know if a user started the application or if the application was started by the scum, so I can (amongst others) deside whether to show or hide the windows of the aplication. Anyone knows how to do this ?
|
|
|
|
|
Never mind, I already found what I was looking for: AfxOleGetUserCtrl().
|
|
|
|
|
I want to make a dialog box similar to the one windows has to do the login when you are configured to be in a domain.
I want to make a window with a Edit Box for the username, an onter Edit Box for the Password, and a Bombo Box with the available Domains: the Domain (to connect to a domain controller) and the ComputerName (to log on the local machine).
I have built the window (the UI) but I dont know how to get the available domains in windows NT.
Can anyone help me?
|
|
|
|
|
Does NetServerEnum() help?
|
|
|
|