|
I meant that is the only way that code will work as shown.
I didn't mean that's the only fix.
You can pass any valid window handle or NULL to OpenClipboard().
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
ok it's working when i pass NULL in OpenClipboard().Thanks for help..![Rose | [Rose]](https://www.codeproject.com/script/Forums/Images/rose.gif)
|
|
|
|
|
MsmVc wrote: ...i am useing this code in header file.
Why?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
How to use CSpinButtonCtrl to control the float value in edit control?
Is CSpinButtonCtrl just used for integer?
|
|
|
|
|
Yeah, as far as I know it is.
Just think about it for a second - if the range is 100, we can read the value and divide it by 100 to get a float.
Of course, if the range is only 100 - the smallest increment you may make is 1% of the range. If you goto a range of 1000, you can inc/dec by 0.1% of the range. Then of course, you could have a larger range, and go to (say) 100,000. Each increment would then only represent 0.001% of the range. and so on and so forth
1. Read value
2. divide value by range
3. create a string that represents the resulting number
4. put the result into the edit control.
|
|
|
|
|
Hi All,
I m fighting against a problem that drove me crazy for long hours, I wanna create a simple prog like Client/Server under linux using C code. I wrote a Server.c and Client.c Files but when i type
$gcc -c Server.c Client.c
$gcc -o Blood *.o
it told me that there is a double declarion of the function main. (i'm using linux)
So could some one tell me how could i test my prog on the same mchine ??? (local) Thank you !!!!
i Need Help so plz !!!
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
No wonder: While you should build two applications with the Client.c and Server.c , you are actually issuing the commands to build just one app with those files.
BTW there's a Linux forum on CodeProject .
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]
|
|
|
|
|
yeah i wanna build one prog using those two files and then run the prog so that i wanna run a process fro a client and another for ther server on a same machine (local). but i'am asking what should i write in the terminal (as i said i'm under Linux) !!! I m despered t spent alla the day asking that and looking in the net but no way
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
If you want to build just one application using two (or more) source files, then there should be one (and only one) function main .
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]
|
|
|
|
|
yes you are all right but in socket there are always a C file for the client and another one for the Server but i forgot how we edit the links between the c files and the o files under linux, i know that there is may be soem command like make or a shell comands i forgot it , i used to compile them about 4 years ago :p and now i need to run that app on my computer (and for the Linux Session i posted this message 5 jours ago and no reply till now :'()
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
What about 'man gcc '?
Probably you have to build 2 apps, for instance
gcc -o cliet client.c any_shared_obj.o
gcc -o server server.c any_shared_obj.o
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]
|
|
|
|
|
but should i type after that sth like
gcc -o Sthing *.o
??? and then run the app Sthing!!!
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Blood_HaZaRd wrote: gcc -o Sthing *.o
*.o it's only a wildcard way to say 'link with all object files you find'. You get the error because the compiler finds both client.o and server.o (and both have a main function inside). I strongly suggest you to issue the man gcc command.
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]
|
|
|
|
|
i already did the man gcc but with no hopes it stills abstractiv :p
any way thx for your help i ll try to ask the question to my professor and i ll write you the answer if he ll give it to me of course
Thx again (y)
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Good Night, and Good Luck.
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]
|
|
|
|
|
Blood_HaZaRd wrote: yeah i wanna build one prog using those two files and then run the prog so that i wanna run a process fro a client and another for ther server on a same machine (local).
If you want to run two different processes, then you should build two different programs. Yes, it's possible to start two different processes from a single program in Linux using fork() , but that appears to be way beyond your current skill level.
|
|
|
|
|
Hey there, ive got a feeling there wont be an easy answer / solution to this question but if you dont ask you dont get!
I was wondering if there is any way to globally capture mouse overs in windows. Iam not sure if the way ive described this will make much sense to anyone so a quick usecase might help. When a user opens up the start menu and highlights 'my documents', the background colour changes to blue to show you have your mouse hovered over it. Can this event possibly be captured? I imagine capturing mouse overs on the start menu will be different to say catching a highlighted menu option in visual studio. But id really like to know if there is any way of globally detecting when hovering the mouse "highlights" something on the screen in relation.
Any help guys?
Thanks in advance
|
|
|
|
|
Have you thought about getting into the address space of the process that creates the window(s) and subclassing the particular window in order to capture the relevant messages?
|
|
|
|
|
I had looked into this and it doesnt seem to hard to do providing I learn enough about the win32 API. However the part which seems to vary between applications is capturing the relevant messages. Ive used winspector to look at messages being sent back & forth between windows and there does appear to be any pattern to what happens when something under the cursor changes due to a 'mouse over'. I noticed the startbar (dv3controlhost , syslistview32) calls wm_ncpaint followed by wm_erasebackground when I move between items and the mouse overs activate but this doesnt seem consistance with other applications ive looked at like Adobe Audition. But ive notice Adobde Audition uses alot of custom classes in its contruction......
|
|
|
|
|
Hey everybody!
I am looking for a way to get a log-in notification from a service (I found stuff about winlogon notification package, but it doesn't work nowadays... The registry keys just doesn't exist anymore).
Can anyone give a little hint please?
thanks!
|
|
|
|
|
|
Thanks!
does "SERVICE_CONTROL_SESSIONCHANGE" works also in XP ???
|
|
|
|
|
Green Fuze wrote: does "SERVICE_CONTROL_SESSIONCHANGE" works also in XP ???
Yes.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello.
Can someone explain me how to create a C program using Visual Studio 2005?
(I've been trying lots of ways, e.g. creating c++ files, and changing
extension to a c file, but I was getting errors).
Thanks!
|
|
|
|
|
Write your program in VC++ seeing as it's an extension to the C language and just write your C code. You can ignore the C++ additions such as object-orientation etc
(or go with Mike's suggestion.)
[Edit]
If you're looking for a good C compiler, I'd recommend Pelles C. It's free, too.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
modified on Sunday, October 19, 2008 7:15 AM
|
|
|
|