|
|
I am trying to automate an application which contains tabular data. This data when sent to a Word application manages to push the table onto the next page, but not in PowerPoint. I end up having a huge table which cannot be viewed entirely in a single slide.
Is there any way to make the automation controller smart enough to split the table during export?
Does anyone have any other solution?
|
|
|
|
|
Does anybody knows how to change text label (caption) of the radio buttons ?
Good sample will be very nice to see .. !
thanks a lot !
|
|
|
|
|
Suppose you have a radio button (id is IDC_RADIO1) and another radio button (IDC_RADIO2). You could code something like this:
void CMyTestDlg::ChangeCaption()
{
CWnd* pWnd = GetDlgItem(IDC_RADIO1);
pWnd->SetWindowText("Choice_001");
pWnd = GetDlgItem(IDC_RADIO2);
pWnd->SetWindowText("Choice_002");
}
Maxwell Chen
|
|
|
|
|
GetDlgItem(IDC_RADIO_WHATEVER)->SetWindowText("New Label");
|
|
|
|
|
Thanks a lot !
it works perfect .
And another one question - how can i to show / hide Radio buttons elements on the dialog ?
thank you !
|
|
|
|
|
GetDlgItem(IDC_RADIO_BUTTON)->ShowWindow(false);
I think this is the way I normally do it.
Best Regards
Søren Madsen
Denmark
|
|
|
|
|
Hello!
I'm trying to record a metafile under Gdi+ somehow into MEMORY, but all the constructors for Gdiplus::Metafile require a filename!
There is however one constructor which allows the metafile to be recorded into an IStream interface. I was thinking that perhaps such an object could be written that would stream the data into a memory buffer via an IStream interface.
<br />
Metafile::Metafile(IStream* stream, HDC referenceHdc, Rect& frameRect, MetafileFrameUnit frameUnit, EmfType type, WCHAR* description)<br />
<br />
Creates a Metafile object for recording to an IStream interface.<br />
Does anyone know how this is possible? Perhaps some atl / com code? I need this for a Visual C++ 6.0 Mfc app.
Thanx a bunch! I really appreciate your help .
Cheers,
swinefeaster
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Hi ya all!
The following code i supposed to create a window inside another window.
m_Page.CreateEx(WS_EX_LEFT | WS_EX_TOPMOST,
AfxRegisterWndClass(CS_CLASSDC),
_T(""), WS_VISIBLE | WS_CHILD, rcClient.left, rcClient.top,
rcClient.Width(), rcClient.Height(), m_hWnd, NULL);
The window is created at program start (I'm able to paint in it), but at close I get;
"Unhandled exception at 0x77f7f570 in kalender.exe: User breakpoint."
Which point to;
"77F7F570 int 3" in Disassembly
If the mousepointer is in this window at program start it show a hourglass, until the pointer is moved outside this window.
Thankfull for all your help
/DrZOO
___________________
Chics are for fags!
|
|
|
|
|
Hi There.
I have a very easy question Do there exists any API function or so, in MFC/Windows that can return with a language string, if it receives a language ID? For instance:
LanguageID2String(0x09) will then return "English"
I know that there must be a function like this, but I can't find it. Can you help me?
Thanks in advance,
Best Regards
Søren Madsen
Denmark
|
|
|
|
|
IMultiLanguage *pML;
HRESULT hr = CoCreateInstance(CLSID_CMultiLanguage, NULL, CLSCTX_ALL, IID_IMultiLanguage, (void**) &pML);
hr = pML->GetRfc1766Info(0x09, &info);
You may enumerate all locales with:
IMultiLanguage *pML;
HRESULT hr = CoCreateInstance(CLSID_CMultiLanguage, NULL, CLSCTX_ALL, IID_IMultiLanguage, (void**) &pML);
IEnumRfc1766 *pEnumerator;
hr = pML->EnumRfc1766(&pEnumerator);
RFC1766INFO info;
ULONG nRet;
while (SUCCEEDED(hr))
{
hr = pEnumerator->Next(1, &info, &nRet);
if (SUCCEEDED(hr))
{
CString str(info.wszLocaleName);
TRACE(str + "\n");
}
}
Hope that helps.
|
|
|
|
|
If you have IE 5.5 or later, you may use HRESULT LcidToRfc1766(LCID locale, LPTSTR pszRfc1766, int nChar); The previously posted example should work with IE 4.0 according to MSDN.
|
|
|
|
|
Hi Niklas
Thank you very much for your help, and example. I really looks nice, and I am sure that it will help my further in the project.
Best Regards
Søren Madsen
Denmark
|
|
|
|
|
There are always simpler ways to do things Either one of
::GetLocaleInfo(0x09, LOCALE_SENGLANGUAGE, szBuf, 256);
::GetLocaleInfo(0x09, LOCALE_SLANGUAGE, szBuf, 256); will do, depending on what info you need. I've had this thing on my mind all day, so I had to investigate it further. I knew there must be something for this in the windows API. Well, it wasn't harder than this
|
|
|
|
|
When trying to use my ActiveX control in Visual C++, I noticed that when inserting the control in the dialog the control will not be created which causes the m_hWnd to be NULL which causes problems in my control behavior at design time. What shall I do to overcome this problem? Any ideas?
Daed
|
|
|
|
|
Hi,
Can somebody give me code for VC++ and linux (C) where
my linux module recv a file and VC++ module sends a file.
I've developed it but the problem is that if i transfer
JPG files.. the files are getting distorted..
Any hints and snipplets would be a great help
Thanx
|
|
|
|
|
I´m having problems getting the my process handle, using GetCurrentProcess() I always
get 0xfffffff... back. I need to get my own process handle to pass on to a watchdog process to monitor, has anyone any idea how to get to grips with this problem ?
ps, I´m using ATL/WTL and API NO MFC
|
|
|
|
|
The return value is a pseudo handle , to get the real handle use GetCurrentProcess() with DuplicateHandle() or call to OpenProcess()
|
|
|
|
|
Thanks, I used the following code
HANDLE hHandle;
DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &hHandle, PROCESS_ALL_ACCESS | STANDARD_RIGHTS_REQUIRED |THREAD_ALL_ACCESS, FALSE,NULL);
CloseHandle(hHandle);
That worked...
|
|
|
|
|
The 0xff thing is correct as in the doc however u may want to use the PID instead i.e. GetCurrentProcessId()
Until the process terminates, the process identifier uniquely identifies the process throughout the system
|
|
|
|
|
That´s true, but as far as I Know (read) you can not terminate or kill a process with the PricossID, just with the Process handle.
But any way, I ´ve solved that problem, know I have to change the Token on NT/XP/2000 system to Terminate/Kill the process, and Shutdown or reboot, and the MSDN is not very helpfull at all
|
|
|
|
|
I have a program (like a virtual keypad) which I wpould like to inject typed things into another process. What I have works if the program that gets it is the main window (like notepad etc). However, if I want to send things to a control like edit box INSIDE the window, I know that the window gets the message but the edit box does not.
This is due to the fact I get the HWND to the window of the target windo as
HWND wnd =::GetForegroundWindow()
Thus I tried to do this:
CWnd* pWnd = FromHandle(wnd);
CWnd* pFoc = pWnd->GetFocus();
I then use pFoc->m_hWnd in the AttachTHreadINput call
What is wrong here. I get some can not read from loc ??? error. What would I need to do to get the HWND to the actual control inside the window that has the focus FROM another program?
THanks for any advise.
|
|
|
|
|
Before I setup the Printer Setup dialog I wanted to set the paper size and orientation ect.
What I did was:
CPrintDialog PDlg(TRUE);
GlobalAlloc(GMEM_MEVABLE, sizeof(DEVMODE));
DEVMODE* pDevMode = (DEVMODE*) GlobalLock(PDlg.m_pd.hDevMode);
pDevMode-> ...
...
GlobalUnlock(PDlg.m_pd.hDevMode);
PDlg.DoModal();
According to MSDN this should be enough to initialize things before the call to DoModal, right?
Thanks for any suggestions.
|
|
|
|
|
I'm interested to know what version control ppl use at work. I'm currently evaluating visual sourcesafe with sourceoffsite for distributed team collaboration on code and also cvs on a linux machine with windows gui clients. One is free and the other is not but has anyone had any experiences with both or use something else?
|
|
|
|
|
We use SourceSafe and SourceOffsite here. biut I'm afraid I've got no experience of CVS.
This topic has been discussed pretty extensively in the Lounge, so I'd suggest a quick trail through the posts (don't worry, there's only 77,000 of them ) would be a good starting point.
Just try setting the filter to "SourceSafe" or "version control" and you'll find plenty of information.
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|