|
try the following,
#ifdef _UNICODE
#pragma comment (linker, "/subsystem:windows /entry:wmainCRTStartup")
#else //_UNICODE
#pragma comment (linker, "/subsystem:windows /entry:mainCRTStartup")
#endif //_UNICODE
it makes your application as windows application and since you are not creating any windows in console application (normally not) no UI is visible.
you can also think about windows NT services.
|
|
|
|
|
I was saying easy way to switch to "Win32 application" from a console application. Sorry if some thing wrong, But i would like to know the technical reason (will be appreciated) that gave me vote 1.
|
|
|
|
|
You can also hide the console window,
ShowWindow(GetConsoleWindow(), SW_HIDE);
|
|
|
|
|
I don't understand why your previous post was voted down. I can only think that someone thinks the OP is trying to do a malicious program, for which you're providing him some assistance and so they voted you down.
Anyways, I know that you won't assist someone to do a malicious program and so I'll try to bring up the score.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thank buddy,
Invisible app can be easily created in windows subsystem application, even a beginner (win32) can understand. So nothing prevents he from creating malicious program. He can have good intention also.
|
|
|
|
|
Well, that was only my guess. Besides that, I couldn't think of a reason why someone down-voted you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Unjustified[^] vote here.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
Create a "Win32 Application" project.
|
|
|
|
|
Are you looking for a windows service
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
How can I set 3(1 ULONGLONG,2 DWORD) value with each item of tree so that I can use it later.
|
|
|
|
|
|
I got S_FALSE when reading properties [pPropStg->ReadMultiple(nPidsi, pPropSpec, pPropVar)] since pPropStg return as S_OK.
#include <stdio.h>
#include <windows.h>
#include <ole2.h>
#include <locale.h>
void DumpSummaryProps(IPropertySetStorage *pPropSetStg) {
IPropertyStorage *pPropStg = NULL;
HRESULT hr;
PROPVARIANT propRead;
hr = pPropSetStg->Open(FMTID_SummaryInformation,
STGM_READ | STGM_SHARE_EXCLUSIVE, &pPropStg);
if(FAILED(hr))
{
printf("No Summary-Information.\n");
return;
}
struct pidsiStruct {
char *name;
long pidsi;
} pidsiArr[] = {
{"Title", PIDSI_TITLE},
{"Subject", PIDSI_SUBJECT},
{"Author", PIDSI_AUTHOR},
{"Keywords", PIDSI_KEYWORDS},
{"Comments", PIDSI_COMMENTS},
{0, 0}
};
int nPidsi = 0;
for(nPidsi=0; pidsiArr[nPidsi].name; nPidsi++);
PROPSPEC *pPropSpec = new PROPSPEC [nPidsi];
PROPVARIANT *pPropVar = new PROPVARIANT [nPidsi];
for(int i=0; i<npidsi; i++)="">
{
ZeroMemory(&pPropSpec[i], sizeof(PROPSPEC));
pPropSpec[i].ulKind = PRSPEC_PROPID;
pPropSpec[i].propid = pidsiArr[i].pidsi;
}
hr = pPropStg->ReadMultiple(nPidsi, pPropSpec, pPropVar);
<big>
if(FAILED(hr))
{
printf("IPropertyStg::ReadMultiple() failed w/error %08lx\n", hr);
}
else
{
int i;
for(i=0; i<npidsi; i++)="">
{
printf("%16s: ", pidsiArr[i].name);
DumpPropVariant(pPropVar + i);
}
}
delete [] pPropVar;
delete [] pPropSpec;
pPropStg->Release();
}
void DumpProps(char *filename) {
WCHAR wcFilename[1024];
setlocale( LC_ALL, "" );
int i = mbstowcs(wcFilename, filename, strlen(filename));
setlocale( LC_ALL, "C" );
wcFilename[i] = 0;
IStorage *pStorage = NULL;
IPropertySetStorage *pPropSetStg = NULL;
HRESULT hr;
hr = ::StgOpenStorageEx(wcFilename, STGM_READ | STGM_SHARE_EXCLUSIVE, STGFMT_FILE,
0, NULL, 0, IID_IPropertySetStorage, (void**)&pPropSetStg);
if (FALSE(hr))
{
printf("Error");
return;
}
DumpSummaryProps(pPropSetStg);
pPropSetStg->Release();
pStorage->Release();
}
void main()
{
char *s;
DumpProps("1.docx");
scanf("%s",&s);
}</npidsi;></npidsi;></locale.h></ole2.h></windows.h></stdio.h>
|
|
|
|
|
REPOST !!!
|
|
|
|
|
|
you wanted to say that to me ??
|
|
|
|
|
When i double click the dialog it does not go to Coding page.
It just show class wizard.When i click any control in dialog box, it shows only the class wizard.
I deleted the .clw file and again i create that. But No use.
Please help me?Any idea for this.
Anu
|
|
|
|
|
Yes, you have to first select a base class for it using class wizard.
|
|
|
|
|
It shows the classwizard of that corresponding dialog.
THis problem ocurs not only for single dialog.
Im using more than 50 dialogs for my application.The problem exists for all these dialogs.
When i double click the dialog..it shows the classwizard of that particular dialog.
Anu
|
|
|
|
|
Do you have any class for dialog?
|
|
|
|
|
Hi all,
i m new in feild of database, i m using MS-Access Database and SDI type Application in VC++2005,
i m using a CRecordset class for database, i m using the MoveNext() and MovePrev() for moving the records but its not working properly.
it is not move the record one by one.
Please Help me for this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
This article will help you please check
Click here ->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
I m check this article in this article they read a table from Access Database and then show in List Ctrl.
But in my application i want the fetch the record from database and show in corresponding edit box of dialog, one by one.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Ok.Please explain more what's an issue,when you click button move next or prev??
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
I m working on SDI type application.
I have design a dialog Box with help of Diffrent Editbox and Combobox,
and then i have created a table according to field of dialog box.
i have one FormView ,in CFormView Dreived class i m using a List ctrl Where i show all list of data which is Present in database.
when i Double click on List record then dialog box is open and fetch
all corresponding Values from database and show in dialog box.
now i want when i click on Next Or Prev Button the record Move on next or Prev record and show corresponding Value in Dialog box.
But it is not happend here, when i click on Next or Prev Button it move but only one fix record in both cases nex and Prev.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|