|
Hi all
I have a group of buttons in a dialog resource . I want them to appear behind a bitmap . When the bitmap is loaded with LoadBitmap() and when WM_PAINT is not defined then the buttons are invible but they work when we click on the bitmap . Problem comes when I stretch the bitmap by calling StretchBlt() in WM_PAINT . This time the buttons appear above the bitmap !
I tried calling ShowWindow(hButton,SW_HIDE); But this call disables the button itself .
So I tried calling EnableWindow(hButton,TRUE); to enable it in invisible mode - but to my surprise this call also does not enable the button ...I do not know what I am missing ...
Can anyone tell me pls ?
redindian
|
|
|
|
|
This must be the weirdest thing i heard, why do all this, why don't you handle the dialog's OnLButtonDown and define some rectanges ...
...OnLButtonDown(...)
{
.....
if(m_rcArea2.PtInRect(&pt))
OnArea2();
}
something like that.
If you think you can than you can, if you think you can't you are right.
|
|
|
|
|
can anyone help in using the Slider control in win32. I have the handle of the dailog item. I mean The slider control on dialog. and now I want to do SetRange and SetPos.
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
To set range:
BOOL fRedraw = TRUE;
WORD Min = 0;
WORD Max = 100;
SendMessage(hwndTrackbar, TBM_SETRANGE, (WPARAM)fRedraw, (LPARAM)MAKELONG(Min,Max));
To set position:
BOOL fRedraw = TRUE;
LONG Position = 50;
SendMessage(hwndTrackbar, TBM_SETPOS, (WPARAM)fRedraw, (LPARAM)Position);
|
|
|
|
|
I wrote a timer function in which TextOut() fn draws currunt time on the dialog for every second. But the text background is becoming white.I want the background color to be remained as dialog color.
How to do this?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Rather try using the DrawText() function or if you want to use the TextOut() function use SetBKColor to change the background color of TextOut()
Artificial Intelligence is no match for Natural Stupidity
No one can understand the truth until he drinks of coffee's frothy goodness. ~Sheik Abd-al-Kadir
I can't always be wrong ... or can I?
|
|
|
|
|
You must set backcolor mode to TRANSPARENT : pDC->SetBkMode(TRANSPARENT);
but it will draw the text on the previous one, so you must erase prevoius one area each time you want to draw your new text(in your timer function).
For solving this problem one way is to use FillSolidRect() method to erase it, but first get your dialog color.
hope this helps
|
|
|
|
|
When i wanted to get the bkcolor of dialog using Getbkcolor() i could not get that gray color of default dialog box. How to get the color?
KIRAN PINJARLA
|
|
|
|
|
You can change color of background on WM_CTLCOLOR with SetBkColor for background and SetTextColor
|
|
|
|
|
You shouldn't be drawing only in a timer function as when the drawing is obscured and then exposed the text will not be redrawn until the next second. It’s ok to draw in a timer function but your WM_PAINT handler should also have code to draw the current time. More conventionally the timer function would only invalidate the region of the window which contains the text and all drawing done in the WM_PAINT handler.
Steve
|
|
|
|
|
Hi,
I am interested in creating an Automation Client similar to Outlook.
Outlook exposes the IDTExtensibility2 interface via which we can connect to Outlook and it also exposes methods and properties via which we can use Outlook's functionality. These methods and properties are in mso9.dll and msoutl9.olb.
Could someone explain how to go about creating my own IDTExtensibility2 Interface for my application and how do I separate the COM portion in a separate dll. Also, what is an .olb file. It it similar to a .tlb file?
Thanks.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
What's the maximum item count in 98. my need is to load 70000 items. it's fine 2000 and higher os. in 98 31,XXX is loaded. any one help me out.
thanks in advance!
Have A Nice Day!
Murali.M
|
|
|
|
|
Why you want to insert 70,000 to combobox ?
|
|
|
|
|
The number is 32767 (16 bit signed int maximum value).
Look at LB_INITSTORAGE Message in MSDN[^].
It refers to ListBoxes, but I think it also applies to ComboBoxes.
hope that helps
-- modified at 4:44 Saturday 6th January, 2007
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
You can't store 70000 items. (Anyway is impractical to let user choose from 70000 items in a combobox - that's a lot of unique keys by the way).
You may consider using a virtual listbox or virtual listview to store data.
Alternatively, you may consider usage a "view|scroll" mechanism to store and display (i.e. your combo will display only a part of data - view - that will scroll depending on what user does in combo); possibly a dictionary-oriented will do it, or using partitions of data. Good luck anyway.
Nuclear launch detected
|
|
|
|
|
The Maximum Number of Items you can store in a Combo box = 32767. This has nothing todo with WIN98, if it is the Not same in XP or 2000 etc that's a fluke. (Never had occasion to try it)! But Why that much Data! Think about Usability! If it is that large( Like for arguments sake, you are preparing an alphabetic Telephone List for the Entire World, you should carry out Pre-Selection, e.g.Country,County, Town, combined with Other Criteria.) NoOne is going to scroll up a list of 70000 entries. If at the other hand you consider it essential to have that nymber of entries, and if you are aware that it runs on those quoted systems, you specify same under 'Minimum System Requirements'
LateNightsInNewry
|
|
|
|
|
Hi,
I am using Winsock2.0 and as seen in help everywhere, for using SSL with it, the function 'setsockopt' can be used with certain flags SO_SECURE, SO_SEC_SSL etc.
But on WindowsXP, in header file Winsock2.h, there is nothing like these flags.
Can't I do SSL with Winsock2.0 on Visual Studio6.0
Is there any other way?
Regards
|
|
|
|
|
SSL isn't supported on Windows sockets.
You can use Security Support Provider Interface (SSPI)[^] for SSL,
although it doesn't come with windows (the SSL part I mean).
So, yes you can do it but it's not included with Windows.
Mark
|
|
|
|
|
Hi All,
As i installing the Image Magic Dynamic library of Binary release and i had create a vc++ project,which has one dialogbox with in one button like magick,when i clicked the button a below block of code will be execute...
void SampleDlg::Onmagick()
{
Image image;
try {
image.read( "c:\\girl.gif" );
image.write( "c:\\x.gif" );
}
catch( Exception &error_ )
{
MessageBox(error_.what());
}
}
I got one runtime error when the image.read() will be execute...
Unhandled exception at 0x10023955 in ImgPros.exe: 0xC0000005: Access violation writing location 0x78eed7c9.
Now i using visual studio 8.
Anyone knows the reason of this error help me..
Thankx more in advance....
-- modified at 0:48 Saturday 6th January, 2007
|
|
|
|
|
Are you sure you enter correct path and if you use of other files like bmp did you get this error?
|
|
|
|
|
Hi whitesky,
yah i am sure that just i read a .jpg image. I think here is the problem that is InitializeMagic() function.
why can we call this funtion and which path is send to this function as a parameter...
But one thing i had successfully run on the console application of win32, within the same code....
So, what is the real problem...please tell me...
|
|
|
|
|
I didnt use of this library but check return values of InitializeMagic
|
|
|
|
|
If you just want to read gif, jpg, etc, use GDI+, it's far less painful and far better documented.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sorry whitesky,
yah i am sure that just i read a .jpg image. I think here is the problem that is InitializeMagic() function.
why can we call this funtion and which path is send to this function as a parameter...
But one thing i had successfully run on the console application of win32, within the same code....
So, what is the real problem...please tell me...
|
|
|
|
|
Hey his name is Christian Graus not whitesky
|
|
|
|