|
CPallini wrote: dear clarke,
You would't be related to the Griswold[^] family now. Would you?
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
"is an intensely proud, loyal, and lovable upper-middle class family man"
Uhm, maybe!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi pallini,
im sorry for the addressing u wrongly,
i hv tried this also and got the same error.
hope we get the sol on this.
|
|
|
|
|
Oh don't worry, I was just kidding.
Are you able to create a fresh new project with just the old (working) source files?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi,
i hv told you already that i have done this exercise already.
if u have any new ideas kindly pass it on.
|
|
|
|
|
i want to write SQL predicate FREETEXT in String query in MFC, using CString.Formate function....i m un able to write predicate in it...
|
|
|
|
|
Hey Guys I am having some issues with some Char* output from a function I am trying to write. So I have a little program for example:
Foo(char* outPut)
{
outPut = "fooOutPut";
}
int main()
{
char[32] testString;
Foo(testString);
cout<
|
|
|
|
|
Hi,
output is a pointer, you make it point to a string literal ("fooOutput").
testString is not a pointer, it is a 32-character buffer; it can be used like a pointer, however it cannot be changed, it will always point to that buffer.
The solution to this discrepancy depends on what you want:
1. maybe you want Foo to stuff its data into whatever buffer you pass it; you then need strcpy() or something similar, not a simple assignment.
2. maybe you want main to hold a pointer, then you need to declare char* testString ; however that would still not be sufficient as the pointer gets passed by value, i.e. Foo can read it, but whatever it writes to the pointer won't alter the pointer in Main. To solve that, you either need an extra indirection (a second asterisk), or simply use the return value instead of a parameter.
|
|
|
|
|
Hi
I try reading file through windows programming in vc++. My code like
DWORD wmWritten;
char strVal[1024];
dir = CreateFile(textBuffer,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
ReadFile(dir,strVal,1024,&wmWritten,NULL);
textBuffer is my input file.
i got all lines from text file. But want find some delimiter or i want return particular line text or (delimiter line text)
Please give idea or sample code
Regards,
M.Mathivanan
|
|
|
|
|
Hi,
you could scan the input, i.e. have a loop look at each of the characters in strVal after you filled it (make sure to use the return value of ReadFile as there may be less than 1024 characters read).
it would be easier to use some higher-level I/O functions. Assuming you want C code, you could use fopen(), fread(), or better yet fgetline(). Look them up in your C book and in MSDN.
And always check the return value you get from almost all Windows or C functions.
|
|
|
|
|
|
mathivanaan wrote: But want find some delimiter...
Have you tried strchr() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hello all,
VC6, MFC, XP
My application has a Formview based view with many static controls all over it. The CStatic controls are used in a similar fashion as CButtons are used: The user makes selections by pressing on them. I really do have my reasons for not using the CButton control, but even if I were to use it, I need to find a way to get notified when the 'button' is released.
When they are pressed, I do get the BN_CLICKED messages, but I can not find any messages (in WinUser.h) that could be returned when the buttons are released. Is there such a message? Any suggestions or tips to get or simulate this message would be appreciated and be a great help! I'm working with a timer based work around, however the application really needs to track exactly how long the button is down.
Best Regards,
Paul
|
|
|
|
|
I don't remember the details, however there is bound to be some mouse down and mouse up events.
|
|
|
|
|
Yes thank you! I was playing with those in the static derived class - I need to be able to forward those messages in a similar manner and form as the BS_CLICKED message. In other words, the View handles the message in the following fashion:
ON_CONTROL(BN_UNCLICKED, ID_BUTTONx, OnButtonUnClicked)
afx_msg void OnButtonUnClicked(UINT nID)
Now if I can only find the parameters in the SendMessage function to send such a message above...
|
|
|
|
|
If the button stays "in" after it has been clicked, it sounds as though you need to look at BN_PUSHED and BN_UNPUSHED .
If that won't work, you may have to use the BS_OWNERDRAW button style and the DRAWITEMSTRUCT structure for this task.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hello David, Thank you for replying. BN_UNPUSHED was the first thing I tried, yet I wouldn't get the notification. I suspect that notification isn't sent for static controls like it is sent for button controls.
Regards,
Paul
|
|
|
|
|
Did you set the "Notify" style on the static control?
If you vote me down, my score will only get lower
|
|
|
|
|
Hi Roger - Really appreciate your articles, I've learned quite a few things from reading them!
The static controls are created dynamically; I specify the following as the style: #define DEFAULT_STATIC_STYLE ES_CENTER|WS_BORDER|BS_NOTIFY
I do get the BN_CLICKED notifications, but not the BN_UNPUSHED notifications. Is there another flag that I need to set? I don't believe so, I suspect the CStatic control doesn't send that type of notification.
Thank you,
Paul
|
|
|
|
|
I want to convert HTML file to txt file with cut all HTML tags.
It look like Save as (*.txt) in the Internet Explorer software.
Have anybody found some functions or articles that support this issue?
Please advise.
Thanks you
|
|
|
|
|
Why don't you try libcurl library.there are many examples in the download file.maybe can help you...
|
|
|
|
|
hello, i'm using vc++ 6 , in my app i need to do some things when the spin control is released, but in vc++6 there is only two events for this control: UDN_DELTAPOS and NM_OUTOFMEMORY, no events for control released, i've been reading that in .net 2003 there is a event NM_RELEASEDCAPTURE in order to do this, but how can i do this in VC++6?
|
|
|
|
|
From commctrl.h:
#define NM_RELEASEDCAPTURE (NM_FIRST-16)
See if you get this notification with ON_NOTIFY
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
>Nothing is free in the universe.<
|
|
|
|
|
I'm not sure to understand what you mean, perhpas because I'm newbie .
I looked for ON_NOTIFY and the unique reference is:
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN1, OnDeltaposSpin1)
no references for NM_RELEASEDCAPTURE,of course inside of commctrl.h
i can find this line that you posted:
#define NM_RELEASEDCAPTURE (NM_FIRST-16
but I don't know what to do with this, can you explain a little more?
|
|
|
|
|
Try this:
ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SPIN1, OnSpinReleasedCapture)
The OnSpinReleaseCapture method should look the same as OnDeltaposSpin1 , am not sure how it looks in VS6 anymore, something like this probably:
void OnSpinReleaseCapture(LPNMHDR lpNMHDR, LRESULT *pResult) . Am not sure you will get this called but it is worht a try i guess.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
>Nothing is free in the universe.<
|
|
|
|