|
http://www.codeproject.com/threads/memberthread.asp
(you can find it by right clicking and choosing view source
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Do you normally have troubles with hyperlinks in the CP forums? Can you right-click on it and select "Open in New Window" from the context menu?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Only at work. Even to get to CP I have to use 209.171.52.99 and navigating within cp is a nightmare too. Some problem only occurring with the cp site here.
|
|
|
|
|
I want to create an app with three CView derived classes similar to the default Visual C++ IDE ( I don't need complicated things like MDI's or tabbed controls or docking just yet). Is is necessary to create a static CSplitterWnd within another and can anybody give me any starters?
Thanks,
John
|
|
|
|
|
Worked this one out. I added a new class derived from CFrameWnd and put that inside the initial SplitterWindow. Then I had a second splitter inside the the CFrameWnd.
|
|
|
|
|
I’m going to create a shape-class containing a lot of flat polygon areas.
I will make it possible to subtract one shape from another and then I need an algorithm to se if two polygon-areas in the 3D-space crosses each other, and if in which line the crossing is.
I see there should bee some kind of linear algebra calculations but I do not really know how to start constructing my c++ shape classes.
_____________________________
...and justice for all
APe
|
|
|
|
|
Well, hail there again.
Why don't you stick to one thread?
Anyway, you sholdn't be a math "expert" to solve this one, but you have to know basics of geometry at least.
I'll give you solution for intersection bitween line and plane, the rest you can do yourself.
We have three points and a normal vector (N). The equation of a plane is Ax+By+Cz+D=0.
We have two points P1 and P2. The equation of a line is P(t)=P1+t*Pd where Pd=(P2-P1), t>0.
To determine if there is an intersection with the plane, substitute for P(t) into the plane equation and get A(P1x+t*Pdx)+B(P1y+t*Pdy)+C(P1z+t*Pdz)+D=0, which yields t = -(Dot(N,P1)+D)/Dot(N,Pd). Now find divisor Vd=Dot(N, Pd), if Vd=0 then the line is parallel to the plane and if Vd>0 then the normal N of the plane is pointing away from the ray (that can be useful for one-sided faces). Now we can find t, if t<0 then the line intersects the plane behind origin, i.e. no intersection of interest, otherwise we can put t in the equation of a line to find intersection point.
Enjoy.
|
|
|
|
|
va`Lery wrote:
Why don't you stick to one thread?
Well no excuses. I Rebuilded the question…
I’m not bad at either math or c++ but it’s the thing hat implement the algostuff into code that, for me is difficult. Small problems with both of them (math and c++) makes things hard for me.
Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
hi,
i have a text in an "unknown text encoding" and I need to extract all non ascii charachters from it; replace them with some ascii tags; do some processing and then; replace the original non ascii chars back.
*(non ascii charachters like japanese and chinese charachter sets)
well basically i have a vrml scenegraph and i need to render it using the open inventor renderer, which has problems with non ASCII charachters. so I am doing this ..
get the sceneData in memory as binary data
void *sceneData=<scenedata from="" file=""> ; scenedata(sizeof(filesize));
then read each BYTE from memory buffer;
check the ASCII value to each BYTE;
if outside ASCII range -> then replace it with a TAG.
ELSE copy as such;
NOW is this check a correct way to do it .. i mean do both the bytes of the multibyte charachters need to be outside the ASCII range ???
is there a better alternative way than this HACK !! please suggest !!
i am totally stuck
|
|
|
|
|
Well, my suggestion will be to forget about bytes and treat each character as unsigned short (WORD). In this case your character isn't ASCII if value bigger than 255 (or 127 if you want only latin chars).
|
|
|
|
|
How to Enumerate threads in Process?
(I need ausing it to enumarete windows create by some process,
using than EnumThreadWindows() )
I did not found such an API method...
Help please..
Or if sample exist - please provide link.
thanks.
|
|
|
|
|
use this little CODE
HANDLE SnapShot;<br />
PROCESSENTRY32 *ProcessList=new PROCESSENTRY32;<br />
<br />
<br />
SnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);<br />
if(SnapShot==INVALID_HANDLE_VALUE)<br />
{<br />
<br />
}<br />
<br />
<br />
if(Process32First(SnapShot, ProcessList) == FALSE) <br />
{<br />
<br />
CloseHandle(SnapShot);<br />
return FALSE;<br />
}<br />
<br />
<br />
while(1) {<br />
<br />
if(Process32Next(SnapShot, ProcessList) == FALSE) <br />
{<br />
<br />
if(GetLastError() != ERROR_NO_MORE_FILES) <br />
{<br />
<br />
CloseHandle(SnapShot);<br />
return TRUE;<br />
}<br />
else <br />
{<br />
CloseHandle(SnapShot);<br />
return TRUE;<br />
}<br />
}<br />
<br />
<br />
process.Add(ProcessList->szExeFile);<br />
PID.Add(ProcessList->th32ProcessID);<br />
<br />
}
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
See if this article is of any help.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Is there such a code:
How to make screenShot to file...
Or how to save CBitmap,or hBitmap to file ?
(to BMP or JPG)
thanks.
|
|
|
|
|
use
KeyBD_Event() to Fire VK_SNAPSHOT (resemble PrtScr Button);
and Then COpy The BItMapDAta From using
OpenClipBoard and GetClipBoardData() api to get into HBITMAP HAndle
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I found direct way how to get BMP
from desctop, without emulation user.
How to save it so BMP or better to JPG, GIF ?
CBitmap::serialize() ?
It only saves BMP ?
|
|
|
|
|
Hai,
HBITMAP bmp1;
bmp1=SHLoadDIBitmap(_T("D:\\Code Guru\\a.bmp"));
While I am debugging bmp1= not used, sometimes garbage value:
how shall I find the width and height of the bmp1.
BITMAP bminfo;
bmp1.GetBitmap(&bminfo);
When I use the above, It shows an error.
left of '.GetBitmap' must have class/struct/union type
Is there any other function instead of GetBitmap.
pDC->StretchBlt(0,0,rc.Width(),rc.Height(), &dcMem, 0, 0, bminfo.bmWidth, bminfo.bmHeight, SRCCOPY);
Note:
compatible for WinCE
DARWIN PAUL RAJ
|
|
|
|
|
S.DARWIN PAUL RAJ wrote:
HBITMAP bmp1;
bmp1=SHLoadDIBitmap(_T("D:\\Code Guru\\a.bmp"));
While I am debugging bmp1= not used, sometimes garbage value:
and
S.DARWIN PAUL RAJ wrote:
BITMAP bminfo;
bmp1.GetBitmap(&bminfo);
Buddy bmp1 is amember of HANDLE,and HANDLE is neither CLASS,STRUCT or UNION
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Try:
HBITMAP hBitmap = SHLoadDIBitmap(_T("D:\\Code Guru\\a.bmp"));
if (NULL != hBitmap)
{
CBitmap *pBitmap = CBitmap::FromHandle(hBitmap);
BITMAP bmInfo;
if (pBitmap->GetBitmap(&bmInfo) != 0)
{
...
}
}
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thank you,
I got the result
CBitmap bmp;
HBITMAP bmp1;
bmp1 =SHLoadDIBitmap(_T("D:\\codeproject\\a.bmp"));
bmp.Attach(bmp1);
BITMAP bminfo;
bmp.GetBitmap(&bminfo);
CDC dcMem;
HBITMAP hbmpOld;
dcMem.CreateCompatibleDC(pDC);
hbmpOld =(HBITMAP)dcMem.SelectObject(&bmp);
pDC->StretchBlt(0,0,rc.Width(),rc.Height(),&dcMem, 0,0, bminfo.bmWidth, bminfo.bmHeight, SRCCOPY);
dcMem.SelectObject(hbmpOld);
Still one more problem,
When I stretched this bitmap into the entire screen, the controls(Button) which I placed above the bitmap not moved with bitmap, I want that todo,
Give your hand on this issue
regards
DARWIN PAUL RAJ
|
|
|
|
|
Hi,
I have a CEdit control which I move around to enable in-place editing of text elements within a List control. I use SetWindowPos to move it and am trying to use ModifyStyle to switch it between left justified text and center justified. However, ModifyStyle seems to have no impact on the text justification, any idea what I'm doing wrong?
Thanks,
Simon
|
|
|
|
|
srev wrote:
...any idea what I'm doing wrong?
Possibly nothing. Some styles cannot be changed at runtime. One solution would be to create two separate edit controls: one that has the ES_LEFT style and the other that has the ES_RIGHT style. Switch back and forth between the two as necessary. This is guaranteed to work.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Anyone knows how to capture events from the back/forward buttons in a 5-button mouse?
I've search far and wide and I have found nothing so far. This generally means that either it is really hard to do or it is too simple to bother.
How about it folks? Any thoughts, leads, discussion, will be appreciated.
Be well all.
|
|
|
|
|
I want to do a remote sensing image processing application, but the remote sensing images are always very large, ordinary image processing is not suitable, so I need some suggestion and help.
swandream
swandream
|
|
|
|
|
You need to tile the images, so you only handle/load/unload a few visible tiles at a time; I think the TIFF file format support that.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|