|
thanks now it is working properly
|
|
|
|
|
Does anyone know to write a Class base on class CStatic which has a MoveTextToTheBottom function? Please show me .
|
|
|
|
|
Wat do u meant by MoveTextToTheBottom() this function?
Or wat do u want to do by this?
can you explain it?
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
I want to move the lines of text from the top of Static frame to bottom . I read the code at http://www.codeproject.com/staticctrl/CTextScroller.asp
The Auhor wrote MoveTextToTop()function and I tryed to change this function to MoveTextToBottom ,but not successful.
|
|
|
|
|
two things :
- this static is an owner drawn control, so we cannot tell you how he implemented this unless we look at the code (which you can yourself do)
- why don't you ask it directly on the article's questions board[^] so that the author will certainly be able to answer you more precisely than us (as it is his own product) ?
|
|
|
|
|
Give your requirement in detail......
|
|
|
|
|
Can you be more specific "MoveTextToTheBottom function?"
|
|
|
|
|
Hi Friends,
I created a dialog based VC++ .net platform. I placed edit box on the dialog form. When I place the mouse on the edit box and right click it, add variable in the pop up menu is disabled. I want the edit box to accept string input only for this purpose , I not able specify the type of input the edit box will accept.
For example CString m_accept. I am not able to do this .
Can any one tell me were I can enable the "add variable" in the pop menu?
from
Phijo
|
|
|
|
|
Hi all,
I am totally new to computer hardware programming. But i know VC++ application programming using MFC. I would like to learn abt computer hardware programming using VC++.
Can anyone help me to give some startup tips ( any books, articles, source code)?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: computer hardware programming using VC++.
There are hardware related programming aspects such as "firmware" and "device drivers" programming, but none is using Visual C++.
Maxwell Chen
|
|
|
|
|
May i know what are the programming languages used to develop firmware and device drivers??
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: what are the programming languages used to develop firmware and device drivers??
People mainly use "C" or "embedded C" to develop firmware. Maybe some others use assembly.
And "C" for device driver development with Microsoft DDK. Some minority uses "C++" to develop device drivers, but it is not recommended by Microsoft. (Reference.[^])
Maxwell Chen
|
|
|
|
|
thank you very much for spending ur time to make me to learn some basics of firmware and device drivers.
Regards,
Ram
|
|
|
|
|
Hello
I create a view as a camera UI.
When I push the button, the video recording start.
Then I want to show the time of record in the view.
In MFC, what function could be a counter for the foramt of "hr : minute : second"??
And what function could show the time in view??
Thanks a lot!!
Any suggestion is useful!! Thanks!!
|
|
|
|
|
Try this
CTime objTime = CTime::GetCurrentTime(); <br />
CString csTime;<br />
csTime = objTime.Format( "%I:%M:%S" );
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
You can use this to get the System time.
SYSTEMTIME SysTime = {0};
:GetSystemTime( &SysTime );
rgds
aneesh
|
|
|
|
|
To show the current Time you can use CTIme::GetCurrentTime(...) or other APIs..
If you want to show the recording time, that is, how long the recording is going on.. you can use GetTickCount() as below...
DWORD dwTicks = GetTickCount();
CTimeSpan objTime(dwTicks / 1000);
CString strTime = objTime("%H %M %S");
GetTickCount() returns time in milliseconds, but CTimeSpan required only seconds... so divide the value by 1000 to get number of seconds...
Do your Duty and Don't expect the Result
|
|
|
|
|
Dear,
Would anyone know the reason and meaning of adding a "#" label before the variable "expr"?
# define DEBUG_ASSERT(expr) do { \
if(!( expr )) { \
fprintf(stdout, "%s[%d] ASSECTION Failure [%s]\n",\
__FILE__, __LINE__, #expr) ; \
abort();\
}\
} while(0)
Thx a lot.
|
|
|
|
|
|
How do I get an individual control to accept WM_DROPFILES? I derived a class from CListBox and added the WM_DROPFILES handler. The control in the dialog resource has AcceptFiles set to true, and I even set:
BOOL CSourceListBox::PreCreateWindow(CREATESTRUCT& cs)
{
cs.dwExStyle |= WS_EX_ACCEPTFILES;
return CListBox::PreCreateWindow(cs);
}
The icon just shows as if drop isn't allowed. Any ideas?
|
|
|
|
|
Nitron wrote: The icon just shows as if drop isn't allowed.
You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
|
|
|
|
|
led mike wrote: Nitron wrote:
The icon just shows as if drop isn't allowed.
You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
um... ok, i guess I wasn't clear on my issue... In the OnDropFiles fcn, I have a statement like: AfxMessageBox("Got Drop!"); the WM_DROPFILES message is never getting processed...
|
|
|
|
|
Hello,
I'm trying to read from the registry a value from a key, but I don't understand some parameters from the reading function.
here is a piece of code:
<br />
CRegKey key;<br />
key.Open(HKEY_LOCAL_MACHINE,"Software\\MyProject\\key");<br />
key.SetStringValue("TRUE","TRUE");<br />
if (key.QueryStringValue(?,?,?)=="TRUE") MessageBox("TRUE");<br />
I dont understand the parameters within the QueryStringValue( )
Can you please explain for me what this parameters do and what values for instance I can set to the parameters?
Another problem:
Every time I execute the program I'm getting an assertation that m_hKey ! = 0
I tried to remove the ASSERT line:
<br />
ATLASSERT(m_hKey != NULL);<br />
but it still stops at the line of this assert and gives me the assertation although I removed it.
why?
and how can I remove it for real?
Thanking you in advance!
-- modified at 15:45 Thursday 27th July, 2006
|
|
|
|
|
Semion_N wrote: CRegKey key;
key.Open(HKEY_LOCAL_MACHINE,"Software\\MyProject\\key");
What is the return value? Open will fail if HKLM\Software\MyProject\key does not exist. Use CRegKey::Create() instead.
Semion_N wrote: Every time I execute the program I'm getting an assertation that m_hKey ! = 0
key.open() is failing, so CRegKey::m_hKey is zero.
Do not remove the ASSERTS, they are used to tell you when you do something wrong.
Semion_N wrote: key.QueryStringValue(?,?,?)
From MSDN:
Parameters
pszValueName
Pointer to a null-terminated string containing the name of the value to query.
pszValue
Pointer to a buffer that receives the string data.
pnChars
The size, in TCHARs, of the buffer pointed to by pszValue. When the method returns, pnChars contains the size, in TCHARs, of the string retrieved, including a terminating null character.
Return Value
If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not of type REG_SZ, ERROR_INVALID_DATA is returned. If the method returns ERROR_MORE_DATA, pnChars equals zero, not the required buffer size in bytes.
CRegKey key;
if (ERROR_SUCCESS == key.Create(HKEY_LOCAL_MACHINE, "Software\\MyProject\\key"))
{
if (ERROR_SUCCESS == key.SetStringValue("TRUE_KEY", "TRUE_VALUE"))
{
char readbuffer[30] = {0};
ULONG buffersize = 30;
if (ERROR_SUCCESS == key.QueryStringValue("TRUE_KEY", readbuffer, &buffersize))
{
if (0 == strcmp(readbuffer, "TRUE_VALUE"))
{
MessageBox("TRUE");
}
}
}
}
|
|
|
|
|
Thank you!!!
and another question:
How can I check if the key exist?
SnaidiS(Semion)
|
|
|
|