|
Hello,
I am tring to write a simple .exe that can show or hide another running exe.. for example I want to be able (from my dialog box) toggle (show,hide) a running instance of notepad.
Any ideas?
Rob
|
|
|
|
|
Never mind.. I figured it out..
|
|
|
|
|
How do I programmatically get the name of the computer a user is using to log into the network? If some one knows the regular way and the .net way I would REALLY appreciate it. Thanks chums!
... OK, let's try that again. What I meant was not a local call, but one over the network, where I know someone's login id and that they are logged into the domain, but want to know what computer they are using to get on the network.
|
|
|
|
|
|
I have placed a List Control into a small area of a scrollview, among other controls. The control is in Icon view with small icons and text lables.
When I call CreateDragImage the image I get is the small icon and a black rectangle where the text would be. How can I get around this? Either to make the text visible or to just have the image.
Happy programming!!
|
|
|
|
|
I see that every topic on Visual C++ on
the msdn website has a
"this topic is not being updated after .Net release"
tag in RED!!!!!!!
Is Microsoft killing off C++, MFC et al
|
|
|
|
|
Ugh, another person who doesn't have CLUE what is going on.
MICROSOFT IS NOT KILLING OF C++.
VISUAL C++ IS THE OLD PRODUCT.
THE NEW C++ COMPILER IS CONTAINED IN THE .NET DOCUMENTATION.
SEEEEEEEEEEEEE!!!!!!
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?
|
|
|
|
|
ok smartypants, can u tell me how I access this
"help"? whats the link to the root of Visual C++
.Net help? God knows their help system was
bad enough, now they have to complicate things
like this!!
|
|
|
|
|
Anonymous wrote:
ok smartypants
That's one sure way to make sure he won't answer your question.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Heh, not like I was being civil
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?
|
|
|
|
|
Just click on the link I provided in the message.
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?
|
|
|
|
|
Hi all,
I’m trying to make use of some threads in my programs.
Then I try to build my project(MFC), this error turn up.
“fatal error LNK1561: entry point must be defined”
My code is similar:
UINT CTestDlg::threadProc(LPVOID p)
{
CTestDlg * me = (CTestDlg *)p;
me->classProc("ThreadTest");
return 0;
}
void CTestDlg::classProc(const CString mesage)
{
AfxMessageBox(message);
}
void CTestDlg::OnOkButton()
{
HWND hWnd = GetSafeHwnd();
AfxBeginThread( threadProc, hWnd, THREAD_PRIORITY_NORMAL );
}
Can you help me what to do?
Thanks,
Ola Carlsson
olaca428@student.liu.se
|
|
|
|
|
You don't have a main for some reason.
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?
|
|
|
|
|
First of all your thread proc cannot be a non-static member function of a class. Either make it static or use a global function as thread proc.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
HI Guys
I wanna run my application as Win NT service.
How do i wanna do?
I want to create an exe, with input parameters as
1. User Name
2. Password
3. exe\batch File Name
I want to run "exe\batch File Name" as Win NT service with user name and password.
How can i do it?
Help needed ASAP.
Regs
Rohit
|
|
|
|
|
http://www.codeproject.com/system/serviceskeleton.asp
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Hi all,
I used Crystal Report 8.0 in my VC++ 6.0 without any problem, but in VC++ .NET Crystal Report control have other function for allthing !
Below source code worked in my VC++ 6.0 project and now i have problem in VC++ .NET project:
strFormula = "{TABLE1.ID} = 1";
m_Report.put_SelectionFormula(strFormula);
as you can see, there is a simple for Selection formula !
ATTENTION: in VC++ 6.0, you must use SetSelectionFormula function
It is my second question, why I must use of different of functions in VC++ 6.0 and VC++ 7.0 ?
Help me !!!
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi.
Regarding C++ windows programming, is it a convention to include both data type and variables names for function parameters in the declaration file?
For example:
class MyFrame : public CFrameWnd{public: MyFrame(); functionA(int &var, char &str); protected: afx_msg OnPaint(); afx_msg OnLButtonDown(UINT nChar, UINT nRep, UINT nFlags);// afx_msg OnLButtonDown(UINT, UINT, UINT);...private:...};
I am used to not including anything more than what is necessary.
Kuphryn
|
|
|
|
|
kuphryn wrote:
Regarding C++ windows programming, is it a convention to include both data type and variables names for function parameters in the declaration file?
yes. but it has nothing to do with Windows. it just makes it easy (or even possible) for other programmers to use your classes.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
The advantage is that intellisense will also show the variable name you used. Thus by using meaningful variable names you could really improve things for others using the class.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Hey all,
I am trying to use import to automate Outlook to send email for my CGI program.
However, outlook stays in memory after my program is finished and my program
got stuck with outlook too, can anybody tell me why and how to solve it?
Thanks a lot and the following is my code for sending email:
void Sendfile(){
try
{
_NameSpacePtr pNameSpace;
MAPIFolderPtr pOutbox;
_ItemsPtr pOutboxItems;
_MailItemPtr pNewMail;
AttachmentsPtr pAttachments;
RecipientsPtr pRecipients;
char eachfile[100];
char eachemail[100];
char eachcustmail[100];
int pos;
//fileLocation, set to 150 character lenght
char filelocat[250];
// Create an Outlook.Application pointer.
_ApplicationPtr pApp("Outlook.Application");
// Create NameSpace pointer.
pNameSpace = pApp->GetNamespace(L"MAPI");
// Logon in OutLook
pNameSpace->Logon(LogonTo);
// Create pointer to the Outbox Folder.
pOutbox = pNameSpace->GetDefaultFolder(olFolderOutbox);
// Create pointer to the Messages Collection.
pOutboxItems = pOutbox->Items;
// Create pointer to a new message.
pNewMail = pOutboxItems->Add();
// Set the Subject of the message.
pNewMail->Subject=subject;
// Set the Text of the message.
pNewMail->Body=body;
// Set the BCC address (already define in the header file)
pNewMail->BCC=BCC;
// Create pointer to the Attachments collection.
pAttachments = pNewMail->Attachments;
//Loop for Attachment for each file
pos=0;
while (pos <= (int)(strlen(filename)) ){
getStringNext(filename,pos,eachfile);
strcpy(filelocat,path);
strcat(filelocat,eachfile);
// printf("%s\n",filelocat);
if (IsExist_Notnull(filelocat)){
// Create new Attachment. path
pAttachments->Add(filelocat, (long)1, (long)(15000),
eachfile);
}
}//end while
// Create pointer to Recipients Collection.
pRecipients = pNewMail->Recipients;
//Loop for input string to extract mail addresses
pos=0;
while (pos <= (int)(strlen(custmail)) ){
getStringNext(custmail,pos,eachemail);
strcpy(eachcustmail,eachemail);
// printf("%s\n",filelocat);
// Add recipient.
pRecipients->Add(eachcustmail);
}//end while
// Resolve the recipient address.
pRecipients ->ResolveAll();
// Send the message.
pNewMail->Send();
// Logoff NameSpace.
pNameSpace->Logoff();
pApp->Quit();
return;
}
catch (_com_error &e)
{
dump_com_error(e);
return;
}
}//end
|
|
|
|
|
You probably need to release the object. try adding pApp->Release();
after pApp->Quit();
Good luck,
Bill
|
|
|
|
|
I have a ULONG called uProdTypeTemp that has a value of '128' I need to reverse that value and place that back into a different ULONG so that it reads '821'. See code below:
These next two lines must NOT change:
const unsigned long ACTCODE_BYTE_LENGTH = 20L;
BYTE ByteList[ACTCODE_BYTE_LENGTH];
ULONG uProdTypeTemp = ByteList[10];
Thanks,
Derek Smigelski
|
|
|
|
|
turn it into a std::string with an ostringstream, I'm sure STL will have an algorithm to reverse it, then use atoi to get the reversed number out.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
char tmpstr[5];
sprintf(tmp,"%d",uProdTypeTemp)
char tmp2=tmpstr[0];
tmpstr[0]=tmpstr[2];
tmpstr[2]=tmp2;
uProdTypeTemp = atoi (tmpstr);
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|