|
I was about to ask if you are working for the company I use to work for (the only one I know that uses RS-232 and transmits data at twice its size), but then I saw you are in India ...
Anyway, to answer your question:
To convert a number to a text-readable ASCII-Hex representation (that is, each half of a byte is represented by a single hexadecimal character [0-9aA-fF]), use the printf family:
char buffer[100] = {0};<br />
BYTE myInfo = 64;<br />
sprintf(buffer, "%X", myInfo);
To convert an ASCII-Hex number back to a byte, use sscanf:
char* buffer = "AB";<br />
BYTE myInfo = 0;<br />
sscanf(buffer, "%2.2X", &MyInfo);
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Perhaps this helps?
BYTE HexToByte(LPCSTR cpHex)
{
BYTE cRetVal;
if (*cpHex < 58)
cRetVal = *cpHex - '0';
else
cRetVal = *cpHex - '7';
cRetVal <<= 4;
cpHex++;
if (*cpHex < 58)
cRetVal += *cpHex - '0';
else
cRetVal += *cpHex - '7';
return cRetVal;
}
onwards and upwards...
|
|
|
|
|
Hi ,,
I need to disable the maximise button of the window..
Please guide me about this...
Manjunath S
|
|
|
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style ^= WS_MAXIMIZEBOX;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
Regards
Amar
|
|
|
|
|
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->ModifyMenu(SC_CLOSE,MF_BYCOMMAND | MF_GRAYED );
pSysMenu->ModifyMenu(SC_MAXIMIZE,MF_BYCOMMAND | MF_GRAYED );
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
-- modified at 10:10 Thursday 8th June, 2006
|
|
|
|
|
Sorry the code is not working for maximize button
its fairly working with close button
U can add
ModifyStyle(WS_MAXIMIZEBOX,0);
or remove maximize button by
ModifyStyle(0,WS_MAXIMIZEBOX);
u can see the disable maximize button, if teh minimize button is also present, else it will hide the maximize button disabling.
I think that is the default windows behaviour.
I donno how to change it
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
yes this code work for SC_CLOSE not maximize
whitesky
|
|
|
|
|
Hi,
Does leadtool or objective toolkit or freeimage support conversion to Jpeg(with CMYK color model).
Thanks
|
|
|
|
|
|
hi
anyone have idea abt sipxtapi.
if yes plz let me know.
i have some query but i didn't find any concrened person.
thanking u
|
|
|
|
|
Did this not help?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi
thanx for sending me such a valuable link.
but i have already gothrough this documentation.
still i have some query.....
could u help me?
waiting for ur reply.
|
|
|
|
|
aavesh wrote: could u help me?
You've not asked a specific question. Are we supposed to read your mind?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
no its not like that....
My question is:
i'm making aproject in vc++ using sipxtapi technology.
My phone is ringing when i put the required information.
1 . when phone rings i want ot disconnect it or stop ringiing the phone.
2. How to accept the call and i want ot detect the caller number & want to show in the text box.
Thanx
|
|
|
|
|
SeeHere[^]i think its good for you
whitesky
|
|
|
|
|
thanx for the link..
My question is:
i'm making aproject in vc++ using sipxtapi technology.
My phone is ringing when i put the required information.
1 . when phone rings i want ot disconnect it or stop ringiing the phone.
2. How to accept the call and i want ot detect the caller number & want to show in the text box.
Thanx
|
|
|
|
|
i have an xml file and dll file of some other application.how to load the MFC controls style and properties from xml file and calling functionalities of the corresponding controls from dll
|
|
|
|
|
raghuji.rao wrote: how to load the MFC controls style and properties from xml file
The only way I'm aware of, is to read the XML file yourself and then create the controls at run-time depending of what you read from the file. To parse the XML file, you can perhaps use TinyXML[^] which is quite powerfull.
raghuji.rao wrote: and calling functionalities of the corresponding controls from dll
I don't understand what you are trying to achieve. Could you be more specific ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
i have downloaded an user interface application from codejock.com. it has a very good gui. he is importing control properties from an xml file and calling control functionalites from a dll. i want to have in my application. how to do that?
|
|
|
|
|
Impossible to say without knowing what technologies he is using.
Does he uses MFC ? Or is it a special GUI ?
I think the easier is to ask directly to the guy who developped this thing (or at least provide a link to what you are talking about).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
he is supplying exe and related dll,xml file. am sure it is mfc dll
|
|
|
|
|
How can we help if you don't provide more information ? We have absolutely no clues at all of how he managed to do what you are looking for (and it's not by saying that he supplied exe, xml and dll that it will help a lot). But, why don't you simply use what he provided ?
And also: how do you know that functionalities for the control is added in the dll (or something like that, because I still don't understand what you are looking for with this dll).
And, what was the problem with my first answer ?
Moreover, do you know what you are talking about ? Because if you just saw something nice somewhere on the net that you want to reproduce but you have no clue about what you are talking about and hope that we will provide you with a complete solution, then you are going in the wrong direction, because we don't have any idea neither (*take a deep breath after a so long sentence* )
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
We can presume that the combination of LoadLibrary and GetProcAddress functions is the thing that you finally will achieve. In this case perhaps you need the list of features available in that DLL, in form of *.h header files.
In case of MFC, it may be some specific methods for invoking features from DLL.
|
|
|
|
|
raghuji.rao wrote:
i have an xml file and dll file of some other application.how to load the MFC controls style and properties from xml file and calling functionalities of the corresponding controls from dll
try CMarkUp for Parsing XML, it quite Popular here
"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
|
|
|
|
|
Now im trying to draw an owner draw Tab control.
From most of the code i have seen, the tabs are drawing when a WM_PAINT receives not inside the DrawItem function.
I have written some code to draw items and it is working. the problem is, a border is drawing around the tab buttons and around the control by the base class which is not required. I want to draw it my own. I'm not handling the paint message. so what I have to do for drawing border around the tab control? or atleast how could I specif the color to draw the tab border?
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|