|
You just wake up from a sleep of one week ??
Pas de problème pour l'anglais, le mien n'est pas parfait non plus. C'est plus facile en français non ?
|
|
|
|
|
ah ouais, c vrai qu'on parle francais en belgique aussi...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
triangulation of what source? are you starting with non-uniform point data, trying to find the least number of triangles to encompass the data? Are you starting with a grid/matrix of points, but don't want to do a brute force triangle mesh? Do you have a mathematical surface or analog wave-form that you are trying to break down into a viewable/plotable 3D surface?
Without more information this is a proper answer:
//Tell gl, what our vertex arrays look like! 3 floats per vertex, 0 packing, and the address.
glVertexPointer(3, GL_FLOAT, 0, vertexcoord);
//Tell gl, what our texture arrays look like! 2 floats per coordinate, 0 packing, and the address.
glTexCoordPointer(2, GL_FLOAT, 0, texcoord);
// draw triangle strip
glDrawArrays(GL_TRIANGLE_STRIP, 0, gsize*2);
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Here is good algorithm:
3D_Triangle 3D_Triangulation_Algorithm()
{
int result = AskNice();
if(result != POLITE)
return TRY_IT_YOURSELF;
else
return TryToHelpHim();
}
Regards,
Eli
|
|
|
|
|
|
Hi again!
Does anyone know or have any code example of how to use the API callback function EnumSystemLanguageGroups(....) ??
|
|
|
|
|
There's not a whole lot to it:
EnumSystemLanguageGroups(EnumProc, LGRPID_INSTALLED, 0); See here for more.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks a lot.
The problem I get doing this is an error message when I compile.
c:\Documents and Settings\blaol\Desktop\Regional Settings Plugin\Regional Settings\Regional Settings\regionalSettingsPlugin.cpp(459): error C3861: 'EnumSystemLanguageGroups': identifier not found, even with argument-dependent lookup
Don't know what I'm doing wrong.
|
|
|
|
|
Include proper header File and Library File
|
|
|
|
|
Hi,
Based ON MSDN :
Requirements
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Unsupported.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.
did you include th header files and Kernek32.Lib in your project?
Rgards,
Eli
|
|
|
|
|
Hi Again!
Reading a little about this callback functions I understand that
EnumSystemLanguageGroups is used with this callback function EnumLanguagesGroupsProc.
The question is how do I use them together.
EnumSystemLanguageGroups has a parameter of type, LANGUAGEGROUP_ENUMPROC. Which is passed from
EnumLanguageGroupsProc. Can you maybe give me an example of how to use them?
Thanks!
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
void EditorBasePage::DoDataExchange(CDataExchange* pDX)
{
DDV_MinMaxInt(pDX, m_nOSDItemPosX, 0, 200);
}
The above is the validation done by MFC generated code for an edit control
So any violation of data within the range(0 to 200) will be warned automatically by windows.
But windows do not highlight the edit control which was validated.
Whenever the data violation occurs,I need to set the caret selecting all the text in that particular control .
I know that SetFocus() and followed by SetSel(NULL,-1, NULL) will be do the job .But i have lot of edit boxes & I would like to know if
there are any means this will be automatically taken care by any macro.
laiju
|
|
|
|
|
DDV_MinMaxInt() only validates when the OK button is clicked. I find it better to not enable the OK button until all requirements have been met. Something like:
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
ON_EN_CHANGE(IDC_EDIT1, UpdateControls)
ON_EN_CHANGE(IDC_EDIT2, UpdateControls)
ON_EN_CHANGE(IDC_EDIT3, UpdateControls)
END_MESSAGE_MAP()
void CMyDlg::UpdateControls( void )
{
bool bEnable = true;
bEnable &= (m_edit1.GetWindowTextLength() > 0);
bEnable &= (m_edit2.GetWindowTextLength() > 0);
bEnable &= (m_edit3.GetWindowTextLength() > 0);
CString str;
m_edit3.GetWindowText(str);
bEnable &= (atoi(str) >= 0 && atoi(str) <= 200);
m_btnOK.EnableWindow(bEnable);
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanx a lot for ur suggestions i shall take them
laiju
|
|
|
|
|
Dear all,
I want to write my own DHCP client.But I do not know how to start. Is this protocol could be programmed in high layer or below layer. Anyone has any idea about that or could you show me if there any sourc code of that.
|
|
|
|
|
How can i get RTP and RTCP implentation for windows
|
|
|
|
|
Hi fellow developers,
I've writing a handler for WM_CHAR
What I want to do if the cut, copy or paste is used. How programatically examine what text ins in clipboard.
You help would be greatful if someone could provide me with code.
Thanks Alton
|
|
|
|
|
|
try these Api's
OpenClipboard :- for Opening Clipboard
IsClipboardFormatAvailable :- Checking the requested Data format available.
SetClipboardData/GetClipboardData :- For Geting and Setting data into or from Clipboard
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I´am working on a project where i have to query some values from a database.
I have to convert those values into letters from 'a' to 'z'.
example:
value: letter
1 -> 'a'
2 -> 'b'
3 -> 'c'
...
27 -> 'aa'
28 -> 'ab'
29 -> 'ac'
The letters can go up to 'zzzz'
Can anybody help me with this stupid thing?
P.
|
|
|
|
|
Maybe something like that:
int Number = 57;
char szString[255];
strcpy(szString,"");
while (true)
{
if (Number>=27)
{
strcat(szString,"a");
Number -= 26;
}
else
{
char Temp;
Temp = Number + 97;
int StrLen = strlen(szString);
szString[StrLen] = Temp;
szString[StrLen+1] = '\0';
break;
}
}
Ok, I didn't tested it so there could be some mistakes but this gives you the general idea
|
|
|
|
|
you code won't work because you consider that if (Number>=27) only...
but if Number == 53 , the result must be "ba" , etc...
as P-Rex said, there are until "zzzz" possibilities, that means 26^4 = 456976 cases...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I think you didn't understand completely my code
For exemple if Number == 53, the result must be "ab" and not "ba".
Thus in my code, if (Number >= 27), I DON'T jump out of the loop but comes once again in the loop, thus adding 'b' to the already existing string (that contains 'a').
Is it a little bit clearer ?
[EDIT] Sorry, I don't add 'b' but 'z' because 53-27 = 26 that corresponds to 'z'
[EDIT2] After 2 minutes of reflexion, I see that there effectively a problem in the code . There will only be 'a' in the begining of the string... I must not subtract but rather divide by 26... But I think the other solutions are good
|
|
|
|
|
You sound like you have it. But in case you haven't thought of this, you can imagine you are working with a base 27 system of numbers and you are converting from decimal.
Begin by checking if your value is greater than (27^3+1) if it is get the mod of your input number by (27^3+1 because a is 1), that's your first digit which falls between 0 and 26. then subtract that number off your working total. Then check if the remainder is bigger than (27^2+1). If it is, then mod by (27^2+1), that's your second digit. And so on. Since you are working with a-z just add the value of the char('a') to each mod and save yourself a switch statement. One for loop of four iterations should do it.
|
|
|
|