|
Ah! Thanks!
Appreciate your help,
ns
|
|
|
|
|
I've been doing COM/DCOM for several years now but not a lot with windowing
or controls. I want to create an executable that behaves as follows:
1. Singleton process that is a window (dialog would be fine) that can be
launched from another app (toolbar). Currently we use this paradigm with
VB components but want to do this one in C++.
2. This main window will contain a dynamic number of buttons that when
pressed will display a modeless dialog that contains some static data (i.e.
no user interaction other than close).
3. The buttons in the main window contain both text and a bitmap. These
buttons are updateable (i.e the text and bitmaps change) when certain
underlying statuses change.
Right now I have this prototyped in MFC with a main app window. The
buttons are subclassed CButtons and I create as many as I need when the app
starts. The buttons are ID'd so when the user presses it I know which type
of dialog to open. The real problem is how to wrapper all this in COM so
that this app can be created/started once via COM and then handle the
windowing/controls. I guess I'm more comfortable with MFC and not used to
CDialogImpl and the like. Anyone got any pointers or examples to start
from? Thanks!
|
|
|
|
|
(1)How can i use a dll in VC++ which is designed or written in VB ??
please help me as soon as possible.
it is very urgent for my project.
Thank- You
sukhdeep
|
|
|
|
|
kulsukh wrote:
(1)How can i use a dll in VC++ which is designed or written in VB ??
Search the documentation for IDispatch.
|
|
|
|
|
you might be able to import the DLLs typelib. this will create a C++ wrapper class for any objects exported by the VB DLL, using _com_ptr .
look into the "#import" directive.
-c
Image tools: ThumbNailer, Bobber, TIFFAssembler
|
|
|
|
|
Does anyone know of a tutorial that will step me through how to use this class. I've found several that show how to use a class they created. I want to know how to use this class.
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
www.codeguru.com has a lot of mini-articles that show you how to do specific things with a CTreeCtrl. very handy for beginners (or old-timers who just forgot how to use that beast).
-c
Image tools: ThumbNailer, Bobber, TIFFAssembler
|
|
|
|
|
is it possible to read a hidden or minimized window into a bitmap?
Thanks to you all;)
|
|
|
|
|
|
Hello,
can anybody help me please?
Unfortunately I do have a problem with my FormView Frame Window. The Frame window shows always "unknown" as title name and I want to change it to a specific name, but without opening any document or creating any document.
Many Thanks
|
|
|
|
|
Look at overiding: CChildFrame::OnUpdateFrameTitle() and CMainFrame::OnUpdateFrameTitle()
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Another solution is UpdateFrameTitleForDocument().
Kuphryn
|
|
|
|
|
hy, i would like to make a toolbar in my mfc-app, that looks like the one from office 2003!
(pix: http://www.zdnet.com/supercenter/stories/review/0,12070,561909,00.html)
any idea how to do that??
thanx,cheers
|
|
|
|
|
Can someone explain to me exactly what an owner drawn listbox is? Is it like a button where you have full control of what it looks like and you use a bitmap, or is it just a box like the regular listbox where the contents are drawn by you? I am looking to create something where the "listbox" can have any shape and same goes for the scroll bar (Win32) because I am skinning my app. Can someone point me in the right direction concerning this issue?
|
|
|
|
|
An owner drawn list box allows you to customize the drawing of each entry. If you want to radically change the shape and appearance, you might want to derive from CWnd instead.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
In an owner drawn list box you can draw the items yourself. The CListBox class has several overridable methods such as DrawItem() - to draw each item in the list box, MeasureItem() - to get the height of each item if they are variable height, and CompareItem() - to sort the items in the list box.
You have pretty much full control over the client area of the list box, but AFAIK not the scroll bar.
Note that if you are using the Win32 API directly (not MFC), then DrawItem, MeasureItem, and CompareItem are actually sent as messages to the parent window.
Dave
|
|
|
|
|
I want to show an html-help file (*.chm) from my application when the user
press the F1 button but without using the HtmlHelp API..
This is the code I’m currently using:
void CMainFrame::WinHelp(DWORD dwData, UINT nCmd)
{
LPCSTR lpHelp = AfxGetApp()->m_pszHelpFilePath;
ShellExecute(NULL,
"open",
lpHelp,
NULL,
NULL,
SW_SHOWNORMAL);
}
This code launches my *.chm file, but it does it TWICE so I get two
instances of the same *.chm file.
Any idea?
TIA,
Carlos
|
|
|
|
|
Are you sure your function isn't being called twice? I would just use the HtmlHelp API!
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Yep, that was the problem, the function was called twice. I know that HtmlHelp API would be a better option but in my particular case I wanted to use ShellExecute.
Thanks
Carlos
|
|
|
|
|
Juan Carlos Cobas wrote:
Yep, that was the problem, the function was called twice.
You really should have thought of that yourself.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Neville Franks wrote:
You really should have thought of that yourself.
It's been a really hard day, I was mentally blocked
|
|
|
|
|
Juan Carlos Cobas wrote:
It's been a really hard day, I was mentally blocked
Happens to the best of us.;)
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Hello,
Is it possible to create a UI type thread that will live on it's own even after the main application closes? (I have a feeling the answer is no)..
The reason:
I have a server application and right before it closes I spawn a thread that connects to other server apps and tells them that it's going off line. This process can take up to 30 seconds and I don't want to have the application hang around for 30 seconds after the user tries to close it. I would like the one thread to live long enough to communicate with the other servers and then destroy it's self. Any ideas?
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Can you application simply close its windows immediatly and stay invisible until all your clients have been signaled, so that the user does not notice that its application has not really closed but instead does its cleaning up in the background?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Thats what I'm doing right now. But I kinda wanted to get away from that.. I'm afraid that if the user issues a shutdown or reboot it will say that my program is not responding etc. Maybe I'm just being anal
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|