|
Hi All
I goted the responsibility for making an application of Inventory Management System in VC++.
can any one please told me about that.also if you have send me a demo project also.
waiting for your reply
mailing me
Yogi
|
|
|
|
|
|
I am looking for demo project in vc++ for inventory management System
Thanks
mailing me
Yogi
|
|
|
|
|
How to fix this ?
wchar_t buf[50];
swprintf( buf, L"%s", L"Hello world" );
=> Warnings (in MS Visual Studio 2005)
warning C4047: 'function' : 'size_t' differs in levels of indirection from 'unsigned short [3]'
warning C4024: 'swprintf' : different types for formal and actual parameter 2
|
|
|
|
|
wrote: warning C4047: 'function' : 'size_t' differs in levels of indirection from 'unsigned short [3]'
No idea, what should cause this warning here ? But suggesting you to replace your code with following code,
wchar_t buf[50]= {0};
swprintf( buf, 50,L"%s", L"Hello world" );
|
|
|
|
|
From the Online-MSDN, search for swprintf:
[...]
int swprintf(
wchar_t (&buffer)[size],
size_t count,
const wchar_t *format [,
argument]...
); // C++ only
[...]
With
buffer = Storage location for output
count = Maximum number of characters to store in the Unicode version of this function.
format = Format-control string
argument = Optional arguments
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Was this reply meant for me ?
|
|
|
|
|
Partially.
I seemed that you knew what the correct way to call swprintf was, but were unsure about "why" (mainly because you used the limit 50 without any explanation).
That might, however, be a misinterpretation - I am not a native speaker of English, and might have misunderstood your comment.
My reply just gave the prototype, so that both you and the OP might read it, if necessary.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Sebastian Schneider wrote: but were unsure about "why" (mainly because you used the limit 50 without any explanation).
As array size is 50, I used it, and I think its implicit.
Sebastian Schneider wrote: I am not a native speaker of English
Same here.
Sebastian Schneider wrote: My reply just gave the prototype, so that both you and the OP might read it, if necessary.
I thought, by mistake you have posted it to me .
|
|
|
|
|
Thanks
|
|
|
|
|
Which API system calls to create a folder on Vista.
Its not CreateDirectory, I have tried it using API Monitor.
May be some shell's API. Can anybody help?
Thanks.
|
|
|
|
|
|
Thanks Paresh.
But I want to know which API system calls when we create a folder from explorer on vista.
|
|
|
|
|
CreateDirectoryEx()? SHCreateDirectoryEx()?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hi All,
If I place a button in a dialog box, my perception is that the button should be the part of my dialog class. But when I see my dialog box there is no Button object.
How can I access that Button object. I need that object because I want to enable and disable that button according to some condition.
I also want to attach toottip to that button.
Please let me know if further clarification is required.
Suraj
|
|
|
|
|
Gupta Suraj wrote: How can I access that Button object. I need that object because I want to enable and disable that button according to some condition.
You need to associate a variable with the button (how to do this depends of which IDE you are using). The variable type must be a CButton in order to access functionalities of your button.
|
|
|
|
|
Other way is....
CWnd *pWnd = GetDlgItem( IDC_BUTTON/* Ur Button ID */);
pWnd->EnableWindow( FALSE );//Disable the button
pWnd->EnableWindow( TRUE );//Enable the button
|
|
|
|
|
Gupta Suraj wrote: my perception is that the button should be the part of my dialog class.
Dialog class will be based on dilaog template resource, button would be part of that resource.
Gupta Suraj wrote: How can I access that Button object. I need that object because I want to enable and disable that button according to some condition.
Apart from method Cedric has suggested, you can use GetDlgItem function for accessing controls on dialog,too.
GetDlgItem(IDC_MYBUTTON)->EnableWindow(FALSE);
|
|
|
|
|
If u r using VC++
Put the button in the Dialog.
Right Click on it and select "add variable"
Select access type (public/private)
Select Variable type (CButton)
Give a variable name (ex: m_buttonHello)
Now in the source file (.cpp) for dialog class
write: m_buttonHello.EnableWindow(TRUE) or m_buttonHello.EnableWindow(FALSE)
wherever necessary
Cheers
|
|
|
|
|
Hi!
I am using Visual studio 2005.Net and writing an application in VC++.
I am using Microsoft Hirarchical FlexGrid Control 6.0 activex control in my project.
I want to use the combobox in the cell of the flexgrid while i am doing this i am
not getting the combobox dropped down while clicking on it instead it goes behind the
flexgrid.
Viral Joshi
|
|
|
|
|
Could you please share your code so that it would be easier to track down the issue ?
|
|
|
|
|
i am trying to pass a integer value to my thread
int i = 9;
int *k;
k = (int*)i;
AfxBeginThread(Test,k);
and then using it in my thread like this
UINT Test(LPVOID pParam)
{
time_test = *(static_cast<int*>(param));
}
time_test is declared globaly as integer variable.
but the line written in thread declaration is giving a debug error while running
please help me in this
|
|
|
|
|
sulabh_expert@rediffmail.com wrote: time_test is declared globaly as integer variable.
Why would you provide the thread with an integer value only to assign it to a global variable that could read from the thread in the first place if the main thread had assign the desired value to it?
To get started the right way when learning multithreading, have a look at Joe Newcomer's excellent article here[^].
It will teach you the basics and prevent you from making common mistakes.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
sulabh_expert@rediffmail.com wrote: k = (int*)i;
That's a mistake, you should do k = &i; .
If you need read-only access to the external parameter, use, something like the following code:
int i=9;
AfxBeginThread(Test, (LPVOID)i);
...
UINT Test(LPVOID pParam)
{
int iValue = (int) pParam;
}
On the other hand, if you need full access to the externa parameter, the code will be:
int i=9;
AfxBeginThread(Test, (LPVOID)&i);
...
UINT Test(LPVOID pParam)
{
int * piValue = (int*) pParam;
*piValue = 7;
}
Hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|