|
MSDN says:The STN_CLICKED notification message is sent when the user clicks a static control that has the SS_NOTIFY style.
Now I add a static control in a dialog box,and I set SS_NOTIFY style.I want to ask whether the STN_CLICKED message is sent or not when I click the static control.I define a function——OnClicked(),which is used to handle with the STN_CLICKED message.But the function is not transfered when I clicked the static control.Why? I need your help.
|
|
|
|
|
How are you trying to catch that notification message? Notifications like BTN_CLICKED and STN_CLICKED are not sent as "normal" Window messages, but contained in the parameters for the WM_COMMAND message.
You should be looking for WM_COMMAND messages, and checking its parameters for the notification you are interested in. Of course, if you are using MFC, just use ClassWizard.
One small note. The STATIC control was not really designed to receive input, so make sure you are not doing something with it that it was not really designed for. (For example, creating a hyperlink control.) If you need imput, use an input control.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hello Friends,
Can anybody suggest me some web sites for Unix tutorials. Programming C and C++ in unix operating systems.
Thanks in advance
Neelesh K J Jain.
|
|
|
|
|
|
Hi!
I'm having trouble with my MFC mapeditor. When I load a file the application changes the path to the directory the loaded file was in. How do i change it back?
I have my maps in maps/ and then I have a file called objects.ini in my basedirecotry. But if I load a map i can't do something like: fstream file("objects.ini").
Thanks for your help
|
|
|
|
|
It's usually never a good idea to use a relative path. Use an absolute path and you'll always be safe.
"Ideas are a dime a dozen. People who put them into action are priceless. - Unknown
|
|
|
|
|
if you are facing this problem with CFileDialog. Use OFN_NOCHANGEDIR flag in the cunstructor paramater of CFileDialog.
suhredayan There is no spoon.
|
|
|
|
|
I am having trouble Opening a CRecordset whose SQL select stmt returns a text column.
When the m_rs_data.Open(...) executes, the method triggers an exception that returns "Data truncated" in a text box.
Can anyone tell me how to properly fetch a row from my dB when the table includes a TEXT column?
Any help would be most appreciated.
Here's the code (some details left out)
CDBInstance *dbInstance<br />
CString sql = "select UID,XId,MsgSeqNum,Time,Dirctn,BeginString,SenderCompId,TargetCompId,OnBehalfOfCompId,DeliverToCompId,SenderSubId,TargetSubId,OnBehalfOfSubId,DeliverToSubId,Sender_C,Receiver_C,MsgType,TransactTime,<br />
rawFIX,CreateDate from TxAudit.dbo.AuditLog "<br />
<br />
CRecordset m_rs_data(dbInstance);<br />
<br />
m_rs_data.Open(selectSQL<br />
, CRecordset::dynaset<br />
, CRecordset::none);<br />
|
|
|
|
|
This error occurs when any of the data exchange field is smaller than their corresponding column in the database. A common chance is when any database column has a varchar field greater than 255 in size and the RFX_Text() function is called with default value of 255 for nMaxLength parameter.
suhredayan There is no spoon.
|
|
|
|
|
Is there a method I can call that will change this default value? Or some way to override the default, say, when I construct CRecordset??
I'm actually using a class (CODBCRecordset) that's wrapped around CRecordset. The only method I call is CRecordset::Open(...) ....
Link to CODBCRecordset
http://www.codeproject.com/database/parameterodbc.asp
|
|
|
|
|
BTW, if I change my select SQL to say something like :
select cast(rawFIX as varchar(4000)) as "rawFIX"
the Open(...) does not raise an exception ....
|
|
|
|
|
Hi,
I have a dialog with a ListBox Control. I want to map it, using ClassWizard to CCheckListBox but ClassWizard only let me to map it to CListBox. How can I set ClassWizard so I would be able to choose CCheckListBox.
thanks,
yaron.
|
|
|
|
|
You'll need to modify the .h and .cpp files manually. Just open the two files and change all references of CListBox to CCheckListBox .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
A developed a MFC project with a menu resource.
During my program execution, the underline characters of the menu are only shown while the Alt key is pressed; if the menu is opened via the mouse then they are not shown.
How can I change this, so that the underline characters of the menu are always visible?
Teresa
|
|
|
|
|
desktop->right click->properties->appearance->effecte->"hide underlinedletters untill i press ALT key".
suhredayan There is no spoon.
|
|
|
|
|
Teresa Azevedo wrote:
...the underline characters...
These are called mnemonics.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi i'm trying to build a ms access database controller using visual c++ using the ado format. This also has to have client sever using ip addresses. does any one have any example code of a working system?
or a tutorial to follow to conplete this?
regards
|
|
|
|
|
sir i have added Microsoft Forms 2.0 Textbox from the registered active x controls in VC++. while executing my project i can't able to type anything into tha text box. why? pls give me the answers.
|
|
|
|
|
microsoft forms packages are not supposed to be used from other than VB.
suhredayan There is no spoon.
|
|
|
|
|
The question goes to Microsoft insiders (employees). Are there any new classes, controls, etc...?
Software is too expensive to build cheaply...
|
|
|
|
|
Hi ppl.
I have a HWND of a ListCtrl with report style.
I want to know the no of columns it has.
F1 please!
|
|
|
|
|
SendMessage(SendMessage(hListCtrl, LVM_GETHEADER, 0, 0), HDM_GETITEMCOUNT, 0, 0);
|
|
|
|
|
Great!!!
I was about to post this solution myself, but you did it first.
Thanks (beerboy_22);
this is this.
|
|
|
|
|
An one know how to add a shortcut or a program into the folder Network Connections in Control panel?
Thank you in advanced
Long
|
|
|
|
|
Hello, I have started a MFC project in Visual C++ .NET 2002, over Windows 2000. I wanted to use the new XP controls, so I left checked this option in the wizard, and everything was right until I used a wrapper class for CToolBar, this class override the function OnEraseBkgnd() and put a bitmap image as background. Under W2000 works, but under XP the Toolbar appear unchanged, as if the WM_ERASEBKGND message wasn't processed.
Can anyone help?
If it can't be solved, Does anyone know how can I remove the XP controls from the project?.
Thanks.
|
|
|
|