|
The TBSTYLE_TRANSPARENT style flag makes no difference.
There's a subtle difference in the background color in my MFC application and Windows Explorer, Internet Explorer, Movie Maker and a few other applications that seem to be more targeted for XP. Let me point out that the toolbars in Visual Studio, all of the Office XP products, WordPad, Notepad, etc. are NOT the same color as the first set of apps that I mentioned. My application shares their colors, not what I'd consider the more correct colors.
|
|
|
|
|
How to open the MSWord application, by automation, into my own window ?
Thanks.
|
|
|
|
|
Get the Path of winword.exe in your computer and then Through Winexec function all that exe with it's path
Samir Sood
|
|
|
|
|
Get the Path of winword.exe in your computer and then Through Winexec function call that exe with it's path
Samir
|
|
|
|
|
To opne word in your MFC application, first you have to create an application which supports Doc/View architecture. Then use COleDocument instead of usual CDocument class. Find out the help for COleDocument. If still u find it difficult, then send me a mail.
|
|
|
|
|
I have made this checkbox on my app. It's a non MFC app. it just get light gray when i press it and turns white again when i release, what do i do?
Thankyou
|
|
|
|
|
Either BS_AUTOCHECKBOX has not been specified in the style or you have code that is resetting the state.
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?
|
|
|
|
|
Oh, thankyou It was the AUTOCHECK
|
|
|
|
|
What function/message shall i use?
|
|
|
|
|
For non-MFC apps, look at the BM_GETCHECK and BM_SETCHECK messages.
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?
|
|
|
|
|
|
I am planning to write the distributed C++ MCSD exam. Now I noticed that the books have all been discontinued (the MS Press books for it), but the exam isstill there and is not listed amonst exams that will be discontinued. Do you guys think that this exam will be around in the 6 months or so, or do you see it phase out within this year?
|
|
|
|
|
Hey guys, I've got one that I hope someone can help with:
Over on codeguru.com there is an article titled Separating the views of an MDI application into different DLLs
What I'm trying to do is create this same fucntionality within a SDI application. This app is workflow based and using an MDI just doesn't work for this type of application.
Here's some of what I have; In my DLL, I have exported one function:
extern "C" AFX_EXT_API UINT Init(CString *strLabel,CRuntimeClass **pRunTimeClass)
{
new CDynLinkLibrary(View1DLL);
*pRunTimeClass = RUNTIME_CLASS(CTestView);
*strLabel = "View 1";
return 0;
}
In my test application I have a menu that will call this method when selected:
void CMainFrame::OnViewSwitchtodll()
{
HINSTANCE hDLL;
LPDLLFUNC lpfnDllFunc;
UINT uReturnVal;
CString strLabel;
CRuntimeClass* runtimeclass;
hDLL = LoadLibrary("View1.dll");
lpfnDllFunc = (LPDLLFUNC)::GetProcAddress(hDLL,"Init");
if (!lpfnDllFunc)
{
FreeLibrary(hDLL);
}
else
{
uReturnVal = lpfnDllFunc(&strLabel,&runtimeclass);
CAADoc* pDoc = (CAADoc*)this->GetActiveDocument();
pDoc->SwitchToView(runtimeclass);
}
}
This loads up the DLL grabs a function pointer to the Init function exported in the DLL and then passes the runtimeclass to the SwitchToView() in my Document class (this was taken from an article on CodeProject).
When I step into SwitchToView the runtimeclass object appears to be fine... and I do not receive errors... but the mHwnd of the runtimeclass is ??? in the Variable inspector during debug.
I've come to the point where I need someone else to take a look at this - so any help?
Thanks in advance,
Dave "Dak Lozar" Loeser
|
|
|
|
|
I have two views in my application . One is rich edit view and one is edit view . They are split using the splitter windows . But the edit view by default has horizontal and vertical scroll bars associated with it. How to get rid them and make them auto vertical and horizontal scroll bars. I have overriden the precreatewindow function of edit view with the following code
cs.style &= (WS_CHILD | WS_VISIBLE );
cs.style &= ~(WS_HSCROLL);
cs.style &= ~(WS_VSCROLL);
cs.dwExStyle &= ~(WS_EX_RIGHTSCROLLBAR);
but to no avail . Can anyone suggest a solution
|
|
|
|
|
Hi,
I'd like to know if anyone can give me some tips about how to programme in C++ a simple class for downloading a file from a web site, for example an image file. I want to incorporate this class into a project, so it does not need any flashy GUI or anything similar.
If possible, it would be good to avoid MFC classes because I need portability across windows/linux. My network programming is not up to scratch for this project that I have set myself.
Can one use an HTML GET call? Do I have to basically write a ftp client?
Any hints, tips, links, or book references would be great! I've already had a look on the web, but most implementations seem to use MFC
Thanks,
James
|
|
|
|
|
Here you go:
bool downloadUrlToFile
(CString strUrl,
CString strFilename)
{
HRESULT hResult = ::URLDownloadToFile (NULL, strUrl, strFilename, 0, NULL);
return (hResult == S_OK);
} Also see my WebResourcrProvider article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
::URLDownloadToFile requires Internet Explorer 3.0 or higher. I do not think that this is a portable solution.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
You're right, but he'll probably have many other problems to worry about if he's running on a system with < IE3.0!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
derfel wrote:
Can one use an HTML GET call?Yes, that's exactly what you must use to download something from a web server. Do I have to basically write a ftp clientNo, you must write a http client. See the Winsock FAQ to see how to do socket communcations without MFC. Winsock 1 calls (the ones without WSA prefix) are easily portable to Linux (they are based on Unix socket functions).
|
|
|
|
|
Thanks for the help everyone...kind of got something hacked together
|
|
|
|
|
with GetTcpTable & GetUdpTable you get the same result as netstat -an from the commandline.
On XP ,netstat have another flag -o which display the PId that associates with the Tcp/Udp port
how to accomplish that ? any ideas ?
|
|
|
|
|
Does anyone know how to register an ActiveX Control on another pc automatically without requesting the user to do it by him/herself?
is InstallShield capable of registering an ActiveX Control in setup.exe? but how? What should i do? do i need to write script for it?
When i send release of my app to my friend which includes an .ocx file they are compelled to register (many of them don't know how to do it as well by using Regsvr32.exe) it before starting the app.
Thanks for ur help..
Atilla Selem
just listening to you...
|
|
|
|
|
Yes you need to execute the DLLRegisterServer function
#include <stdole.h>
typedef HRESULT (STDAPICALLTYPE *CTLREGPROC)() ;
HMODULE hModule = ::LoadLibrary(m_strPathName) ;
CTLREGPROC DLLRegisterServer =
(CTLREGPROC)::GetProcAddress(hModule,"DllRegisterServer" ) ;
DLLRegisterServer() ;
::FreeLibrary(hModule) ;
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
that's great...it has worked!,
thanks for ur help Mr.Antollini...
Best Regards,
Atilla Selem
just listening to you...
|
|
|
|