|
I have defined inside the DLL a common global variable to store the time (time_t). Well, inside the hook CBTProc i read always a value of 0 from the variable and out of the DLL i can read it correctly (with a function that return it).
What's wrong?
Please help me and thanks in advance.
|
|
|
|
|
Probably you forgot to place global variable into a shared data section. BTW: how are you accessing this variable 'outside the DLL'?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I'm new to MFC programming but I'm slowly learning!
I'm writing a program that minimizes to the systray, I can minimize from the menubar but not from the minimize button in the upper right corner!
What message is sent when that button is pushed and where am I supposed to catch it?
Eyses
|
|
|
|
|
Use CMainFrame::OnSize
if (nType == SIZE_MINIMIZED)
//Handle the minimized window
else
//don't do anything.
Good luck,
Frank
|
|
|
|
|
I'm working on a project in BC++B5 and up until now when compiled the output application is named wb.exe. I want to change what the executable name is when compiled. Any ideas?
Aaron
|
|
|
|
|
If C++ Builder 5.0 is the same as 1.0 which I used. The Project Name is the name of the executable.
if your project is myprj.mak
the executable name is myprj.exe
|
|
|
|
|
They no longer use *.mak, it is now *.bpr for your project. Good idea, but I've tried that already and it doesn't work.
Thanks,
Aaron
|
|
|
|
|
Try renaming the project using "Save Project As..." (from the File Menu if this has not changed since C++ Builder 4.0).
Philippe Mori
|
|
|
|
|
That worked, I knew it was something stupid... Thanks a lot.
Aaron
|
|
|
|
|
I'm not a big Borland user so let me understand. You can't change the name of the generated exe or dll without changing the entire project name?
|
|
|
|
|
I Send the WM_QUIT message in order to kill the internet explorer window and it doesnt work.
How do I do it?
Thanks in advance
|
|
|
|
|
|
Hi,
How to remove the close button(the one on the upper right)
from a dialog? thanks.
p.c.
|
|
|
|
|
Lose the WS_SYSMENU style on your dialog. In dialog editor, uncheck the System Menu option.
|
|
|
|
|
Hi
I wrote an IIS inprocess component. In this commponent I traying get file from other computer in my NT domain, but I don't have privileges (my IIS doesn't have ).
Enybody know, how to open file with other security context (I have user name and password in my NT domain)?
Thx 4 hlp
Ryszard:
|
|
|
|
|
|
Hi
I have a HWND to a checkbox which i would like to hide.
But executing :
::ShowWindow(m_CheckBox,SW_HIDE);
Has no effect, anyone know where i am going wrong.
Cheers
Richard
|
|
|
|
|
What is m_CheckBox? Is it a control or a member variable?
If it is a control then:
m_CheckBox.ShowWindow(SW_HIDE);
should work.
(2b || !2b)
|
|
|
|
|
Hello.
Is possible to know when another window outside of our app has been open or is about to open?.
Thanks in advance
|
|
|
|
|
|
Is there a way to create a disabled image from an image in a CImageList?
(It's not an image list for a toolbar).
Derek.
|
|
|
|
|
DrawState with DSS_DISABLED should be OK. Note that this function operates on a device context, you'll need to copy the imagelist into a bitmap, call DrawState, then copy back.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Sorry if this is a stupid question but how do I get an image in the image list into a bitmap. I had a look at the interface for image list and couldn't see anything like that
Derek - Salamander Software Ltd.
|
|
|
|
|
How do you initialize your imagelist? Is it one wide bitmap stored as resource, or something else?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks for helping me out with this. The situation is this:
I am in the middle of doing an owner-drawn button that I want to allow bitmaps or icons to be added, which I can do by adding either to a CImageList. The problem so far is the disabled image. I have two functions which are illustrated below. The first is for adding the bitmap, which works for standard and disabled images and the second which works for the standard image but requires the addition of the disabled image. I apologise if the code is a bit spaghetti, but I am working towards having the ability if having multiple images set, but I'm not there yet
BOOL SSLButtonEx::SetButtonBitmap(UINT nResourceID, COLORREF crMask) {
BOOL bReturn = m_bmpImage.LoadBitmap (nResourceID);
if (TRUE == bReturn) {
m_bmpImage.GetObject (sizeof m_bmp, &m_bmp);
m_nImageWidth = m_bmp.bmWidth;
m_nImageHeight = m_bmp.bmHeight;
bReturn = m_imageList.Create (nResourceID, m_bmp.bmWidth, 1, crMask);
if (TRUE == bReturn) {
if (m_imageList.Add (&m_bmpImage, crMask) > -1) {
m_bImageLoaded = TRUE;
}
else {
m_bImageLoaded = FALSE;
}
m_crMask = crMask;
HBITMAP bmpTemp;
COLORMAP mapColour;
mapColour.from = crMask;
mapColour.to = RGB(255,255,255);
bmpTemp = (HBITMAP)::CreateMappedBitmap (AfxGetApp()->m_hInstance,
nResourceID, IMAGE_BITMAP, &mapColour, 1);
m_hbmpDisabled = (HBITMAP)::CopyImage(bmpTemp, IMAGE_BITMAP,
m_nImageWidth, m_nImageHeight, LR_COPYDELETEORG);
}
else {
m_bImageLoaded = FALSE;
}
}
return bReturn;
}
BOOL SSLButtonEx::SetButtonIcon(UINT nResourceID, COLORREF crMask) {
BOOL bReturn = FALSE;
HINSTANCE hInstance = AfxFindResourceHandle (MAKEINTRESOURCE (nResourceID), RT_GROUP_ICON);
m_hIcon = (HICON)::LoadImage (hInstance, MAKEINTRESOURCE (nResourceID), IMAGE_ICON, 0, 0, 0);
if (NULL != m_hIcon) {
m_crMask = crMask;
ICONINFO iconInfo;
ZeroMemory (&iconInfo, sizeof (ICONINFO));
bReturn = ::GetIconInfo (m_hIcon, &iconInfo);
if (TRUE == bReturn) {
m_nImageWidth = iconInfo.xHotspot * 2;
m_nImageHeight = iconInfo.yHotspot * 2;
::DeleteObject(iconInfo.hbmMask);
::DeleteObject(iconInfo.hbmColor);
bReturn = m_imageList.Create (m_nImageWidth, m_nImageHeight, ILC_COLOR32 | ILC_MASK, 1, 1);
if (TRUE == bReturn) {
if (m_imageList.Add (m_hIcon) > -1) {
m_bImageLoaded = TRUE;
}
else {
m_bImageLoaded = FALSE;
}
}
}
}
return bReturn;
}
|
|
|
|