|
This is one problem. I tried your views and one problem is solved. But still it gives the same error in create file.
Regards
Kenny
|
|
|
|
|
Here is an article that might help you. Check out the information regarding "symbolic link name" especially. Maybe that's your problem?
http://www.ddj.com/dept/windows/184416453[^]
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
how start to a MFC code for delaunay triangulation using 10 points..?
-- modified at 0:34 Tuesday 22nd August, 2006
|
|
|
|
|
Hi, welcome to Code Project. I sure hope you become a member of our little community. If you want people to do your job for you, you would do well to show that you've taken a stab at it yourself. You've emphasised MFC, but what you're asking for is a mathematical operation. Why do you require MFC be used to do this ? What have you already done to try and solve this problem, besides asking us to do it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I think Codeproject may need to open another section for MATHS
If u can Dream... U can do it
|
|
|
|
|
|
Christian Graus wrote: and he has no idea what he's asking for
|
|
|
|
|
what is wrong with u???
dont ever underestimate people!
|
|
|
|
|
man, you're on codeproject since today...
i don't think you have something to say against me on that board, especially when looking at your posts.
|
|
|
|
|
do u mean a maths operation cannot deal with MFC???
|
|
|
|
|
There are no specific MFC classes that deal with the maths operations.
That doesn't mean you cannot use MFC in an application that uses MFC to produce the GUI for such an application.
You could try reading Sedgwick's C++ Algorithms books, or any work on computational geometry in C or C++, which might help.
Are you looking for code that will help to draw them, or calculate them, for example?
Aside:
There are a lot of people posting on CP whose idea of a good question is:
I have to do X. Please send me code.
There are several things wrong with this approach. Firstly, getting other people to do work for you isn't as helpful when learning to program. Sure, it's good to look at other people's code to see how they approached the same (or a similar) problem.
Secondly, most people here who answer posts are not employed by CP, and provide help for free, because they are generous souls, so antagonising them doesn't get you anywhere. If someone complains about my posts, for instance, I tend to ignore further posts and questions from them. Firm, but fair, in my opinion; if you cannot be bothered to retain that thin veneer of politeness towards me, why should I care what happens to you?
Thirdly, and probably most importantly, by attempting any problem yourself, you should be learning more about it; by highlighting the areas that you are having difficulty with, rather than refusing to attempt it in the first place, you are much more likely to get positive responses, which will probably help you clear up any confusion or difficulty.
Steve S
Developer for hire
|
|
|
|
|
Damn. The site lost my post, and now you beat me to it.
Steve S wrote: There are no specific MFC classes that deal with the maths operations.
*grin* I was trying to bring the OP around to that conclusion, assuming he/she has any idea what MFC is at all.
And I have to admit, you gave a better answer than I did.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
*sigh* What is MFC for ? What does it do ? What does it offer ? How would you use MFC to write maths code ?
The reason you're getting the response you are is that
1 - you're asking for someting complex
2 - you show no sign of understanding basic things and
3 - it seems probable that you've asked this without trying to do any research of your own, which means that
4 - you're hoping we will do your homework or paid work for you, for free.
We're happy to help. Helping means you do something, too. Do you know what MFC is/does ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
actually, i did two projects using C++ n MFC.
both require maths algo in it.
but i have no idea how to start my 3rd project using triangulation.
u got me wrong..i never ask people to do my homework for me..
i just ask for the idea..
maybe the idea can help me to start my program. thats it!
thanx anyway..
|
|
|
|
|
OK, perhaps you've just not made yourself clear. Either way, as has been said, MFC has nothing to do with it, standard C++ has a maths library, which you would use, and which will work in MFC.
Your first step would be to google and get info on the algorithm you want to implement. Your second step would be to write some code, based on this information. Third step is to post here when you get stuck.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Your answer like an transparent algorithm step by step
|
|
|
|
|
Do you have any code or idea?
|
|
|
|
|
Hi,
Iam trying to implement IMultiLanguage::ConverString() API.Can anyone provide a small chunk of code which implements this function to convert from one source codepage to another codepage ?
Thanks in advance.
Swetha.
|
|
|
|
|
I'm trying to read the pixels of a monochrome bitmap (1-bit per pixel). I am so close to getting it right but I just cannot produce the same results as GetPixel() . I use GetBitmapBits() to read the bits into a byte array, then loop through attemptng to read a bit at a time. My output is somewhat 'blocky'.
for (y=0;y<height;y++)
{
for (x=0;x<width;x++)
{
ULONG col = GetPixel(hBuf,x,y);
if (col)
SetPixel(hdc,width+x,y,RGB(0,0,255));
int offset = y * b.bmWidthBytes + x / 8;
BYTE pixel = *(BYTE *)(lpBits + offset) >> x%7;
if ((pixel & 0x01) == 0x01)
SetPixel(hdc,width+width+x,y,RGB(0,0,255));
}
}
This is maybe my 15th version of the loop, I'm sure I am reading it bit by bit, I can't work out whats going wrong.
|
|
|
|
|
Can you say how u load that image ?
If u can Dream... U can do it
|
|
|
|
|
I don't load the image, I create it at runtime. I don't see how loading the image has anything to do with parsing an array of bits.
|
|
|
|
|
Not sure if this makes a difference for monochrome bitmaps, but try using GetDIBits() instead.
Another thing I noticed is x%7, which I don't think can be correct since that means you're shifting 0 to 6 bits to the right, when I think it should be 0 to 7 bits. Try it with x%8. I also would have thought that the leftmost bit would be the first bit.
My current guess is (not sure though, since you mentioned you were close)
BYTE pixel = *(BYTE *)(lpBits + offset) >> (7 - x%8);
|
|
|
|
|
The x%7 was a result of me playing with the variables out of frustration, I was adjusting them hoping to get a clearer picture. Your suggestion of >> (7 - x%8); is what fixed it, that and a slight mistake I made in calculating the array size.
Thankyou )
|
|
|
|
|
Hello all
I have generated a WIN32 console app, and created a resource , and a string table which has one string. Then I copied same string to German and put the same string id there and put a German text.
After that I have done the following code
#include "stdafx.h"
#include <windows.h>
#include <winnt.h>
#include "resource.h"
int main(int argc, char* argv[])
{
TCHAR pszTest[256];
int m_lang = GetProfileInt("General","Language",0);
HMODULE hMod = GetModuleHandle(NULL);
if (m_lang == 0) {
// switch language to english
::SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT),SORT_DEFAULT));
}
else {
// switch language to german
::SetThreadLocale(MAKELCID(MAKELANGID(LANG_GERMAN,SUBLANG_DEFAULT),SORT_DEFAULT));
}
LoadString(hMod,IDS_MSG, pszTest, sizeof(pszTest));
DWORD dw = GetLastError();
MessageBox(NULL,pszTest,"Message",MB_OK);
return 0;
}
I get the error 1812. Can you please help me to solve this?
Basically I am trying to write a WIN32 application to support both English and German. I dont know whether I have to make this WIN32 app a unicode application !!!
And also, it would be nice if you can gimme a link which helps me to generate a multilingual WIN32 app without MFC.
Thank you
Best Regards,
|
|
|
|
|
I vaguely recalled this had to so with getting the wrong section in the resource file. I found this:
http://www.microsoft.com/globaldev/handson/dev/muiapp.mspx[^]
(I do know you don't need to use unicode since English and German use the same code page.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|