|
Anil_vvs wrote: Can anyone indicate where the problem could be?
Your code is the problem.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
in my project, i splite Window into view Ctreeview and CView:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE;
CRect rect;
GetClientRect(&rect);
int mWidth=rect.Width();
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CTreeView), CSize(mWidth/4, 0), NULL))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CView), CSize(0, 0), NULL))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
return TRUE;
}
but i can't use functions of the tree Example:
void CMainFrame::OnTreeSelChange(NMHDR *pNMHDR, LRESULT* pResult)
{
LPNMTREEVIEW pTV = (LPNMTREEVIEW)pNMHDR;
AfxMessageBox(L"OnSelchangedTree ");
*pResult=0;
}
please! help me.
|
|
|
|
|
in my project, i splite Window into view Ctreeview and CView:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE;
CRect rect;
GetClientRect(&rect);
int mWidth=rect.Width();
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CTreeView), CSize(mWidth/4, 0), NULL))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CPropertyView), CSize(0, 0), NULL))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
return TRUE;
}
but i can't use functions of the tree Example:
void CMainFrame::OnTreeSelChange(NMHDR *pNMHDR, LRESULT* pResult)
{
LPNMTREEVIEW pTV = (LPNMTREEVIEW)pNMHDR;
AfxMessageBox(L"OnSelchangedTree ");
*pResult=0;
}
please! help me.
|
|
|
|
|
Hoping that you have add the message manually
plz check if you have added the statement
ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnTreeSelChange) in the messagemap?
Regards
Anil
|
|
|
|
|
I am using API SHGetFolderPath and mentioned
#include<shlobj.h> header file in stdafx.h
but it is showing me error
error C2065: 'SHGetFolderPath' : undeclared identifier
Pls help me .Thanx in advance
never say die
-- modified at 2:51 Monday 13th February, 2006
|
|
|
|
|
#define _WIN32_IE 0x0500 in stdafx.h
Owner drawn
Jesus Loves
|
|
|
|
|
In the header file shlobj.h this mentioned
#ifndef _WIN32_IE<br />
#define _WIN32_IE 0x0501<br />
#else<br />
#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)<br />
#error _WIN32_IE setting conflicts with _WIN32_WINNT setting<br />
#endif<br />
#endif
still i mentioned in the stdafx.h
#ifndef _WIN32_IE<br />
#define _WIN32_IE 0x0500<br />
#endif
include <shlobj.h>
but it is still showing me same error.Pls help me
never say die
-- modified at 4:08 Monday 13th February, 2006
|
|
|
|
|
Why are you defining _WIN32_IE twice.
Owner drawn
Jesus Loves
|
|
|
|
|
Thats why i used
#ifndef _WIN32_IE
Ok I remove it but it is showing me same error
#ifndef _WIN32_IE
#define _WIN32_IE 0x0500
#endif
Pls help me.Thanx in advance
never say die
-- modified at 4:11 Monday 13th February, 2006
|
|
|
|
|
It's working here fine.
Owner drawn
Jesus Loves
|
|
|
|
|
I am using it in a Console Win32 Application in VC 6.Is this troubling me.
never say die
-- modified at 4:34 Monday 13th February, 2006
|
|
|
|
|
|
sunit5 wrote: I am using API SHGetFolderPath and mentioned #include<shlobj.h> header file in stdafx.hbut it is showing me errorerror C2065: 'SHGetFolderPath' : undeclared identifier
Are you using Visual Studio 6 or .Net 2003
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
How we calculate the size of Jpeg image(not dimension),to recover the image if our system is formatted and the Original information about the size is Corrupted.
singhanshul
|
|
|
|
|
Whats the meaning of size?
|
|
|
|
|
Actually we want to find out the size of jpeg file in the compressed form.Because when we recover deleting JPEG file some time it is possible that the header cotaning information about size is cruptted then what we do in that case to calculate the size so we recover this jpeg file.
singhanshul
-- modified at 4:00 Tuesday 14th February, 2006
|
|
|
|
|
:|Hi all,
I want to know in an application the ID of the current mouse cursor at
any moment. I got the handle to the current cursor on server
machine and want to inform the client that cursor shape is changed
so that client can also reshape its mouse cursor.
Can i send the handle of the cursor on server to the client and
use that handle to reshape the cursor?
If not then how can i get the ID of the cursor from handle?
or any other way to do that.
Thanx
"Imagination is much more important than implementation"
|
|
|
|
|
What the <blank> are you talking about. The mouse cursor belong to no application, unless it has captured it. It belongs to the system. Therefore it does not have or require an ID.
INTP
Every thing is relative...
|
|
|
|
|
Hi,
I am coding for a project in which it is required that I draw circles of certain radius over a scanned map (saved as a bitmap) and then save the changed map.
I know how to display a bitmap. I also know how to make an independent drawing and save it as a bitmap. But how do I do both – open an existing bitmap, draw over it and then save it? Please give me some idea.
Thanks,
Tara
'Fortitudine Vincinues'
|
|
|
|
|
Hi
There are many ways to do. I am just giving one of the way. Don't know how efficient it is. Since a long back I left programming of bitmap.
any way lets try.
1. Create a CBitmap member;
2. Draw to DC as you are doing the image and the circle.
3. Explore the DrawState funtion of CDC class. i.e use this funtion to link between your DC and CBitmap.
4. Then convert the CBitmap to DIB.( you will get lots of article on net / CP )
5. Once you get hte DIB you won't have any problem to save it.
Regards
Anil
|
|
|
|
|
If you know how to do "...an independet drawing and save it as a bitmap". Then you already know the answer to your quesion.
Which bitmap are you saving? The one before you drew on it or the one after you drew on it.
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: Which bitmap are you saving? The one before you drew on it or the one after you drew on it.
Well, actually I learnt how to make a drawing on to a dialog box and then save the drawing as a bitmap from CodeProject. So I know how to save a drawing as bitmap.
What I want to do is:
1) Display a bitmap when the user opens it(ie. the user opens the bitmap eg. map of an industry)
2) Ask the user to click the mouse on a certain point on the bitmap
3) using that point(x and y coordinates), I do some calculations and get the correct radius.
4) Then I display to the user a circle of the calculated radius around that point on the map.
5) If the user selects 'save', I must save the whole thing i.e. the map with the circle on it, as a single bitmap.
I hope I am stating my problem clearly...
I tried creating a dc to hold the bitmap which the user opens and using the same dc, i tried to draw a circle on the bitmap... but it dosent work.
Your help will be highly appreciated. Thank you.
Tara
|
|
|
|
|
Try studing the
Memory bitmap class CMemBm[^]
The basic steps are:
1. Create a compatible DC. Lets call it memDC.
2. oldBitmap = Select your bitmap into memDC.
3. Draw on memDC.
4. Select oldBitmap into memDC.
The bitmap should now have whatever you drew on it. To test that it does, blit it to your client area.
If you drew on a bitmap, say using the mounse, in the client area. Then you need to get a copy of the bitmap from the client area. In order to do that you must know the client coordinates where the bitmap is located.
1. Create a compatible DC. Lets call it memDC.
2. Create a compatible bitmap, that is the same size as the area that you want to copy. Lets call it tempBitmap.
3. oldBitmap = Select your tempBitmap into memDC.
4. Bit blit the rectangular area from the client DC to the memDC.
5. Select oldBitmap into memDC.
6. Finish cleaning up.
Now tempBitmap should contain a copy that matches the area of the client you specified. To test it, just clear an area of the client and blit the tempBitamp there.
I hope that helps.
INTP
Every thing is relative...
|
|
|
|
|
Thanks John.
I am going to try it. Hope it takes me only few days and not weeks to finially get it. Bitmaps, somehow seem to be beyond my understanding...
Thanks again.
Thank you, Anil too for your suggestion.
Tara
Will get back soon..hopefully with an not with
|
|
|
|
|
Hello,
i need help for my final project...it is about generating thumbnails from images(pgm format) by half or by 2 or if possible generating thumbnails of size 75*75 pixels....if someone can give me code(in C++) or algorithm to scale images up and down....thx u in advance.
Amrita
|
|
|
|