|
OK. If you make it a Console App you get a Console and you can't stop this as far as I know.
If you make it a Windows App and check the command line in WinMain then choose to call the CreateWindow GUI code for some commands and AllocConsole console code for other command lines then you have options 1, 2 & 3 covered.
What I don't see is why the user won't be able to run it from the command line. Windows deals with this just fine, try opening a command prompt and typing 'notepad' and you'll see what I mean. Is there some other reason why it won't launch like not being able to find dependent dlls?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi all,
I want to access a remote database using mfc which is in a linux machine.. Any clue?
Thanks in advance
Vikas s
With Reagards
Vikas
|
|
|
|
|
Vikas_123 wrote: mfc which is in a linux machine..
MFC on a Linux machine? Great!!
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.
|
|
|
|
|
its thr remote datqabase thats in the linux amchine .. mfc apppplication runs on windows only!
With Reagards
Vikas
|
|
|
|
|
From the MFC end you'll probably need to use ODBC. As far I know there aren't any OLE/DB (ADO) backends for linux based databases but anyone is welcome to tell me otherwise. Then you'll need an ODBC drive that talks SQL to a remote database. One specifically for the database you're using would be good but sometimes more general drivers can be persuaded to work with different SQL databases. Essentially the link between the two has to be SQL, the only common language, over TCP/IP, the only common communication medium. You may need the database queries wrapped up as HTTP Gets or even SOAP packets depending on what services are layered on top of your Linux database. If the database has a Web based front end you might even be able to get Remote Data Objects (RDO) to work. It's an old Micorsoft technology, probably no longer supported but that doesn't mean it won't work. Either way it's probably not going to be easy. I'd consider investing in some middle-ware designed to do this sort of thing for you. There's lots of it about. Good luck.;)
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi,
I have an ActiveX Plug-In developed using MFC, which gets loaded into a website. On one particular button click(When session is expired), I want to navigate to a "Login" page in the same browser instance.
I am using following code:
IOleClientSite *pClientSite = NULL;<br />
pClientSite = COleControl::GetClientSite();<br />
<br />
IOleContainer* pContainer = NULL;<br />
CComQIPtr spDoc(pContainer); <br />
<br />
pClientSite->GetContainer( &pContainer );<br />
if ( pContainer != NULL )<br />
pContainer->QueryInterface(&spDoc); <br />
<br />
BSTR websiteUrl = loginURL.AllocSysString();<br />
if (spDoc)<br />
{<br />
spDoc->put_URL(websiteUrl);<br />
}
Using above code, the page gets navigated to the login page. but the Header part remains as it is. and the address bar still shows the previous URL.
Can anybody help me to resolve this issue?
Thanks in advance,
Vrushali
|
|
|
|
|
Hi,
I have an ActiveX Plug-In developed using MFC, which gets loaded into a website. On one particular button click(When session is expired), I want to navigate to a "Login" page in the same browser instance.
I am using following code:
IOleClientSite *pClientSite = NULL;<br />
pClientSite = COleControl::GetClientSite();<br />
<br />
IOleContainer* pContainer = NULL;<br />
CComQIPtr<IHTMLDocument2, &IID_IHTMLDocument2> spDoc(pContainer); <br />
<br />
pClientSite->GetContainer( &pContainer );<br />
if ( pContainer != NULL )<br />
pContainer->QueryInterface(&spDoc); <br />
<br />
BSTR websiteUrl = loginURL.AllocSysString();<br />
if (spDoc)<br />
{<br />
spDoc->put_URL(websiteUrl);<br />
}
Using above code, the page gets navigated to the login page. but the Header part remains as it is. and the address bar still shows the previous URL.
Can anybody help me to resolve this issue?
Thanks in advance,
Vrushali
|
|
|
|
|
Hello All,
I have images in .PNG format to be used in my Buttons in my dialogs and forms. When I tried to use the CBitmapButton it is expecting the images in .BMP format. When I tried to convert the image the color of image changes . TIF format gives almost similar look and feel when converted from PNG format.
Let me know how to use PNG / TIF images for my button.
I have few images in PNG format to be used as background of my dialogs also. Let me know how to use PNG files as back ground of the dialog box.
Thanks in Advance
Blr Boy
|
|
|
|
|
Maybe also that your image converting tool is poor, try IrfanView, it's great.
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.
|
|
|
|
|
if you want to load ong or gif files you can use of CImage class.
|
|
|
|
|
hi i am using visual studio 2005 to create an msi file and then i install it through my mfc program. when i click the minimize button the package minimized but the image still alive in screen. what to do this. pls help me.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Hi all
I am looking forward to learn MFC and write a windows application in it asap.
Can any one pls refer me some good complete tutorial sites. I refered one site but that was real confusing as they were like coding for every buttons like win32. So i dont want to code for any tools. I prefer drag n drop in that case...
Pls let me know of any good ol tutorial...N YEH FOR VS2005. I guess there is some difference in VC6 and VS2005.
Thanks
SS
|
|
|
|
|
log on to MSDN[^. You can find lots of tutorials and articles there
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Thanks for your reply.
But in msdn and in the link you provided ...there are many articles not a complete tutorial ...so its bit hard to find the right one which guides me through step 1 ...Well at the moment i am facing problem in creating a project in mfc as there are lot of stuff to select which is confusing me. So i am looking for complete site.I guess most of the available sites are for VC6...
|
|
|
|
|
On the internet you can find alot of sites about C++ and MFC like MFC - Advanced[^] but what do you need exactly? and whats your knowledge of C++?
|
|
|
|
|
Actually i got an application in MFC which i need to convert it in Borland. But as i have never worked on MFC. So i am finding it bit difficult to convert the code. So now i want to learn it and then i would convert it in Borland. Well i have done few applications in Borland. I am not very good programmer in C++ but yeh not that bad aswell. I usually program in C#.NET...
And yeh the link that you just gave me ...i was looking tutorial on this one only. And if you ll notice in its 1st tutorial .It is for VC6 i guess...So if you could tell me what all do we have to select while starting the MFC project in VS2005.,...then i could follow the same link...
Thanks for helping me out...
|
|
|
|
|
For start you must select project Type Visual C++ Projects->MFC and of Templates select MFC Application then on the Application Type you must select Single document ot Multiple documents or Dialog based and then click Finish button.Does it your answer or no?
|
|
|
|
|
OK DIALOG option is for form based application. What about this single documents and multiplpe documetns....when can we use these option and all rest option are not so important i guess..
Well i want to write a single form based application with 7-8 .cpp and header files...so i guess for me dialog based is the right option...
|
|
|
|
|
|
how to run each thread as a seperate process.
i.e i made a thread oreiented dll in that i called each time it should make the threds a a seperate process .
S.V.Rajkumar
|
|
|
|
|
Did you go through the CreateProcess() API
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
How to do the following?
How to avoid dialog box from closing when ESC or ENTER key pressed?
|
|
|
|
|
Override PreTranslateMessage()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Override the CDialog::OnOK and OnCancel.
|
|
|
|