|
Is ther a way to get the exact width of any character in a text i.e LOGFONT .
I do not want the average width or the maximum/minimum width.
if ne1 does know then
Kindly reply to tis msg
Thank u
|
|
|
|
|
try to display all chars on a control, such as CEdit, then use CEdit::PosFromChar(...) function to receive their positions.
or use CDC::GetTextExtent(...).
LOGFONT doesn't contain info about a specified character.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Hi,
I have taken and MDI application.CMainFrame class in OnCreate() function.
m_wndStatusBar.SetBorders(2,17,2,17);The height of the staus bar is increased as required,i have done this uisng VC.6...But when i did same thing in VC2005...the statusbar is drawn properly....is there any specific reason?.If i update my application from vc.6 to VC2005 will support new framework..? or is there any other to increase the height of the status bar, without changing the Font...
Thanks in before
Jamesrocky
-- modified at 0:53 Wednesday 5th April, 2006
|
|
|
|
|
in VC6, "the staus bar is increased as required"
in VC2005, "the statusbar is drawn properly"
what is your problem?
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Sorry in VC2005 its was not drawn properly....
|
|
|
|
|
Hi RockyJames,
what's your problem?Statusbar(Height)
CStatusBarCtrl maybe it is some helpful to you I'm not sure
|
|
|
|
|
I want to develop some standalone application. That is without having Operation System boot loader has to load my application. Is that possible?
M.Sendilkumar
Thomson
|
|
|
|
|
Sorry to say it, but I think that's impossible to do.
Do you want to create your own operating system for that?
|
|
|
|
|
of course that is possible !!
how do you think OS installer do ?
|
|
|
|
|
man, that's a big task you're asking about...
you may need to write a bootstrap from scratch !!
but as i don't know more about your project (target plateform, Proc SC, Dev IDE)...
|
|
|
|
|
Yeah,,That is what i want.How i can write bootstrap.Development tool and etc.. are not matter.Tell me is there any way that you know?
M.Sendilkumar
|
|
|
|
|
you have to peel your microprocessor's documentation and write the assembler code to what you need to do...
i cannot help you on this, as it is a very specific task.
|
|
|
|
|
Does anyone know where I can get information on writing a library (making a DLL of my own) for Parallel I/O Communication in C/C++?
Thanks
|
|
|
|
|
|
When I move the mouse on the menu bar.For example ,the Help button ,how can I get the text"Help" of the button in MFC?
|
|
|
|
|
Some helpful API are
FindWindow
GetWindowText
GetClassName
GetWindowLong > GWL_STYLE
|
|
|
|
|
|
Hey,friend.when I call the member func of the class exported from dll,like
MyClass.DoModal();
Dialog appears but when i click the "ok" button,the program abort and give out error message
"The Instruction at 'ox7800fa97' referenced memory at 'ox000007d6'. The memory could not be 'read'.
But,click "Cacel" button, It returns to main program,could you tell me what's wrong with my code?Thanks.
Lee
|
|
|
|
|
Hi all, I'd like to know how to access virtual key code values for keys such as @. and *. in C.
A code fragment I've written is as follows
LRESULT CALLBACK KeybProc( int nCode,WPARAM keyvalue, LPARAM lParam)
{
if (nCode != HC_NOREMOVE)
{
if (lParam<0)
{
if(keyvalue == VK_BACK)
{
char szBkKey[] = "<bkspkey>";
fileout<<szbkkey;
}
="" if(keyvalue="=" vk_return)
="" {
="" char="" szretkey[]="<RETURNKEY>" ;
="" fileout<<szretkey;
="" if="" (((keyvalue="">=0x41)&&(keyvalue<=0x5A))||(keyvalue==VK_SPACE))
{
etc....
}
}
}
}
This fragment stores values for values A..Z, a..z, 0..9 but doesn't record much else. Your help would be most appreciated.
ES
E Scott
-- modified at 21:43 Tuesday 4th April, 2006
|
|
|
|
|
I'm not sure I quite understand your question, but it sounds like you want to know how to find out the VK code for a given key. If so here is a little cheat. Add an accelerator into your resource file, Each time you add a new row into the accelerator file, there is a button "Next Key Typed", press it and hit the key, it will show you the VK code.
|
|
|
|
|
I want to allow networked PCs access to my server application. It has various parts and I want to tell the clients PCs where the address of the parts sit (a network address of the server folders). I can do it using a small install program run on each PC individually that inserts the server address of the files in the client PC registry but, is there a elegant way of letting the client PC use a remote program and access the server registry or the files local to the server.
Basically, from the client PC, if I run a program on the server can I retrieve data from the server registry rather than the local client registry.
Any thoughts?
Cheers
u6ik
|
|
|
|
|
You can connect to a regirstry in a remote machine, provided you have got the proper acccess rights.
Check out RegConnectRegistry()
|
|
|
|
|
Perfect! Many thanks
u6ik
|
|
|
|
|
I’m trying too passing a window handle from my application to an Interface
Software. The software will then send messages to my application. But it seems like no messages are sent at all. Its really strange though when I create another dialog (config window for my first window) in the first dialogs OnInitDialog(); function where I’m calling the Interface function it works. And then when I remove the code for the config dialog no message is sent.
Kind of hard to explain in words, here is the code that works:
:BOOL ClightswitchDlg::OnInitDialog()<br />
{<br />
int retval;<br />
CDialog::OnInitDialog();<br />
<br />
<br />
hZigBee = new CZigBeeIf();
<br />
retval = hZigBee->ZBIFConnect( m_hWnd );
<br />
<br />
CConfigureDlg hConfigureDlg;
<br />
INT_PTR nResponse = hConfigureDlg.DoModal();
if (nResponse == IDCANCEL)<br />
{<br />
return FALSE;
}<br />
<br />
hZigBee->ZBIFSubscribe( ZDO_SET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_RESET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_START_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_END_DEVICE_BIND_CONFIRM );<br />
hZigBee->ZBIFSubscribe( AF_INDIRECT_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_NLME_SYNC_CONFIRM );<br />
<br />
Sleep( 1000 );
<br />
hZigBee->ZDO_RESET_request( 0 );
<br />
<br />
return TRUE; <br />
And the same code without config dialog that doesn’t work:
BOOL ClightswitchDlg::OnInitDialog()<br />
{<br />
int retval;<br />
CDialog::OnInitDialog();<br />
<br />
<br />
<br />
<br />
hZigBee = new CZigBeeIf();
<br />
}<br />
<br />
retval = hZigBee->ZBIFConnect( m_hWnd );
<br />
<br />
hZigBee->ZBIFSubscribe( ZDO_SET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_RESET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_START_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_END_DEVICE_BIND_CONFIRM );<br />
hZigBee->ZBIFSubscribe( AF_INDIRECT_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_NLME_SYNC_CONFIRM );<br />
<br />
Sleep( 1000 );
<br />
hZigBee->ZDO_RESET_request( 0 );
<br />
return TRUE; <br />
}
|
|
|
|
|
Strange error, try stepping the code with the debugger to check if everything runs as expected, especially that the m_hWnd is not NULL.
The implementation of CZigBeeIf and the actual hardware associated with it are also suspicious. In the first case there is a greater time lag between the creation of the object and the subscribe events (a dialog pop ups and user must click at least one button). Try emulating this delay with a sleep call to see if that is what is causing the problem.
|
|
|
|