|
Hello,
It looks good to me, the only thing I can think of is maybe crTransparent doesn't equal the color your trying to make transparent..
In MSDN it says the following:
int Add( CBitmap* pbmImage, COLORREF crMask );
pbmImage
Pointer to the bitmap containing the image or images. The number of images is inferred from the width of the bitmap.
crMask
Color used to generate the mask. Each pixel of this color in the given bitmap is changed to black and the corresponding bit in the mask is set to one.
I usually set crMask equal to "RGB(255,0,255)" and make sure every pixel that I want to show transparent is RGB(255,0,255) in color..
Hope this helps..
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hello,
This is kind of a strange question.. When you have an app open or minimized you can see the button on the taskbar associated with the application.. Is there any way to change the title of the button on the task bar with out changing the title of the application??
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
This PC Mag utility[^] (with source code) may help you get at the items in the task bar. You should be able to rename the item without changing the title of the corresponding main window.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
One solution is SetWindowsText().
SetWindowText();
ModifyStyle(WS_CAPTION, WS_SYSMENU, SWP_FRAMECHANGED);
Kuphryn
|
|
|
|
|
Please if any one of you can tell me
Can I block any packet using winsock API?
If yes then How refer any helping material.
__________________
Knowledge is Power
|
|
|
|
|
depends what you expect under "block a packet".
|
|
|
|
|
summo wrote:
Can I block any packet using winsock API?
No.
|
|
|
|
|
I download the demo project from
http://www.codeproject.com/gdi/pxalphablend.asp?target=alpha
but control on alphablended dialog all disappear? what's worng?
|
|
|
|
|
Post a message on the board at the bottom of the article itself - that way the article author gets sent an e-mail, and may be able to help.
Dave
|
|
|
|
|
I'm stepping through the list of filenames retrieved fron the filedialog using GetNextPathName and GetStartPos, and for some reason it starts with the last file I selected (I'm doing a shift - click to select multiple files). Is this the expected behavior? THe order of selection is important to my app so I am wondering why it si starting from the last file selected....?
Appreciate your help,
ns
|
|
|
|
|
The first filename returned is the one that had the focus rect in the list, which will be the last name you clicked on.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Which comes first, the bug or the stress?" -- Chris Maunder
|
|
|
|
|
Ah I see. MAny thanks!
ns
|
|
|
|
|
I want to display a message box when the user closes the main view of a MDI framework, in order to let him know that every other view will be closed.
What method of the CScrollView derived class have I to ovveride?
Ive tried with OnDestroy, but I've seen that it's called after the window has been removed form the screen.
The OnClose method seems not to be called, as I've place a breakpoint in it.
Thanks!
|
|
|
|
|
I believe you need to handle OnCloseDocument() from with in the document not the view..
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I don't think so, because I ant to check if I'm closing the main window, while other windows are still open. If I close the main view over a document, every other associated view must be closed.
|
|
|
|
|
When you say main window or view do you mean the whole application or just the active view in the application? I guess im not sure we are talking about the same thing.
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Handle CMainframe::ID_FILE_CLOSE.
|
|
|
|
|
Override CDocument::CanCloseFrame() and return TRUE/FALSE if it's ok/not ok to close the frame window.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Which comes first, the bug or the stress?" -- Chris Maunder
|
|
|
|
|
Hi,
I using CListCtrl (VC++6.0) for a list of information, I do not have any problem to use the Mouse (or Right Click) to get information of a specific row ... by using:
<br />
int sel = m_browseW.GetNextItem (-1, LVNI_SELECTED);<br />
*) But when I use the Up/Down Keyboard (the 'highlite row' shift Up/DOWN) then I do not know which command I can try to read the new 'specific row'
Anyone can help?
Many thanks
|
|
|
|
|
Loop through the list and check the state of each row:
for (int iItem = 0, nItemCount = m_browseW.GetItemCount(); iItem < nItemCount; iItem++)
{
if (m_browseW.GetItemState(iItem, LVIS_SELECTED) & LVIS_SELECTED)
{
}
}
Regards,
Alvaro
That which does not kill me postpones the inevitable. -- despair.com
|
|
|
|
|
Hi,
I will try immediately!
Many thanks,
|
|
|
|
|
Hi,All
The following code giving me an error while running in Release Mode.
I tested this code under
Windows2000 professional,VC++6.0.
CMyDlg::OnButton()
{
BYTE byByteCmd;
CString strTemp;
char szVal[10];
szVal[0]='\0';
sprintf(szVal,"%d",1);
sscanf(szVal,"%X",&byByteCmd);
}
can any one tell me what is wrong with this code.
My observations:
1.If i commented CString strTemp---It is not giving any error
2.If this code running under Debug Mode--it is not giving any error
3.If this code running under Release Mode with TRy CATCH--it is not giving any error
TRY
{
BYTE byByteCmd;
CString strTemp;
char szVal[10];
szVal[0]='\0';
sprintf(szVal,"%d",1);
sscanf(szVal,"%X",&byByteCmd);
}
CATCH(CExPetion,expGen)
{
char szError[100];
exGen->GetErrorMessage(szError,100);
exGen->Delete();
}
END_CATCH
I am happiest man,If some one explain me step by step with this observations, why it is giving error in some conditions and not in another conditoions.
Thank in Advance
anju
|
|
|
|
|
try the following:
anju wrote:
char szVal[20];
|
|
|
|
|
Hi Alexo,
There is nothing in it r u Missed?
anju
|
|
|
|
|
Instead of sscanf(szVal,"%X",&byByteCmd); why not use atol() ?
What I think your code is doing is that you are reading an int value (%X) into a BYTE variable and overwriting the next location(s) in memory
you could try using %c
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|