|
Are you calling SetIcon() in the sheet's OnInitDialog() method?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi all vc++ programmers,
I am getting the following fatal error when i am compiling my project..Can anybody suggest me to unresolve the error.....
Thanks in advance.....
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>Generating Code...
11>Compiling...
11>DBLOOKUP.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>DBLIBEXT.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>DBINTFC.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>DAILYTIP.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>CSDWIZ.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>CLNTCOMM.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>CheckFace.cpp
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>CHANGES.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>CDDTreeCtrl.cpp
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>BTNMENU.CPP
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>BorrowingFormDlg.cpp
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>BorrowingForm.cpp
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>BillingNotesDlg.cpp
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>AllocateDlg.cpp
11>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
11>ABOUT.CPP
11>c:\program files\microsoft visual studio 8
|
|
|
|
|
It's so simple! Just use the /MD switch for _AFXDLL builds
|
|
|
|
|
If you want to convert your project from dynamically linked MFC .dlls to statically linked MSC, you need to do following:
1. Open .vcproj file in Notepad
2. Locate and delete all _AFXDLL directives. from some odd reason VC doesn't do it when you change MFC linking type.
3. Save your changes, restart Visual Studio.
As result all these errors will be gone
|
|
|
|
|
|
Actually it is possible to run a our thread in a another process using CreateRemoteThread, that is something which is related to code injection. And if we consider about processes run without shown in the Task Manger is actually done with the help of a technique called API Hooking(API Hooking (LoadLibrary)[^]).
In task Manager every process is updated shown using PSAPI, if we hook those API, it will possible to change the behaviour of task manager, even you can do that using API hooking technique.
Величие не Бога может быть недооценена.
modified on Thursday, August 27, 2009 3:10 AM
|
|
|
|
|
I really thank you for your answer; you're probably a good virus writer
But I actually meant to know if there's anyway to write a DLL or something and force windows explorer to load and run it when OS starts. I guess it should be involved with registry some how.
|
|
|
|
|
I hardly wrote any virus program , but yes wrote few antivirus patches.
Just add your program path to the below key.
Which enable your program to start at StartUp of Windows login.
HKLM\Software\Microsoft\Windows\CurrentVersion\Run.
Величие не Бога может быть недооценена.
|
|
|
|
|
Jusef Marzbany wrote: But I actually meant to know if there's anyway to write a DLL or something and force windows explorer to load and run it when OS starts.
With a DLL, not directly. You'd need to use Rundll32.exe to get it going. If you already had an EXE, then yes. In either case, the registry would be involved.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
How can i connect to a DB2 database from the VC++ code.
|
|
|
|
|
|
Does DB2 support ODBC?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
I'm trying to call
CRegKey regKey;
dwError = regKey.Create(HKEY_LOCAL_MACHINE, _T("...my path..."));
...but Create() is returning ERROR_ACCESS_DENIED. Thius is under Vista running as a user. Under XP it is fine. Is it possible to create a registy entry in KCLM? How can I grant it access?
Thanks,
Jeff
|
|
|
|
|
jeffb42 wrote: Is it possible to create a registy entry in KCLM? How can I grant it access?
One way is to disable UAC. Another is to change your project's manifest file. I personally have not done the latter so I can't offer any specifics.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello everyone. The following code works perfectly. I would like to expand it so that the program can remember more that just one character as a password/input.
#include <stdio.h>
main()
{
char pass;
system("clear");
printf("\n\nWhat is the password?\n\n");
scanf("%c",&pass);
if (pass == 'l')
{
system("clear");
printf("\n\nVery good.\n\n");}
else
{system("clear");
printf("\n\nVery bad!\n\n");}
|
|
|
|
|
Try:
char pass[10];
system("clear");
printf("\n\nWhat is the password?\n\n");
scanf("%s", pass);
if (strcmp(pass, "l") == 0)
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
Hello
I have a function, which opens a new MODAL dialog and returns the value.
int NewDialog(HWND..., ... ,...)
{
int i = DialogBox(.......,....,.....);
return i;
}
Now i am calling this function from inside another function and waiting for its return, and this GetDialog() function is a TIMEPROC function, which is getting called like every few milliseconds.
void CALLBACK GetDialog()
{
int k = NewDialog(....,....,.....,...);
// do somethings here...
}
The problem am facing is, inside GetDialog it doesn't wait for NewDialog to return.
i.e, the function just keeps on executing and never gets the return value.
The value of variable "k" is never initialized properly.
Is that because this function is a TIMERPROC function?
Any help is welcome. How to get the return value?
|
|
|
|
|
Well, not directly because it is a TIMERPROC, but because it is called by/via a timer regularry. Does it keep popping up the dialog over and over again? You should either kill the timer before displaying the dialog and if needed, restart it after it has been dismissed, or maybe have a global or static variable that you use to signal if the dialog is up or not. For example like:
void CALLBACK GetDialog()
{
static bool dlgIsUp = false;
if (!dlsIsUp)
{
dlgIsUp = true;
int k = NewDialog(...);
dlgIsUp = false;
}
}
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Dear All,
I have a debug version of vc++ project.
The project result will be called by other program using COM interface.
I use "/embedding" at "Command Arguments" ( MSVC++ 2005).
It works just fine with XP..I can debug the project.
But not with Vista...the loader program will load another instance instead connecting to the one that aleady loaded in memory..
Did I miss some settings ?
Thanks..
|
|
|
|
|
|
DLL injection
it's my pleasure to make friend with you.
|
|
|
|
|
Hi All,
My target platform is Windows Mobile 6.5.
I've created a 'virtual' CListBox with the styles LBS_NODATA , LBS_OWNERDRAWFIXED set and styles LBS_SORT , LBS_HASSTRINGS unset. I have a vector of 'owner data' and have implemented the DrawItem() function for the owner draw side.
My problem comes when trying to set the count of items that are in the 'virtual' CListBox .
SendMessage() for LB_SETCOUNT does not return an error yet neither does it actually modify the CListBox 's count. I am able to force the count to increase via iterating AddString(NULL) for the number of items in the list, but that breaks the whole concept of a 'virtual' list.
I'm after the equivalent of CListCtrl 's SetItemCountEx() .
#define LB_SETCOUNT 0x1A7
BOOL CTestDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_data.reserve(5000);
for (int i=0;i < 5000; ++i)
{
CString fmt;
fmt.Format(L"Item %04d",i);
m_data.push_back(fmt);
}
LRESULT result;
result = m_listbox.SendMessage(LB_SETCOUNT,
(WPARAM)(int)5000,
(LPARAM)0);
int cnt = m_listbox.GetCount();
m_listbox.SetItemHeight(0, 25);
m_listbox.Invalidate();
return TRUE;
}
|
|
|
|
|
tmcart wrote: #define LB_SETCOUNT 0x1A7
Why are you redefining this?
tmcart wrote: result = m_listbox.SendMessage(LB_SETCOUNT, (WPARAM)(int)5000, (LPARAM)0);
The LB_SETCOUNT message sets the number of items that the control will ultimately contain.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|