|
If you don't set dwFlags to include FORMAT_MESSAGE_ALLOCATE_BUFFER you can allocate the buffer yourself on the stack and not call LocalFree() to release it.
On another hand, how do you know the message will fit into 512 bytes?
|
|
|
|
|
I agree with Nemanja Trifunovic.In accordance with his idea,you can refer to the following codes:
LPVOID lpMsgBuf; <br />
FormatMessage( <br />
FORMAT_MESSAGE_ALLOCATE_BUFFER | <br />
FORMAT_MESSAGE_FROM_SYSTEM | <br />
FORMAT_MESSAGE_IGNORE_INSERTS, <br />
NULL, <br />
GetLastError(), <br />
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf, <br />
0, <br />
NULL <br />
); <br />
MessageBox(NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION); <br />
<br />
LocalFree(lpMsgBuf);
|
|
|
|
|
Producer-consumer problem on a circular buffer. Multiple producer and multiple consumer threads may be running concurrently using either semaphores or a combination of mutexes and condition variables.
|
|
|
|
|
yes.
This signature was proudly tested on animals.
|
|
|
|
|
Yes and the kernel is preemptive, and today is the 'dumb people making pointless posts' day.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I would actually even try a SRW Lock, but then since this case might require FIFO (SRW Locks are not FIFO, and the algorithm isn't "fair" either), a CRITICAL_SECTION is the best option. I'm assuming that this is all happening within the same process, but if not, you could use a Mutex.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
A program (server) that reads a single number as input, searches the file for a line with the input integer as the serial number and writes the proverb or the short quotation as output. If the number is not found in the file, the program should return some default message of your choice.
A program (client) which asks the user to enter a number and outputs the same
Is it possible to connect the client and the server programs with a named pipe so that the client can display the output from the server program.
|
|
|
|
|
Yes, it is possible.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello,
I have a question concerning VC++ and columns and checkboxes. This I'm assuming
is a common hurdle to jump when building a GUI.
I want to to have a graphical interface that shows a list of columns.
The first column, describes the item the following columns could A,B,C etc but are
"checkbox" columns that will profile the item in the first column.
I went down the merry path of looking into CListControl in MFC that has a column
and by setting the style to CHECKBOX you can have a single item with one checkbox,
nice to know. Not what I need.
Datagrid looks like that is what I need, but I dont see this in MFC.
Can somebody point me to an example and even tell me if this is what I need.
Thanks in advance,
Garyc
|
|
|
|
|
Have a look at this article [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Much appreciated. I will have a gander at this.
|
|
|
|
|
I've used XListCtrl, from here at CP, many times.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
You can use the subitem-image to display the checkbox. Just copy the state-images to the official image-list, and react to mouse-click on the subitem-image to change the checkbox.
I have implemented this on CGridListCtrlEx - Grid Control Based on CListCtrl[^]
|
|
|
|
|
Hello
Every body
Please help me ,i am stuck with this problem
I have created two groupboxes and with radiobuttons on the same dialog .My problem is that the functions of radiobutton of one group is mixed with another and i cannot operate them indepentl
Thansk in advance
|
|
|
|
|
I'm not sure i understand you correctly but in resource editor, give the "Group" (WS_GROUP) style to the first radio button in both of your "radiobutton-sets".
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
i cannot able to understand u , please explain me
|
|
|
|
|
Ok, let's go step by step, did you create your dialog with the resource editor in Visual Studio?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
i have create a groupbox and in its property i have saved Group.Is important that to assign any variable ?
|
|
|
|
|
thank u very much,it works
|
|
|
|
|
hello,
I can write a program to convert from database file to excel(in .csv) .
But is there any auto conversion from database to excel so that i can write a macro in excel sheet and convert a database file into excel file.
Pritha
|
|
|
|
|
prithaa wrote: hello,
I can write a program to convert from database file to excel(in .csv) .
But is there any auto conversion from database to excel so that i can write a macro in excel sheet and convert a database file into excel file.
And I could be a better man (it is the Christmas' good intentions list, isn't it?).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
prithaa wrote: thanks
You are welcome.
prithaa wrote: what is the reply
What was the question?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
prithaa wrote: But is there any auto conversion from database to excel so that i can write a macro in excel sheet and convert a database file into excel file.
Did you try the Excel help? See Data->Import ...
|
|
|
|