|
toxcct wrote: printf() for example, will have some specifiers, and CString::Format() too, but as they are different functions, they may implement them in different ways.
For example?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
printf(), scanf(), CString()... each function hardcode the format they understand, so even if they are same, they may differ... that's why i suggested him to read the doc of the function he's using first...
|
|
|
|
|
Then why does CString::Format() refer to printf() for a description of the format and arguments? If they differed, this would not be the case.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
that was a supposition. BTW, Format() refers to printf() in the doc, but not in the code.
|
|
|
|
|
|
QuickDeveloper wrote: ,%ld for long double
%ld would be used by a long int .
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
Is there anyway in Visual Studio 6 or VS 2003 to view a variable's value in binary format?
|
|
|
|
|
Sarath. wrote: a variable's value in binary format?
if u r looking for the variable value while debugging , then in the QuickWatch window you can select HexaDecimal Display.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
I asked about that BINARY (101010) format not HEX values
|
|
|
|
|
To my knowledge there is provision for BINARY.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
there isn't AFAIK, but it's easy to translate hex to binary. a hexadecimal digit represents 4 bits like this :
0 - 0000
1 - 0001
2 - 0010
3 - 0011
4 - 0100
5 - 0101
6 - 0110
7 - 0111
8 - 1000
9 - 1001
A - 1010
B - 1011
C - 1100
D - 1101
E - 1110
F - 1111
then, 0x4D51A32F means : 0b 01001101 01010001 10100011 00101111
easy right ?
|
|
|
|
|
NiceNaiduif u r looking for the variable value while debugging
FYI,
put a ',x' in the watch window after the variable to see the value in hex. No need of going for quick watch.
nave
|
|
|
|
|
Hi All,
Thanks for your replies.
I was seeking whether there's a builtin option to get the binary values in Visual Studio.
Now im using the way which Toxy suggest.. manual counting and conversion sometimes used to seek help of a windows calculator.
|
|
|
|
|
maybe of no interrest for you, but VisualCalc will be able to convert hexa<->bin<->dec soon
|
|
|
|
|
hoo... you are such a great person toxy
|
|
|
|
|
1) Is there any utility that let me open a DLL and examin its exported functions along with there parameters and return type? (Other then dependency walker)
2) Okay nice, I've got a DLL and I know it has that much functions along with these params and return tyeps. How can I call them in my program as I dont have the "declerations" for these? Please if someone can explain me the step by step procedure... I'll be thankfull...
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
|
Polite Programmer wrote: 1) Is there any utility that let me open a DLL and examin its exported functions along with there parameters and return type? (Other then dependency walker)
There are so many tools available in Net. Download this tool http://www.nirsoft.net/utils/dll_export_viewer.html[^]
Polite Programmer wrote: 2) Okay nice, I've got a DLL and I know it has that much functions along with these params and return tyeps. How can I call them in my program as I dont have the "declerations" for these? Please if someone can explain me the step by step procedure...
Chk this http://www.codeproject.com/dll/XDllPt4.asp[^]
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
Polite Programmer wrote: Okay nice, I've got a DLL and I know it has that much functions along with these params and return tyeps. How can I call them in my program as I dont have the "declerations" for these? Please if someone can explain me the step by step procedure... I'll be thankfull...
if the dll contain decorated name you can runb UNDNAME.EXE exe
"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
|
|
|
|
|
Actually my problem is...I made a keyboard with some bitmap and i
incuded this in to Dialog and i name it as KeyBoard.cpp.
THe keyboard has the same resemblance of system keyboard.
I included some dialogs to enter the values and performing functon as
normal dialog...Instead of using our system keyboard to all purpose..I
am using that Keyboard in applivation. Normally if i entered the number
1 in system keyboard then that normal dialog named as simpledlg.cpp
file.The simpledlg edit control accept my value.
At the same time if press number 1 in my application keyboard the
number is not get in to that simpledlg edit control.I think now u get
my problem.
FOr that my coding is ..
In Keyboard.cpp...For each button,I wrote like this..
void CKBoard::OnLButtonUp(UINT nFlags, CPoint point)
{
CView *curView;
CMDIFrameWnd *fWnd = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *fChWnd = fWnd->MDIGetActive(&bMax);
if(fChWnd->GetSafeHwnd())
curView = (CView *)fChWnd->GetActiveView();
else
curView = NULL;
switch (keyvalue)//number of keys in keyboard
{
case 51 :
if (curView)
curView->PostMessage(WM_KEYDOWN,49,0);
break;
case 52 :
if (curView)
curView->PostMessage(WM_KEYDOWN,50,0);
break;
case 53 :
if (curView)
curView->PostMessage(WM_KEYDOWN,51,0);
break;
case 54 :
if (curView)
curView->PostMessage(WM_KEYDOWN,52,0);
break;
case 55 :
if (curView)
curView->PostMessage(WM_KEYDOWN,53,0);
break;
CDialog::OnLButtonUp(nFlags, point);
}
In simpledlg.cpp class i wrote OnKeyDown function to accept this
coomand..
void CFaceDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch(nChar)
{
case 49:
sSktNumValue += "1";
break;
case 50:
sSktNumValue += "2";
break;
case 51:
sSktNumValue += "3";
break;
.
.
.
.
}
Please find out my problem
Anu
|
|
|
|
|
Anu_Bala wrote: Please find out my problem
no way, ask your question, and post only the code which causes problem, not a whole crap.
|
|
|
|
|
Ya, my question is how can i map the keyboard message to my application. Before i explained my problem in details..Ok..I am not posting all the things..Just few lines to see my codings.Iam having this problem for last four days ..still i could not get solution for that problem.Thats why i posted this in details.
Anu
|
|
|
|
|
|
But i couldnot find the solution.
My question is Can we give message map from one class to another?
Anu
|
|
|
|