|
Hi to all,
My name is Bruno and I am an Italian programmer.
I've a problem.
I need to write a program that make a map for apply texture on a various images that contains object (ex. Sofa', chairs, dressed, ...) to change his color/textures.
I've founded software. Look at this:
http://www.nedgraphics-porini.com/Default.aspx?SiteID=7&PageID=166
I've marked 3 extremely hard phases.
1: create a map for curves and angles:
- Algorithm to draw a 3d curve with GDI (2D)
- Algorithm to transform create curve
- Save the curve for future visualization
2: Map texture to curve (texture mapping)
3: Overlay original image with textured map
For the third phase I've supposed to use the base pixel brightness and draw the texture pixel with the same brightness.
The result is ok but work fine just with flat colors because if I use a texture this is so flat.
Therefore I need texture mapping.
Have you a line guide for me?
I've considered using Ray Casting technique or quite DirectX/OpenGL
Tanks for your time.
Bruno
Sorry for my terrible English
|
|
|
|
|
hi
is it is must in mfc that the new classed( own made or made by myself) should be inherited from previous calls like Cdialog, Cobject,Cfrom and cannot write own calss that is not inheried from anyone. i m using vc6.
ddd
|
|
|
|
|
Nope, not at all - a class doesn't have to be derived from anything
e.g.
class CMyClass
{
public:
CMyClass();
~CMyClass();
private:
CString m_strSomeString;
}
That uses MFC's CString, but the class doesn't inherit from anything
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
through which option present in mfc these are made. the other options are mfc appwizard,win32 console etc.
ddd
|
|
|
|
|
Those are the types of application that you can have - not specifically classes - A class needs to exist within some kind of application, otherwise it won't do you much good
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
i thing u had not understood my question. through which options those application are made.
when u open visual c++ then there are three tabs Files , project and docmtns.
throgh which option classes will me made i think project or file. now i think u understood my questions.
ddd
|
|
|
|
|
i exactly want to create this type of class but when u logon to visual c6 environamnet options are file,project,document. i think from project which thing to choose to made such a file.
ddd
|
|
|
|
|
Select Generic class option from ClassWizard!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
Select Generic class option from...
...the Insert/New Class menu option, not ClassWizard.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
the Insert/New Class menu option, not ClassWizard.
Oops Sorry!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
can we create that just we create in c++ file.
like
class mycalss {
int i;
public:
mufunc();
};
this type of application or the class how to create in MFC or it is not possible and strict to cobject as u told earlier.
ddd
|
|
|
|
|
tasleem143 wrote:
can we create that just we create in c++ file.
like
class mycalss {
int i;
public:
mufunc();
};
Yeah Mr. Tasleem!
You can create class as you mentioned/written above. It's not compulsary/necessary to inherit class from CObject to use that In MFC.
tasleem143 wrote:
cobject as u told earlier.
ME.. When!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
hi
i had made my application in vc using MFC application wizard. now i want when the application start the dialog should no be visible. i had used the function in the onitnitdialog function
GetDlgitem(idofdialog)->showWindow(false);
it give no compiler error but when run it gives error.
other functions are also there but they require the handle of window or dialog how to get that.
is any other function through which i can hide the dialog.
ddd
|
|
|
|
|
try just
ShowWindow(SW_HIDE);;
on it's own (in your oninitdialog)
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
i had tried it onititdialog but does not worked then i used in the event(button clicked) and it worked but i dont want to do it in the button click.i want when it start it hides himself(dialog).
ddd
|
|
|
|
|
|
does anyone know a class for beginners to get samplerate bitrate and time of a mp3?
|
|
|
|
|
|
Hi All
I'm trying to return a string from a dll to VBA as a BSTR but the variable always returns a null. What am I doing wrong? Are the variables passing out of scope before the result is returned?
<br />
#include <wtypes.h><br />
#include <oleauto.h><br />
#include <string><br />
<br />
BSTR __stdcall SomeFunction(LPSTR cSPC)<br />
<br />
CHAR cTheString [255];<br />
BSTR bResult;<br />
UINT iStringsLength=0;<br />
<br />
strcmp(cSPC,"Absolute Return");<br />
<br />
iStringsLength = strlen(cTheString); <br />
bResult = SysAllocStringByteLen(cTheString,iStringsLength);<br />
<br />
return bResult;<br />
}<br />
The project builds, links and compiles successfully. Any thoughts about the problem would be gratefully accepted.
Regards
Jeremy
|
|
|
|
|
Your code post has got mangled up, but I have two comments. I don't see anywhere in your code that an assignment of a string of characters takes place to the variable, cTheString. Thats probably why no string shows up in your BSTR. I don't know a lot about BSTR types, but since you are making a call to SysAlloc.. to create the BSTR, I would seem to me that there must be a call to SysDealloc.. somewhere or the BSTR is going to leak. Just my musings. Try using the <pre> and </pre> tags to show your code better.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Sorry Chris - I copied out part of the code incorrectly here is what it should have been - Thanks Jeremy
BSTR __stdcall SomeFunction(LPSTR cSPC)
CHAR cTheString [255];
BSTR bResult;
UINT iStringsLength=0;
strcpy(cTheString,"Absolute Return");
iStringsLength = strlen(cTheString);
bResult = SysAllocStringByteLen(cTheString,iStringsLength);
return bResult;
}
|
|
|
|
|
I have an application where some structures are packed. Does anyone know what the advantage is in packing a structure, why it is used, pros/cons, etc.?
Thanks,
Jerry
|
|
|
|
|
Pros: Uses less memory / disk space
Cons: More confusing to work with
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
A packed structure saves memory at the cost of less-efficient code. Some CPU's access memory more efficiently on 4, 8, or 16 byte boundaries. Struct's packed on those boundaries can be accessed more efficiently.
If you need your program to process an existing data stream, you may have to set the structure packing to match, so that your compiler doesn't add filler bytes between structure members. For example, suppose the following is the form of a network message:
struct Message {
unsigned short Length;
char Data[128];
}; If the compiler's default packing is 4, you could miss the first two characters of the data, since it would add two filler bytes following the Length member in order to align the Data member on a four byte boundary.
Software Zen: delete this;
|
|
|
|
|
The project I code for is a cad software.. in which I have a dilog box dlgmain
--------------------------------------|
Dlgmain(title bar)----------------|
--------------------------------------|
-------\--------\---------------------|
TAB1-\TAB2-\--------------------|
---------\---------\------------------|
(*)radio1--------|------------------|
-------------------|-<-button1>---|
-------------------|------------------|
#<button1-->--|-----------------|
-------------------|------------------|
___________ |------------------|
-------------------------------------|
-------------------------------------|
% represents space (nothing ness)
Now I will explain the figure up there , the button1 with a # symbol before was in
the tab control , doing a specific functionality of looking up the constraints like radio button etc and get to the drawing in the window behind this dlg(obviosly i could not draw that), and do the operation and get back or complete.., now I have taken that button from there to the dlgmain control , which has shifted its class , now I want to shift the button 9 so that it is available for all tabs) and have the same functionality ,
Now the real problem is the code for #button1 is in Tab.cpp (tab class) , which is obviosly and afx_msg protected and non-static , so not accessible to any other class's member functions , so even if I create a public member function with that code and try to access that it gets accessed but does not do anything (and forget about what it used to do earlier)..
I tried to get the data which it is trying to execute and then use that data to execute new buton1 which is getting clumpsy and almost writing the entire tab functionalities into this class ,
if I use inheritance , both are derived from the same class CDialog,, so I don't know how to make it virtual and stuff , i tried and failed
so anyone can sort this out that would be really really great of you
If you think this post is not at all understandable (that is because of the company policy I cannot take screen shots and send ) ..
Thank you if you went through the whole thing
|
|
|
|