|
Its a predefined class for the component panel in borlands c++.
Using the package concept, we can create a customized component from the predefined components.
So need to know how this can be used in vc++?
zari
|
|
|
|
|
I don't think a lot of people here knows borland so it is always better to describe exactly what you need instead of something like X.
Your post is still very unclear. What is a component panel, what is a package concept ?
I suppose it has something to do with the controls (buttons, edit box, list control, ...). Am I wrong ?
Do you know the MFC ? Is that what you are looking for ?
|
|
|
|
|
Package is nothing but a dll.Through package v can add the already existing component (ex) TPanel.
Using this as a base class i can create a userdefined class that can customize the component TPanel.
And after customizing its been registered to the toolbar of borlands c++ builder.
By COMPILING AND INSTALLING the package.
There is no such type of Panel itself in vc++.
So asking for is that panel available else wats the alternative?
zari
|
|
|
|
|
zareee wrote: And after customizing its been registered to the toolbar of borlands c++ builder.
By COMPILING AND INSTALLING the package.
Sounds almost like your looking for imformation on COM Introduction to COM - What It Is and How to Use It.[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi all,
How do i intialize a pointer variable ?
|
|
|
|
|
What exactly do you mean? You can initialize a pointer using the keyword new , or you can set it to point at some already allocated memory.
|
|
|
|
|
void* pVoid = NULL;
char* pChar = NULL;
int* pInt = NULL;
...
|
|
|
|
|
We are a bit confused in your post
char* pBuff = 0; // Initialize the pointer with 0
pBuff = new char[10]; // Allocate memory for a character array of size 10
if( 0 == pBuff )
{
// Failed to allocate memory
}
else
{
// Allocation successfull
}
Rinu Raj
|
|
|
|
|
Can you be more specific.
|
|
|
|
|
Does anyone know if VS 2005 Remote Debugging can work across the internet?
I have a client who is many hundreds of miles away, and it would be wonderful if I could run a debugger on his copy of the program that I wrote for him.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: Does anyone know if VS 2005 Remote Debugging can work across the internet?
Scratch’s chin, hmm have you tried over VPN? I wouldn’t see how it would be possible other wise, as that means completely exposing a box to the wild internet and everyone else.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
|
You could try the WM_ERASEBKGND handler.
Steve
|
|
|
|
|
|
Yeah, it works.
But the bmp must be an external file, what if I want to load a resource?.
I look into your CPintureWindow::Load() function and you always wait for a file path. Is there a chance to change this?, (maybe adding an overloaded Load() function receiving a ID resource).
I could load the bitmap resource and then create the bmp file in some folder and use that path, but I don't like all this stuff.
Beside that, your CPictureWindow is very usefull, really, it's simple and great!.
Thank you very much.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Did you try WM_ERASEBKGND what happens?
|
|
|
|
|
|
I glad you find your answer.
|
|
|
|
|
Hi,
After creating a button for a toolbar on the OnCreate msg handler, I need to include a bitmap to the ie toolbar. However, after receiving a WM_PAINT message, the button disappears, even if I do nothing inside the OnPaint msg handler, like:
<br />
<br />
LRESULT CMFToolbar::OnPaint(UINT uMsg,WPARAM wParam, LPARAM lParam, BOOL& bHandled)<br />
{<br />
::OutputDebugString("WM_PAINT");<br />
<br />
PAINTSTRUCT ps;<br />
<br />
HDC hdc = ::BeginPaint(m_hWnd,&ps);<br />
::EndPaint(m_hWnd,&ps);<br />
<br />
return 0;<br />
<br />
}<br />
and I just can't make it appear again, but it is still there, it is "clickable", but not visible.
Anyone???
|
|
|
|
|
Are you really using MFC...?
--
The Show That Watches Back
|
|
|
|
|
IS your erase background message also being called ? What if you invalidate the button in your paint handler ( although that should happen by itself ) ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I tried
<br />
::InvalidateRect(m_hWnd,&btnRect,TRUE);<br />
inside the OnPaint and just before the
<br />
HDC hdc = ::BeginPaint(m_hWnd,&ps);<br />
but the button is still not showing. I also tried, inside the HDC hdc = ::BeginPaint(m_hWnd,&ps); setting the background to TRANSPARENT, but...
The button is created inside OnCreate with
<br />
TBBUTTON Button;<br />
ZeroMemory((void*)&Button, sizeof(TBBUTTON));<br />
Button.idCommand = IDM_GETQUOTE;<br />
Button.fsState = TBSTATE_ENABLED;<br />
Button.fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT;<br />
Button.dwData = 0;<br />
Button.iString = iIndex;<br />
Button.iBitmap = 0;<br />
::SendMessage(m_hWnd, TB_INSERTBUTTON, 0, (LPARAM)&Button);<br />
I also tried, inside OnPaint to send a message
<br />
::SendMessage(m_hWnd, TB_HIDEBUTTON, 0, (LPARAM)FALSE);<br />
but...
|
|
|
|
|
Hi,
I managed to make the button appear, but I had to make it HIDDEN and then UNHIDE it, with the following code:
<br />
LRESULT CMFToolbar::OnPaint(UINT uMsg,WPARAM wParam, LPARAM lParam, BOOL& bHandled)<br />
{<br />
::OutputDebugString("WM_PAINT");<br />
<br />
PAINTSTRUCT ps;<br />
<br />
bHandled = FALSE;<br />
::SendMessage(m_hWnd, TB_HIDEBUTTON, IDM_GETQUOTE, (LPARAM)TRUE);<br />
<br />
HDC hdc = ::BeginPaint(m_hWnd,&ps);<br />
::SendMessage(m_hWnd, TB_HIDEBUTTON, IDM_GETQUOTE, (LPARAM)FALSE);<br />
HDC hdcMem=::CreateCompatibleDC(NULL);<br />
<br />
HBITMAP hBitMem = SelectBitmap(hdcMem,hBitmap);<br />
<br />
BITMAP bm;<br />
<br />
GetObject((HGDIOBJ)hBitmap,sizeof(bm),&bm);<br />
<br />
BitBlt(hdc,0,0,bm.bmWidth,bm.bmHeight,hdcMem,0,0,SRCCOPY);<br />
<br />
SelectBitmap(hdcMem,hBitMem);<br />
<br />
DeleteDC(hdcMem);<br />
::EndPaint(m_hWnd,&ps);<br />
return 0;<br />
but, like this, the bitmap disappears. However, if I comment the line
<br />
::SendMessage(m_hWnd, TB_HIDEBUTTON, IDM_GETQUOTE, (LPARAM)FALSE);<br />
then the bitmap appears but the button disappears... how confusing is this??
|
|
|
|
|
This is overkill, and likely to cause problems. Don't go that way.
|
|
|
|
|
mfranco_neto wrote: HDC hdc = ::BeginPaint(m_hWnd,&ps);
BeginPaint() erases the update region. So unless your window class is set up to clip child windows, you'll draw over them (though they should subsequently be getting their own WM_PAINT messages).
See:
BeginPaint()[^] - MSDN.
Guide to Win32 Paint[^] - Paul Watt
|
|
|
|
|