|
How I can get the names of regular buttons? (OK, Apply...) - English
In russian language it is simular with: Da, Primenit'
|
|
|
|
|
Help please
I have a structure that uses CTime date
I am using the date picker to select the date
how can i move the data from the date picker to the CTime variable.
|
|
|
|
|
Use CDateTimeCtrl::GetTime method. One of the overloads uses CTime.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Am Working on a NT Service that spawns a thread for each request. The multithreading issues have been taken care of i.e. EnterCriticalSection and LeaveCriticalSection has been added to make the code thread safe. This Service works perfectly fine on a Single-Processor machine but it crashes on a Multi-Processor Machine.
What do I do to make the service Multi-Processor Safe.
Any help will be Appreciated.
Thanks in Advance
Regards
Imtiyaz Shaikh
|
|
|
|
|
Never done it myself but I THINK you want to take a look at spinlocks.
Matt Philmon
|
|
|
|
|
|
"EnterCriticalSection and LeaveCriticalSection has been added to make the code thread safe"
But it crashes, right?
If I were you I would check the Critical Sections again...
The fact that it does not seem to crash on a Single-PM does not make it thread or SMP safe. I am sure that under the right circumstances (faster processors, higher workload, ...) it might also crash on the Single-PM.
--------------------------------------------------
If my messages appear curt, I apologize.
I try to be brief to save your time as well as mine.
--------------------------------------------------
|
|
|
|
|
Hi there,
Is anyone knows how can i show/hide the pictures from webpage programatically. I know that it can be done with internet options but i want to do it programatically.
If anyone has any idea pls reply me at: paras@engineer.com
thanx in advance,
Paras Shah
|
|
|
|
|
I'm teaching myself C++. I program just for fun, just a hobby. I am currently using MS VC++ Standard
version 4.0. I have been wondering if I should bother upgrading to later versions.
Anyone have an opinion? What are the advantages and improvements of the new versions? And should I
consider upgrading to the Pro edition?
Suggestions would be appreciated.
Thanks. David.
|
|
|
|
|
That's a loaded question. It all depends on whether your "hobby" is something you'd ever want to pursue further and what technologies you want to learn. If all you're doing is writing console applications using C/C++ you have all you need. However, if you want to actually use MFC and most of the code on this website you'll want to move to at least Visual Studio 5.0... though I recommend 6.0 and 7.0 is on the way this year. MFC is a big part of it. If you're doing MFC you definately want to upgrade. If you're interested in COM/ATL/Active X or any of the newer technologies you definately want to upgrade. If you want to be able to write any remotely decent Visual Basic programs (bleh) definately upgrade. VB 6.0 can actually be compiled to native code, can support threading (weakly) and lots of other things. Etc, etc, etc.
Matt Philmon
|
|
|
|
|
Thanks.
I do use MFC (and yes have found some great suggestions and code on this site). I have not gotten
involved in COM/ATL/ActiveX yet, but I may -- we'll see.
Regardless, can you be a bit more specific on what the advantages and new features of v5 or v6 are?
I don't need a whole lot of info, but some important highlights would be nice.
I must admit, I already have VB 6. I've been writing VB stuff for several years -- try not to hold
that against me. I want to move on to the next step.
Thanks a bunch. David.
|
|
|
|
|
Well, if you want to learn what WILL be the standard, you should probably just order the Visual Studio.NET beta from MS, it's pretty cheap.
http://developerstore.com/devstore/product.asp?productID=7590&store=Toolbox_NA
It will be out later this year, and then you can just upgrade to the final rather than buy VC6 now and paying a lot, then upgrading to 7 later and paying even more.
Be aware that it is pretty resource intensive and has lots of bugs right now, but you'll get the idea. Besides, beta 2 should be out soon (within the next 2 months or so).
|
|
|
|
|
hi
i am getting problem if i wannna get data from a specific region/area from the capture window.i have already tried rgn but no use they seem not to work on capture window.plz answer any body who has worked on camera or AVICAP
bobby
|
|
|
|
|
Do you specifically want to *read* only part of the image, or just crop the image you get it ?
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
hi there,
i am working on a pariticular project which requires horizontal and vertical alignment of objects(with equal spacing). Anybody out there can help then please do.
thank you,
vincent.
|
|
|
|
|
What sort of objects, in what context ?
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
Hi guys - hope someone out there can help.
I have a MSFlexGrid control which I have drawn on to my CFormView using the resource editor. I want to display 5 columns of varying widths to fill the entire area I have previously drawn.
The columns widths I want to display are proportionally laid out like this:
| 10% | -20%- | ---- 50% ---- | 10% | 10% | (hope that makes sense!
)
Anyway, I am currently trying to do this like so:
... some code ...
// get the client rect
CRect rect;
m_grid.GetClientRect(&rect);
// work out the width of one of the columns
int nInterval = rect.width()/10;
// alter the widths of each column
m_grid.SetColWidth(0, nInterval);
m_grid.SetColWidth(1, 2*nInterval);
m_grid.SetColWidth(2, 5*nInterval);
m_grid.SetColWidth(3, nInterval);
m_grid.SetColWidth(4, nInterval);
... some more code ...
Now when I do this, I get all of the columns crampt up into the original width of one column!!
I have the feeling that the MSFlexGrid control is using twips mapping mode rather than the one I am using, and I don't know how to change between the two
Can any one help please?
|
|
|
|
|
MSFlexGrid sucks. (Yeah, it IS using twips... you do have to convert.) Check out Chris Maunder's control. It ROCKS and does this crap FOR you though you lose the luxury of creating it in the dialog editor.
As for how to do it, here's a primitive but more or less functioning example:
1) Global: int g_iTwipsPerPixelX=0;
2) In view.... OnCreate
CDC* pDC = GetDC();
int iPixelsPerInch = pDC->GetDeviceCaps(LOGPIXELSX);
if (iPixelsPerInch)
g_iTwipsPerPixelX = int(1440 / iPixelsPerInch);
3) Handle OnSize for the dialog in your formview. Call function AdjustColumnWidths();
4) Here's more or less your function:
void CMyDialog::AdjustColumnWidths()
{
if (m_grid.m_hWnd)
{
// get the width of all the columns exept the second one
CRect rect;
m_grid.GetWindowRect(rect);
long lGridWidth = rect.Width();
// alter the widths of each column
m_grid.SetColWidth(0, lGridWidth*.10*g_iTwipsPerPixelX);
m_grid.SetColWidth(1, lGridWidth*.20*g_iTwipsPerPixelX);
m_grid.SetColWidth(2, lGridWidth*.50*g_iTwipsPerPixelX);
m_grid.SetColWidth(3, lGridWidth*.10*g_iTwipsPerPixelX);
m_grid.SetColWidth(4, lGridWidth*.10*g_iTwipsPerPixelX);
}
}
|
|
|
|
|
Help me, please!!!! I need a bit of code about "hooks" in relation to monitor windows messages of other applications. How can I caught the window text???? For instance, how can I caught a button text??? If anyone knows something about them, you don't hesitate to reply me.
Thanks in advance.
|
|
|
|
|
While working in MSDev there was an error and it shut down. Since then, whenever I open the project I
was working on, I get a message telling me that there was an error opening the ClassView Information
File and that the ClassView pane won't be available. Everything else is fine.
Can anyone out there tell me how to either repair or rebuild the ClassView Information File? I miss being
able to use the ClassView pane.
BTW, it works fine on all of my other projects, so it is just for the one I was working on when
MSDev had to be shut down. Also, the project compiles and works just fine too. So it seems
to simply be a corruption of the ClassView Information file for that one project.
Thanks. David.
|
|
|
|
|
I presume all four questions relate to the one problem ?
Delete your .clw file, it contains your class wizard information. If this does not solve it, ( and it should ), try backing up everyfile that has myfilename.ext format except the .cpp and the .h, delete them progresively until you find the corrupted file ( MSDev will rebuild it for you, this happens to me fairly regularly )
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
Close the workspace and close VC++. Then, delete the *.ncb, *.opt and *.clw files. These will be regenerated when you next start VC++ and your ClassView will work fine.
Mark
|
|
|
|
|
Hey, thanks.
That works with the following snag: I could not delete the .ncb file -- Explorer kept giving me an access
denied message. I deleted the .ncb file from a different project and it deleted fine and was regenerated
fine. So, your suggestion was valid, but the corruption of the file was bad enough that even
Explorer is having trouble with it.
Regardless, I managed to get everything back to normal the hard way. I simply created a new
Workspace, deleted everthing out of it and then added all the files I needed to rebuild my
program workspace. It is working fine again.
Thanks for the suggestion -- it seems that it would work except that my .ncb file is totally FUBAR.
David.
|
|
|
|
|
You couldn't delete it because the project was open. Close the project and delete it.
|
|
|
|
|
While working in MSDev there was an error and it shut down. Since then, whenever I open the project I
was working on, I get a message telling me that there was an error opening the ClassView Information
File and that the ClassView pane won't be available. Everything else is fine.
Can anyone out there tell me how to either repair or rebuild the ClassView Information File? I miss being
able to use the ClassView pane.
BTW, it works fine on all of my other projects, so it is just for the one I was working on when
MSDev had to be shut down. Also, the project compiles and works just fine too. So it seems
to simply be a corruption of the ClassView Information file for that one project.
Thanks. David.
|
|
|
|