|
You've shown everything but the declaration of CDemoDlg .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
please Give me a link for c++ & vc++ faq
|
|
|
|
|
|
I give you links to Google [^], [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Sorry, I'm all out. The next batch is scheduled to arrive next Thursday.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I am using MessageBox to display a message with following parameters
MessageBox("Created Successfully",_T("test2"),MB_OK|MB_SYSTEMMODAL|MB_ICONINFORMATION);
now my problem is that my message box is displaying a system default icon on messagebox taskbar....now what i want is either to remove that icon or it should take application default icon.....
How is this possible????
Thanks in advance
|
|
|
|
|
Why are you using the MB_SYSTEMMODAL flag ?
|
|
|
|
|
actually i want to have always on top property for my message box......
|
|
|
|
|
Always on top ? Over all other windows ? That's a bit intrusive if the message is not vital (and by the text you showed in the example, it is not vital at all). If an application that I use would have such intrusive behavior, I would uninstall it immediately.
Anyway, I think the icon is coming because you are using this flag. In the doc they say:
Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention (for example, running out of memory).
|
|
|
|
|
When i run the following command in console at non-admin account
runas.exe /u:Administrator cmd.exe"
Note: It will prompt to ask admin password :
if we enter admin pwd the console says it will run at admin account(at titlebar)
In that console ,i have typed boot.ini and press enter.
The boot.ini file is opened in notebad.If i edit that it will saved.
can i achieve this via VC++.
I need to get pwd in dialog and pass to console (for Note:)
|
|
|
|
|
pooja_friends wrote: can i achieve this via VC++.
Yes
SHELLEXECUTEINFO shExecInfo;
shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shExecInfo.fMask = NULL;
shExecInfo.hwnd = NULL;
shExecInfo.lpVerb = _T("runas");
shExecInfo.lpFile = _T("notepad.exe");
shExecInfo.lpParameters = _T("c:\\boot.ini");
shExecInfo.lpDirectory = NULL;
shExecInfo.nShow = SW_MAXIMIZE;
shExecInfo.hInstApp = NULL;
ShellExecuteEx(&shExecInfo)
|
|
|
|
|
Thanks its working
If run the above code,it asks "which user account do you want to run this program"
I need to set administrator as default without asking user.Get password from user and login to edit boot.ini from command line.
how i do that.
|
|
|
|
|
Prompt for the password yourself in your application, and use CreateProcessWithLogonW .
|
|
|
|
|
can u give me sample code for CreateProcessWithLogonW please
|
|
|
|
|
It's fully documented in MSDN.
|
|
|
|
|
Hi,
I am trying to write to a 24 col printer which has a centronics connector i.e., parallel printer connector and if I write to the LPT1 using following code it works fine.
hLPT = CreateFile("LPT1",GENERIC_WRITE, 0,
0, CREATE_ALWAYS, FILE_FLAG_NO_BUFFERING, 0);
if(hLPT == INVALID_HANDLE_VALUE)
{
AfxMessageBox("Cannot open port");
return 0 ;
}
WriteFile(hLPT,str,size,&lLen,NULL);
ch = 0x0F;
WriteFile(hLPT,&ch,1,&lLen,NULL);
CloseHandle(hLPT);
But as I am using USB to Parallel convertor I have used "USB001" in place of LPT1 But it is not printing. Is there any solution for this.
Thankx
Murali. S
|
|
|
|
|
Possibly you've to read the converter specification (and possibly again ask for support the converter's manufacturer).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How do you compile this whole project in Visual C++ Express Edition ? The link is below ?
http://www.codeproject.com/KB/cpp/loggerservice.aspx
Will simply creating a new project and inserting all the files and then clicking Build Solution help ?
I don't want you to do this for me. I want to learn how all this will happen?
Any link to guide would be really appreciated.
|
|
|
|
|
Apparently there are project files in the zip. So, just extract everything somewhere and double click on the .dsw file. VC will ask you if you want to convert the project (because it was done with VC6) and say yes. Then just recompile it.
|
|
|
|
|
There are two .dsw files now which one to compile? I opened both and clicked on Build Solution but in one I got this error
d:\usr\src\logger\stdafx.h(28) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory
And in another I got this ?
d:\usr\src\logger\loggertest\stdafx.h(15) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
I'm using Visual C++ 2008 Express Edition
modified on Thursday, July 24, 2008 6:21 AM
|
|
|
|
|
Would I be able to compile this project with Visual C++ 2008 Express Edition I have heard that it does not suppports MFC, what to do now
|
|
|
|
|
manzoor10 wrote: it does not suppports MFC, what to do now
You can either convert all the ATL/MFC code so it no longer uses those
or you can obtain a full version of Visual Studio.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
None that I know of.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I didn't look at the article in details but you could perhpas only reuse the files that are not part of the application itself (so, only the usefull sources). But again, you'll have to see it for yourself which ones are needed...
|
|
|
|