|
Thanks Christian!
One question: When do you sleep?
When I take a look on the CP forums, there is no question you don't post an answer!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
What's sleep ? I have young children.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
You must free it...
<br />
HBITMAP hOld = myStatic.SetBitmap(::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP1)) );<br />
<br />
if (hOld)<br />
{<br />
DeleteObject(hOld);<br />
}<br />
Hope this helps...
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello Folks,
I Have a problem of painting the border window that appears when a tool-bar is in floating state.
How can i achieve this ?. I tried by creating an object of CTOOLBAR derived class.,so there's no need of subclassing.
And in the MainFrame Class ,i processed the wm_paint message where i checked the myToolBarobj.isfloating() ..and performed the futher operation. .its working ... but what if i need to trap the paint message or I need to change the Wndproc ?
Pl help if any solution of any kind is availabe.
|
|
|
|
|
Hi,
Please tell me how to open browser in VC6.0..? I am displaying one url in my application I want that if I click that url it should open browser with the specified url...How to do that..Please help me.
Thanks in advance
|
|
|
|
|
ShellExecute a URL and the default browser will start.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
ShellExecute a URL and the default browser will start.
Exactly. If you need to handle your browser a little bit better, just use CreateProcess() . You may take a look at Mike's FAQ.
~RaGE();
|
|
|
|
|
ShellExecute worked...Thanks very much for the reply.
Prateeti
|
|
|
|
|
I want to draw on the ActiveX Control in Design Mode i.e
I placed a ActiveX control on the DialogBox, now i want to draw something on the control . How can i do this ?
Any help...
Thank you.
|
|
|
|
|
I think (not sure) it is not possible to draw on Antivex Control at design time. You can only draw on it after getting its Device Context through Coding.
|
|
|
|
|
Hi,
I'm unable to export a template class from an MFC based dll !
any ideas of how I can do it ?
Ciao
- Nilesh
|
|
|
|
|
Template classes are generated by their template arguments, they are in fact a little class factory. So I reckon you'll have trouble.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
You can export a template class as long as you force the compiler to create an instance of the class that you are trying to export. That is because a template is a compile time feature.
You can force the compiler to generate the code for a particular type of object by simply declaring a global variable of that particular type. But for each type you declare the size of your DLL will grow.
There is no way to export a template from a DLL, an retain the power that a template provides.
Would it simply be possible for you to distribute the header file with the template class in it instead?
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!
|
|
|
|
|
I once did what you are trying to do (for export to a non-C++ project), but as Paul mentioned, the benefits of templates are lost. One way is to create a non-templatised wrapper class, and wrap every single method so that it calls the template version. Make sure you inline everything to avoid extra call overhead. If you forget to wrap any methods, the compiler will not generate them at all. Of course, you will have to declare one specific type to be used with the exported class, hence the class will no longer be generic. You can create separate wrapper classes for different types, though your DLL will get rather large.
Cheers
|
|
|
|
|
Hi,
How can I get the position and dimension of my client area inside of my CFrameWnd without including the area of docked tool bars or status bars?
Thanks
|
|
|
|
|
The docked toolbars sit inside a child window, if you could find that, you could get it's size and subtract it from GetClientRect.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thank you Christian,
I tried that, but when the toolBar is docked, it seems that the dimensions obtained with GetClientRect don't match the docking area. Also if I have several toolBars I have to check each single toolBar's status (docked or floating) and then its dimensions. Also what happens if several toolBars dock together on more than one row?
|
|
|
|
|
The child window that holds the toolbars is called a CMiniDockFrameWnd. You need to find those, and grab their dimensions, I think. Or create a View, maximise it, and get IT'S dimensions.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thanks again Christian,
I guess I'll be able to do it with that!
|
|
|
|
|
There is a CWnd member called RepositionBars. You can call it like this:
CRect a_oRealClientArea( 0, 0, 0, 0 );
pYourFrameWnd->RepositionBars( AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, CWnd::reposQuery, &a_oRealClientArea, NULL, FALSE );
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
That's just perfect Chris, thanks a lot
It is working very nicely now
|
|
|
|
|
No problem, I'm glad to hear it's working!
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
hi..
Is there any function in vc++ for getting the harddisk serial number ?. Can anyone help me..pls it's urgent
|
|
|
|
|
Use the GetVolumeInformation API function!
Daniel
---------------------------
Never change a running system!
|
|
|
|