|
Here is a sample of 3D function plotting.
Best wishes,
Hans
|
|
|
|
|
Hi
All
I am using VC++ 6.0 for my project in which i want to change size of DialogBox at runtime.So if anybody have solution to this then plz forward me.
Thanks and Regards
Atul
atul
|
|
|
|
|
From your code - use MoveWindow() or SetWindowPos(). or Do you want to allow the user to drag the dialog from it's corners and resize it?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi
i use this function in onPaint() funtion in
switch()
{
CDialog* dlg = (CDialog*)GetDlgItem(IDD_DIALOG_NSMESSAGE);
HWND hwnd = dlg->GetSafeHwnd();
SetWindowPos(hwnd,50,50,50,50,SWP_SHOWWINDOW) ;
}
but it does'nt work. Is it a right way or i have to do it by some othere way.
Regards
Atul
|
|
|
|
|
M. Atul wrote: . Is it a right way
It is not.
You must understand cases, whenever OnPaint is called. That is not place to change size of window.
Prasad
MS MVP - VC++
|
|
|
|
|
M. Atul wrote: I am using VC++ 6.0 for my project in which i want to change size of DialogBox at runtime.So if anybody have solution to this then plz forward me.
If you just want to change the size call...
CSize csSize( nNewWidth, nNewHeight );
SetWindowPos( 0, 0, 0, csSize.cx, csSize.cy, <code>SWP_NOMOVE</code> | SWP_NOZORDER | SWP_FRAMECHANGED );
|
|
|
|
|
M. Atul wrote: Hi
All
I am using VC++ 6.0 for my project in which i want to change size of DialogBox at runtime.So if anybody have solution to this then plz forward me.
where you want to change the size of your dialog box!
"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
Support CRY- Child Relief and You
|
|
|
|
|
i don't know why the some strange extra table name appear in thelist control:
CListCtrl m_table;
CDaoDatabase db;
db.Open("D:\\ktt.mdb");
short n_table=db.GetTableDefCount( );
CDaoTableDefInfo TableInfo;
for( int i=0; i
|
|
|
|
|
Hello,
I have a CString in a CDialog and I want to print it in a Network printer.
I have been taking a look of the diffrent methods to do it but in all of them I have find problems,
For example:
1.-
filebuf fb( "prn:" );
filebuf fb( "prn:" );
cout = &fb;
cout << "testing";
Can only print to local printer.
2.- CView::OnPrint
I can't use it because I am using CDialog not Cview, CFormView.....
Fixing:
Does any way to print a CString using CPrintDialog?
Thanks in advance,
Best regards
|
|
|
|
|
QPrint may be what you are looking for.
Best wishes,
Hans
|
|
|
|
|
|
Thank you this is what I was looking for,
It is really easy to use.
Regards
|
|
|
|
|
Hi
When an project is created in VC6.0. It can be opened in VC.Net.
But if i create an project in VC.Net, can I open it in VC6.0.
Could i know in which file the version is serialized.
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Hi
U can not open project in VC++ 6.0 which is develop in VC.Net. Because it is advance version so all vc.net features are not in VC++ 6.0.
atul
|
|
|
|
|
vibindia wrote: But if i create an project in VC.Net, can I open it in VC6.0.
No, but tools do exist to convert from VS2005 back to VS6.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
vibindia wrote: But if i create an project in VC.Net, can I open it in VC6.0.
NO, but you can achieve that manually by adding blank solution and project and copying files and setting into them
"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
Support CRY- Child Relief and You
|
|
|
|
|
please i was confused a little
i have array of unsigned char where if i print its value by
printf("%2X",stemp);
the value is hexadecimal and it is the desired answer
now i want to write this value into file with its hexa format
how is that possible
please urgently help me
emma
|
|
|
|
|
You can use sprintf to change the hexadecimal value into a string format and then write it to a file just like any other string. There could be some other way too, but this is what struck me at this moment.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i think sprintf will convert it, others these might be of use to you
just dug them out.
void CharStr2HexStr(unsigned char const* pucCharStr, char* pszHexStr, int nSize)
{
char szHex[3];
pszHexStr[0] = 0;
for(int i=0; i<nSize; i++)
{
Char2Hex(pucCharStr[i], szHex);
strcat(pszHexStr, szHex);
}
}
//unsigned char to str of len 2
void Char2Hex(unsigned char uch, char* szHex)
{
unsigned char byte[2];
byte[0] = uch/16;
byte[1] = uch%16;
for(int i=0; i<2; i++)
{
if(byte[i] >= 0 && byte[i] <= 9)
szHex[i] = '0' + byte[i];
else
szHex[i] = 'A' + byte[i] - 10;
}
szHex[2] = 0;
}
reverse the process
void HexStr2CharStr(char const* pszHexStr, unsigned char* pucCharStr, int nSize)
{
unsigned char uch;
for(int i=0; i < nSize; i++)
{
Hex2Char(pszHexStr+2*i, uch);
pucCharStr[i] = uch;
}
}
//convert str of len 2 to unsigned char
void Hex2Char(char const* szHex, unsigned char& uch)
{
uch = 0;
for(int i=0; i<2; i++)
{
if(*(szHex + i) >='0' && *(szHex + i) <= '9')
uch = (uch << 4) + (*(szHex + i) - '0');
else if(*(szHex + i) >='A' && *(szHex + i) <= 'F')
uch = (uch << 4) + (*(szHex + i) - 'A' + 10);
else
break;
}
}
-- modified at 4:50 Wednesday 9th May, 2007
had some format problems
|
|
|
|
|
Hi,
If you want to write it in a Text-File then you can use the answer above or another option.
CString szHex = "";
szHex.Format (_T("%x"), yourVariable); //With little Hexadecimal letters
szHex.Format (_T("%X"), yourVariable); //With capital hexadecimal letters
and then send it to the file as all other strings.
If you want to write it in a Binary-File, I used this in my project.
This from my view:
CFile f (pcFileName, CFile::modeCreate | CFile::modeWrite);
obj.WriteHeader (&f);
dwActualPos = f.SeekToEnd ();
This from the CObject-derived where WriteHeader is:
void obj::WriteHeader (CFile* file)
{ Header[0] = 0x23957112
Header[1] = 0x00001011;
Header[2] = CalculateCodeLarge ();
Header[3] = CalculateDataLarge ();
Header[4] = CalculateNumberOfElements ();
Header[5] = 0x00000000;
Header[6] = (DWORD) GetInputsCount ();
Header[7] = (DWORD) GetOutputsCount ();
Header[8] = 0x00010000;
DWORD* pHeadBuf;
pHeadBuf = &Header[0];
file->Write (pHeadBuf, sizeof (Header));
return;
}
So you can send the hex directly.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
FILE* vl_fp=fopen("Data.txt","w")
fprintf(vl_fp,"%2X",stemp);
fclose(vl_fp)
|
|
|
|
|
Hi
I want to drag a image on dialog box at run time how it is posible
hay
|
|
|
|
|
Set the Accept File property of the dialog to TRUE and then do the rest of the handling
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can you send me the source code that drag Image(bmp or any one )by mouse
pointer on dialog box at run time
RajeshGupta
|
|
|
|
|
There are always lots of articles available here on CP. So why not search here. A quick search took me to this location[^]. See if it helps you in your cause. :->
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|