|
IF YOU WANT,YOU CAN GIVE ME YOUR CODE!
龍
|
|
|
|
|
Can you post the relevant code?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Its a Bitmap Button and i feel it is not getting the proper handle to execute any further operations kindly send the code
|
|
|
|
|
m_btnVerify.EnableWindow(false) the button shouldnt perform an action if clicked.
You need to change the displayed bitmap yourself
Greetings from Germany
|
|
|
|
|
I can change the button image. My problem is button should not call any event. But it is calling button clicked event even it is disabled.
|
|
|
|
|
are you sure that the m_btnVerify is the same that you want to disable and also check that the conditions are met for disabling. You must be enabling the button later some where in your code. Otherwise do you mean that the button does not appear to be disabled. if yes that may be because of the bitmap that is displayed on it.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Since its a bitmap button, you should provide the bitmap to be displayed when the button is disabled. If its not provided, the main button bitmap will be displayed. I suggest you to check your call to CBitmapButton::LoadBitmaps() function.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
What was return value of EnableWindow?
|
|
|
|
|
Hi all.
in my application i m open the .chm file with the help of ShellExecute function.
Here if i m already open the .chm file ,and than again open .chm, so there is number of .chm file opened.
i want if the .chm file is already open than it is not open again.
Please help me for this.
Thank in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Use the HtmlHelp function instead of ShellExecute, it takes care of that.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: Use the HtmlHelp function instead of ShellExecute, it takes care of that.
Please tell me how van i use it i have no idea of that .
if possible please tell me with example.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
const char* help_file_path = "help.chm";
HWND hwnd = AfxGetMainWnd()->GetSafeHwnd();
const char* topic = NULL;
HtmlHelp(hwnd, help_file_path, HH_DISPLAY_TOPIC, (DWORD) topic);
You have to include htmlhelp.h and link with htmlhelp.lib, you'll find them inside the directory of your html workshop, for example "c:\Program Files\HTML Help Workshop"
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi ,
Basically I work on Lotus Notes, and I am a newbie on Visual C++. As of now, I need to access Lotus Notes Dbs and using Notes C++ API toolkit for Lotus Notes. I have set the environment including PATH , Include and LIB variables. I tried compiling my program (MFC/Dialog). However, its giving me the following compilation errors :
error C2065: 'LNNotesSession' : undeclared identifier
Moreover I have set like this:
#include <lncppapi.h>
龍
|
|
|
|
|
Did you include "LNCPPAPI.H" header?
I found it from here - http://www.taupo.co.uk/examples.html[^]. BTW, Google is your best friend.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Thursday, August 14, 2008 5:02 AM
|
|
|
|
|
Hi all, I've written a c++ program that will grab images from camera and will analyze them. it's a kind of some image processing software. but here i want my network users see the result too. one solution is c++ socket programming, I mean i can write a program in c++ that will connect to my image processing server and will get images on the network.
My question is, is it possible for the users to see the results on the internet explorer and not with an additional c++ software? May be a flash module or something that will read stream from server.
Any suggestion?
modified on Thursday, August 14, 2008 1:18 AM
|
|
|
|
|
Hi all,
Can anybody tell me how can i bold the caption of property pages in Property sheet.
The caption is show on tab window of property sheet is a Caption of Property page how can i Bold it.
Please help me for this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi,
You have to subclass the tab control in CPropertySheet. Use CPropertySheet::GetTabControl API to get the tab control in property sheet. Then override the CTabCtrl::DrawItem .
Please refer here[^] and here also[^]for more information.
Hope this will help you.
Regards,
Paresh.
|
|
|
|
|
Paresh Chitte wrote: Please refer here[^]
It helps to focus selected tab.It changes the color of selected tab.
But please tell me how can i Bold it.It is possible or not.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Use a bold font!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm using a CFtpConnection to transfer files from my application to a vendor's device. Sometimes, for no apparent reason, the PutFile() pauses (the vendor's device status shows a file transfer in process, but the PutFile() never returns).
Now here's the rub. If I'm in the debugger, and I break the execution, the transfers all work like a champ, and never fail. If I let the code free-run, the freeze occurs.
The "PutFile()" function is called from a separate thread than the CFtpConnection is created in so that I can detect this "hung" condition. The master thread even includes code to try and re-connect to the vendor's device - but the retry only works IF I BREAK execution in the debugger.
The "reconnected" PutFiles always work - always.
If I break the thread prior to creating the CFTPConnection, and then step through the creation, the putfiles always work.
Apparently I'm not initializing something properly in my create FTP connection (or my system in general).
I don't have to deal with WSAStartup and WSACleanup, do I?
Logic looks like this:
{
xferBlock.file_list=createListofFilesToSend( some_location );
xferBlock.pConnect=MakeFTPConnection( sIPAdress, sUser, sPassword, nError );
pThread=AfxBeginThread( AsyncPutFile, this, THREAD_PRIORITY_NORMAL,0, CREATE_SUSPENDED);
pThread->m_bAutoDelete=false;
pThread->ResumeThread();
// loop until done or timed out
do{
UpdateProgressFromxferBlockInfo();
}while( !isTimedOut() && !isDoneAccordingToxferBlock() );
// if timed out...kill progress....
if( isTimedOut() )
KillTheThread( pThread );
}
AsyncPutFile() basically loops through the file_list and does a pConnect->PutFile() on each member.
Not shown are the retry logic, which fails. But if I find out why it's pausing, maybe the retry logic won't fail?
Any ideas?
|
|
|
|
|
I have an MFC ActiveX ControlWizard generated project!
Need to create thread in the project.
I know in a MFC project use ::CreateThread will cause memory leaks! Instead should use ::AfxBeginThread.
But how about _beginthread ?
|
|
|
|
|
If you're planning to use MFC from the thread AfxBeginThread should be used.
Steve
|
|
|
|
|
Do you mean I MUST NOT use _beginthread in a MFC AppWizard(dll) or MFC Activex ControlWizard project, Do I misunstand your meaning?
And there is also an existing MFC OCX project, using too much _beginthread.
Does it occur memory leaks? And MUST I substitute _beginthread to ::AfxBeginThread?
|
|
|
|
|
fantasy1215 wrote: MUST I substitute _beginthread to ::AfxBeginThread?
Only if the thread being created uses MFC classes.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|