|
in OnPaint function
void CTest::OnPaint()
{
CPaintDC dc(this);
DrawPreview(&dc);
}
|
|
|
|
|
As far as i can say, your code does exactly what you told it to do, it will draw the picture and only that picture which you selected using the radio buttons. However, i believe what you actually want is to draw all 4 images in your DrawPreview, not only the one that the radio selection indicates, right. So instead of checking that id of yours do -for example- a for loop that draws all 4 pictures if they are there. For example:
void CTest::DrawPreview(CDC *pDC)
{
UINT PicCtrlIDs[] = {IDC_Picture1, IDC_Picture2, IDC_Picture3, IDC_Picture4};
for (int i = 0; i < 4; i++)
if (m_pImg[i])
{
CWnd *PicControl = GetDlgCtrlItem(PicCtrlIDs[i]);
...
..
}
}
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
Your help me a lot Code-o-mat, now my picture control can show all the image already.Thank you
|
|
|
|
|
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
DevelopmentNoob wrote: Now i got 4 picture control and 4 button in 1 dialog. I can load the image into picture control, but when i load the second picture, the 1st image will disappear. How to make it fix to there?
How could we remotely guess what kind of code produces such annoying result?
In other words, without code is very hard helping you.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
im creating combobox ctrl Thru code but not from resource...and Pls let me know how can i increase the height of the ctrl based on the font...ie if the font is small ctrl should be small else if the Font is bigger Ctrl should increase....
|
|
|
|
|
You can do this by getting the combo box's font (GetFont/WM_GETFONT), calculating the height of the font (GetTextMetrics) and then changing the height of the control (SetWindowPos).
1300 calories of pure beef goodness can't be wrong!
|
|
|
|
|
Thanks for ur reply...
but the issue is i need to set the Combobox font and height based on the CFont* which i get from some other function which we are using internally ....
and even i tried doing SetFont for that Ctrl...but it doesn"t helped me...
|
|
|
|
|
The combo box has an edit control and a list control associated with it so you will need to change the font for those controls as well. You can retrieve a handle to these child controls with a call to GetComboBoxInfo().
1300 calories of pure beef goodness can't be wrong!
|
|
|
|
|
ya im able to get the hwnd to both Editbox and listCtrl but...how can i setfont for the obtained handles....
|
|
|
|
|
Hello Friends
I creatd application in which i m creating a thuumnail using HBITMAP .
Now I want to Insert a small Image(Logo) on that Bitmap that i creatd using HBITMAP.
I m able to write text on that using TextOut but how i can insert image on that?
Thanks in advance
Yogesh
|
|
|
|
|
Look at BitBlt or StretchBlt.
Basically, you create two DCs and select the source and destination bitmaps into each on and Blt away.
|
|
|
|
|
Ya,I got it already.thanks anyway for ur help.
|
|
|
|
|
Hi,
i need source code on how to check whether a new picture has upload in the folder.
the source code have to be in VB.
Thanks
|
|
|
|
|
monitor a folder in Win32 programme.
There are two windows API : FindFirstChangeNotification and ReadDirectoryChangesW.
it's my pleasure to make friend with you.
|
|
|
|
|
i doing in visual studio 2005. Can you write the whole code for me. Thanks alot
|
|
|
|
|
ok,tell me your email, i will send you soon.
it's my pleasure to make friend with you.
|
|
|
|
|
|
but i need the source code in VB
|
|
|
|
|
pearllyn wrote: but i need the source code in VB
Then you should be asking your question in the Visual Basic Forum[^]
1300 calories of pure beef goodness can't be wrong!
|
|
|
|
|
pearllyn wrote: the source code have to be in VB.
So why are you asking here?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I want to list all the installed programs like control panel Add/Remove programs. I know all the items would be list in the registry path:
'HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall'.
But, the problem is, there would be too many items if I enumerate the key, all system update packages and other small applets included,too. I only need basic information of the installed programs like control panel do, how to do that?
Thanks
|
|
|
|
|
Please check this article, it will be useful
<a href="http://www.codeproject.com/KB/system/installed_programs.aspx">How to get a list of installed applications</a>[<a href="http://www.codeproject.com/KB/system/installed_programs.aspx" target="_blank" title="New Window">^</a>]
This article to doing the same, only you can filter those which you dont want.
Величие не Бога может быть недооценена.
|
|
|
|
|
Thanks for your reply.
But it still list all the programs installed on the system, updates, addons included.
|
|
|
|
|
kcynic wrote: I want to list all the installed programs like control panel Add/Remove programs. I know all the items would be list in the registry path:
'HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall'.
What you want is just not possible. Windows does not know about all programs that you have installed (especially the older ones), only the ones that have gone the "standard" route and updated the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|