|
Oh, I thought the windows he was playing with were derived from CWnd.
Nevertheless, he can probably copy and paste thse two functions to his project (can be found in \\mfc\src\wincore.cpp.) They are actually not that big and not that difficult to understand either. The ::RunModalLoop() implements an infinite loop that continuously checks windows message queue by calling ::PeekMessage(..). If it finds EndLoop() is called, then it breaks the loop. I believe WTL takes a similar approach to implement Windows modality too.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
hi
I have 2 bitmap images, when they overlap each other the background of that image is erased.
How can i make the image still visible even if it is overlapped ?
I tried changing the mode but it does not work ?
Parag
|
|
|
|
|
The background of which image ? How are they stored ? How are they being shown ? Is it erased on screen, or in memory ? What mode are you changing ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I need to access oracle through my VC++ program
can I use ADO?
if I can is there is any code or tutorial to explain that
or any other ideas
Thanks
MR.Byte
|
|
|
|
|
I'm currently using ADO to access an Oracle database with VC++. Have you used ADO before? What are you trying to do? It is pretty much standard ADO stuff apart from a few gotchas with the Oracle stored procedures.
Michael
|
|
|
|
|
I read about it ,but I didn't realy need it before
thats why I ask for help
MR.Byte
|
|
|
|
|
I access my oracle database via an odbc connection using ADO. A good starting point for ADO is
http://www.codeproject.com/database/caaadoclass1.asp
This is the connection string I use for my oracle ADO connection object.
sConnect = _T(" DRIVER={Microsoft ODBC for Oracle}; SERVER=servername; UID=user; PWD=password");
One additional thing, make sure you've got the latest version of MDAC installed.
hope this helps,
Michael
|
|
|
|
|
Thanks
MR.Byte
|
|
|
|
|
i'm a beginner in visual c++,i would like to know how can i prevent my application from Exiting when Enter Key is pressed at start-up.
|
|
|
|
|
Assuming your application is a dialog-based application, then pressing the enter key has the effect of pressing the default button, whichi by default is the OK button, which will cause your button to exit.
If you don't want it to exit, either don't press enter, or change which button is the default one.
If I'm way off then let us know a bit more about the nature of your application and I'm sure we can help
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
derek,
its a dialog-based application,i removed the OK button and placed the Exit function inside the Menu.
|
|
|
|
|
There is one another solution.
You can override OnOK function.
Simply add function:
void CYourDialog::OnOK()
{
}
And your problem disappearing...
--------------------------------------------------
Say Whatever You Know.
Helping other people is good for health.
=========
Manish
=========
---------------------------------------------------
|
|
|
|
|
Why on earth would you leave the button there if you're not going to have it do anything ? You might check in OnOK if return has been pressed, so it works only by pressing the button, but it's just as easy not to make it the default button.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I have defined a new message with "WM_USER+1".
I use "SendMessage" in View class and catch the message with its handler in Doc class. But it does not work.
But when I I use "SendMessage" in View class and catch the message with its handler in View class, it works perfectly.
How to catch the message in Doc class?
Thanks.
Maer
|
|
|
|
|
My MFC's a bit rusty, but I believe documents can only handle WM_COMMAND messages. A document isn't a window, so you can't send it arbitrary messages. A doc can handle WM_COMMAND, but only because MFC handles the message routing itself.
As an aside, you should define your own messages as WM_APP+x, not WM_USER+x, because some common controls use WM_USER. No control uses WM_APP so you are guaranteed not to run into any conflicts.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
Thanks.
Your suggestion is helpful.
|
|
|
|
|
Messages can only be sent to windows and document is not a window.
|
|
|
|
|
|
How can I specify a number is a hexadecimal number in a SQL statement while programming with ODBC?
Thanks.
|
|
|
|
|
You can't. The ODBC numeric literal syntax allows only decimal numbers, so you need to convert your numbers.
|
|
|
|
|
Thanks pal.
I think it is a shortcoming of ODBC that it does not support hexadecimal number, is that right?
Best regards.
Maer
|
|
|
|
|
|
i'm currently using visual C++ and i want to know the library and command to draw lines and boxes and fill the boxes with colours in win32......does anyone knows? Help me i'm really desperate!
jan
|
|
|
|
|
Win32 APIs: MoveTo, LineTo, Rectangle, FillRect
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
If this relates to your earlier question, the answers provided there are still the case, you are going to have trouble if you're trying to draw to a console. You might also find it better NOT to SCREAM AT US, and to provide some clue to your problem in the question, rather than your personal level of urgency, which I'm sure is the same for everyone.
If you're now writing a Windows program ( one with a Window), then GDI is the way to go, and there is a plethora of documentation about it. Most on this site use MFC, so you'll probably need to go to MSDN to get info on doing it under Win32. Be VERY careful of your resources, it's very easy to crash a program under Win32 through leaking resources. Another good source is www.WDJ.com - the site has all the old article code for download and authors are not allowed to use MFC, so you'll find a fair bit of Win32 GDI code there. They do a graphics issue annually, so look for that for each year, and you should find some stuff that will help you. Obviously, if you get stuck, just ask.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|