|
Typo: #include "Aadderdlg.h" //"a" too much
for class #include СAdderDialog
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
advanced to forward, 2 errors became less:
#pragma once
class СAdderDialog; // after addition this line into file "modeldlg.h" eliminate (remove)only 2 errors
// CMainDlg
class CMainDlg : public CDialog
{
СAdderDialog* m_pModeless5;
CMainDlg::CMainDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMainDlg::IDD, pParent)
, m_pModeless5(NULL)
{
. . . . . . . . . . .
///////////////////////////////////////
void CMainDlg::OnOK()
{
if (m_pModeless5 == NULL) // OK!
{
m_pModeless5 = new CAdderDialog(this); // error C2440: '=' : cannot convert from 'CAdderDialog *' to 'СAdderDialog *'
if (m_pModeless5->Create() == TRUE) // modeldlg.cpp(67) : error C2027: use of undefined type 'СAdderDialog'
// error C2227: left of '->Create' must point to class/struct/union/generic type
GetDlgItem(IDOK)->EnableWindow(FALSE);
}
else
m_pModeless5->SetActiveWindow(); // error C2027: use of undefined type 'СAdderDialog'
}
|
|
|
|
|
you got to include the CAdderDialog-Header file
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
classic case of non-usuage of forward decalaration
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi all,
I have a dialog based application ,here on InitInstance() function of application i want to run an another exe from ShellExecute command like this;
CString shell_str;
ShellExecute(NULL,_T("open"),shell_str,NULL,NULL,SW_HIDE);
with the use of this exe i want to copy or move some files in Program files folder,so in Case of VISTA and UAC is Enabled its wants to permission of admin rights to copy or move files .
so please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You can give it permission for admin rights.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I am shure that you havent use the search box.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
means
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Read here.
"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
|
|
|
|
|
Is this[^] helpful ?
Regards,
Paresh.
|
|
|
|
|
Hello All ,
I want to make code in VC++ which will usefull,when some application like IE browser,mozilla .... That will run in mininum user access rights .please tell me which api are usefull for me and any extra from you .
Thank You.
|
|
|
|
|
CreateProcessWithLogonW Function[^]
CreateProcessAsUser() windowstations and desktops[^]
You can also accomplish the same thing without writing code. I run my internet browsers under a limited account by using the runas application[^] which allows a process to be created under an account with restrictive permissions.
Here is how I do it here in my office:
1.) I create a very limited user which has very restricted rights, perhaps I name the account 'LimitedUserName'.
2.) Create a shortcut to Internet Explorer or your favorite insecure application.
3.) Right click the shortcut and in the edit box labeled Target add:
C:\WINDOWS\system32\runas.exe /user:LimitedUserName /SaveCred "c:\Program Files\Internet Explorer\iexplore.exe"
Now Internet explorer will run as the user 'LimitedUserName' and may be less vunerable to exploits depending on your local user and security policies.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi There.
Lets say, I have an exe. that sends a user defined message to my console based application on the basis of the title.
Now, I have to recieve that message in my Win32 Console based application. Just FYI, MFC support is enabled in this application.
Please provide your kind suggestions/pointers, so that I can proceed.
Thanks.
PanB
|
|
|
|
|
I can very easily do this by implementing WindowProc(UINT message, WPARAM wParam, LPARAM lParam) function, if the application is Dialog based or MFC Doc View based application.
Another question: Can we implement WindowProc(...) in Win32 Console based application?
Thanks
PanB
|
|
|
|
|
Console applications don't have message loops.
You could however create a Window from a console application.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Not able to get you... I Mean, you said "You could however create a Window from a console application". Is that a solution to recieve User defined messages in Console application. If YES, then please provide pointers to impelment the same. Thanks.
|
|
|
|
|
Do a CreateWindow from the console application. Now you have to have a WindowProc for the new window.
OR
You can create a thread in the console application that waits on a named event.
From the other EXE you can then set the event.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Sorry Buddy. I am not very good at this.
Let me share the full scenerio with you.
There is an application let's say SENDER that will send a user defined message.
We have another application RECIEVER, a Win32 Console application, that needs to recieve that message and on the basis of that message need to do some processing.
Now, as per your suggestion, lets say I have Created a window using CreateWindow API. After this what should I do OR what am I suppose to do?
In case you need any further information from my side, then please let me know. Thanks.
|
|
|
|
|
I recommend the event mechanism rather than sending messages.
Do this in the RECEIVER in a separate thread if needed.
HANDLE hEvent = CreateEvent(0, 0, 0, "MYMESSAGE");
WaitForSingleObject(hEvent, INFINITE);
Do this in the SENDER
HANDLE hEvent = CreateEvent(0, 0, 0, "MYMESSAGE");
SetEvent(hEvent);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
Thanks for your help Paresh.
I know, how to send and recieve user defined messages in VC++ MFC based applications i.e., Dialog based/Doc View based application.
My main problem is to recieve user defined message in Win32 console based application. Though sending messages is not a problem. Problem is only to recieve the same.
Thanks
|
|
|
|
|
Did you mean, your console base application is running and you want to communicate to that application ?
Are you looking for something like IPC ?
If Yes, Please refer more information on IPC at here[^].
Regards,
Paresh.
|
|
|
|
|
Hi All,
Is there a way we can startup the GDI+ 1.1 version?
If so what changes are required to use GDI+ 1.1?
Thanx.
Do your Duty and Don't expect the Result
|
|
|
|
|
|
Hi Iain,
Thanx for the info.
Actually i have to develope a simple photo editing tool. so i was looking for the APIs in GDI+ and i found some of them interesting, unfortunatly they are of version 1.1
Do your Duty and Don't expect the Result
|
|
|
|