|
Thanks!
I asked experts-exchange also and proved me wrong on the windows.x . I can compile it now. And i can view a bitmap in the client area. Hopefully i will find out why i could not display a bitmap when using a win32 code.
Well it's hard to program something when there is almost no documentation on WTL.
Hopefully Microsoft will support it and forget all the talk about putting it away.
Regards
Andla
|
|
|
|
|
What are the special characters for identifying the end of a line, carriage return and end of fiel when reading a text file?
or is there any?
|
|
|
|
|
end of line will have some combination of cr & lf (\r & \n) depending on the operating system / editor that generated them
end of file ... hmmmmm ... not really ... get the file size before loading it and set the last + char pos to zero manually
or use the CFile classes of course
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Use istream functions getline and eof.
|
|
|
|
|
Hi,
I have a dialog box that I don't want users to be able to move. Currently I have timer running that centers the window ever 5 milliseconds, which could prove to be a bit heavy on resources so I don't want to continue this way.
My application is a Windows CE app and I want the window to be positioned in one place and never moved.
Any ideas???
Thanks,
Claire
|
|
|
|
|
I am not sure if there is a way to fix the position of the dialog box. Instead of centering every 5 milli seconds, you could check if the position of the dialog box has been changed. If so, you could then reposition.
Siva
|
|
|
|
|
I am not sure but I think you can intercept OnMove event and force to 0 cx and cy.
|
|
|
|
|
Hello, the codegurus around the world.;) (Copy Right 2001 Masaaki Onishi)
Check here by Paul DiLascia.
I think that this works for Dialog application.
http://msdn.microsoft.com/msdnmag/issues/01/02/c/c0102.asp
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
detect WM_MOVING. You might be able to prevent movement by resetting the drag rectangle to the initial dialog position
P.S. - Why don't you want the dialog moved?
|
|
|
|
|
try this:
1:Add the following in the *.h:
afx_msg UINT OnNcHitTest(CPoint point);
2:Add in the *.cpp
ON_WM_NCHITTEST()
3:Add in the *.cpp:
UINT CYourDialog::OnNcHitTest(Cpoint point)
{
UINT nHitTest=CDialog::OnNcHitTest(point);
return (nHitTest==HTCAPTION)?HTCLIENT:nHitTest;
}
good luck for you!
julia
|
|
|
|
|
CMenu *pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
pSysMenu->RemoveMenu(SC_MOVE, MF_BYCOMMAND);
|
|
|
|
|
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.
|
|
|
|