|
Hi,
I created an ATL object (DLL) so that it creates 10 threads. These threads calling ActiveX EXE on remote side (it's developed by vb6) by CoCreateInstanceEx(). ActiveX EXE has been developed in order to do parallel database operations. There's no problem with multithreading, it creates 10 threads. But i can't get any response from database. Queries cannot been executing and neither select queries. As a result system hanging...
I am using MS SQL Server 2000.
What is lying behind of it? What can i do?
Thank you.
Orkun GEDiK
ASTRON
|
|
|
|
|
All I want to do is add my menu to my Dialog based C++ MFC application.
I have added the new menu resource and provided the menu fields (not done the event handlers yet).
But all I get displayed when the application is run is the 'Standard System' menu.
I have read textbooks, searched for a sample; but all either relate to dynamically adding menu items or using the Class Wizard of C++ Version 6.0. I am geting a bit lost!
I am using Visual Studio .Net --- I thought Menus would be easy!!
Please, pleae help.
grahamfff
|
|
|
|
|
Create your menu resource (IDR_MENU1 )
Add a CMenu member variable to your dialog class
CMenu m_MyMenu; In OnInitDialog() add the following code:
m_MyMenu.LoadMenu(IDR_MENU1);
SetMenu(&m_MyMenu);
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks, this was just what I was looking for but never found.
Obviously a superstar!
grahamfff
|
|
|
|
|
Hi,
I have a ruler bar control which is dock on top of a OpenGL view. I want to draw the ruler bar according to the "zoom level" of my 3D object. To do that, I need a way to convert the distance between two OpenGL points into pixels.
Thanks!!
Jean Bédard
Optifor Inc.
|
|
|
|
|
Try gluProject!
gluProject maps object coordinates to window coordinates.
You have to link with glu32 though.
|
|
|
|
|
I am a relatively new C++ user. I am developing a program to run a control algorithm. Basically what the program does is communicate with an analog I/O card that I have installed. It reads voltage values from the I/O card and uses them to compute and output a control value to a separate channel.
I am currently attempting to use windows forms to accomplish this. When I run the program, I want a form to come up that allows me to change control parameters. There will be a "start" button which begins execution of the control algorithm (essentially just a program loop). Then, I want a "stop" button which terminates execution of the control loop. The problem that I'm having is that I can't figure out how to use a Windows Forms button to terminate a program loop. Can anyone offer any suggestions here?
Andrew Krajnik
|
|
|
|
|
use thread for your application. you can run your algorithm on thread. then only u can able to click the stop button. there is lot of articles in this site for thread. go thru that.
have a nice day!
Murali.M
|
|
|
|
|
A little off-topic here--
Does anyone know of any good message boards (EZboards, webforums, whatever) that host active discussions on User Interface Design? I don't mean MFC, QT, VC++, etc, but the actual interaction design of a program.
Interaction Design addresses these sorts of topics:
What sort of controls to use for capture certain types of data
Where to layout controls in your window
How to use colors & graphics
Disscecting simular interactions (on different data) into common UI paradigms.
I'm looking for a board where neither the programming language nor UI toolkit are important, but rather what it is you want your program to do.
|
|
|
|
|
|
The best reference I know on the topic is About Face 2.0 The Essentials of Interaction Design by Alan Cooper & Robert Reimann. It's not just an interesting read, it's vital. I think every developer out there should read it.
The book touches on the basic tennents of what good software should do, and describes some interesting new UI designs for old concepts
For example:
Calendar controls that break away from the physical constraints of real-world paper calendars, and display the days/weeks of the year in a more natural flowing format.
Unique controls that aim at solving just ONE problem very, very effectively. We usually use Comboboxes, Edits, and Pushbuttons to solve EVERYTHING. Imagine a custom control for indicating hotel vacancies, that started with a map of each floor and displayed numbers & icons in each room to indicate its occupancy state. Sometimes its better to get low-level and come up with something completely new, and then maybe add it to your repetoire of controls.
I'm looking for a forum where I can ask "how can I do THIS?" and people respond "Well I once tried this". Maybe a FAQ or compendium of these solutions, refined and retried over time.
|
|
|
|
|
Using colours - its often a big help to know when not to use colours !
Elaine
The tigress is here
|
|
|
|
|
I can save and retrieve data in ascii txt format. How do
I do save a file in rich text format? I am perplexed. By
chance does a demo project or any articles exist on this?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
use ms-word to save a simplest rtf file (only one line), then open it by notepad, so u can copy code before the line (first part) and after the line (second part).
put ascii txet between first part and second part, save it, it is a rtf file.
includeh10
|
|
|
|
|
|
All,
Has anyone here done any work with polar plots and graphs in vc++.
If so can you give me any tips as to how to start?
Any graphics classes out there that have implemented polar plots etc?
Thanks in advance.
Sorry for the repost - for some reason it thought I hit the submit button before I started the
main part of this message...
John
|
|
|
|
|
I haven't done it in C++ but what do you need to know?
The math behind it or drawing to the window?
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
Mainly drawing to the window...I think
For a variety of reasons I've been tasked to port a Matlab script (and add more functionality) to vc++. I've got my coordinate data, and in looking into Matlab, it seems like they just draw a circle, translate the polar coordinates to xy and draw lines in the circle. There's got to be more to it than that.
I don't know how to start drawing this in a window (dialog). Can I do this in a dialog, or do I need a view and a DC? If so, can I put a view in a dialog?
Any help or pointers in the right direction would be appreciated!
Thanks
John
|
|
|
|
|
Step one is to get a DC. Alternatively, you can pass in an HWND and obtain one.
You do not need a view - just a DC that you can obtain window coordinates from.
A polar to window coords conversion function will come in handy too.
Good luck.
The Ten Commandments For C Programmers
|
|
|
|
|
Hi John
1) first you need a DC to the dialog
- I suggest you add an empty control to the dialog first, and get the DC from the control. That way your coordiante system is relative to the control(drawing area) this make life easier.
2) create a "polar transform" method that is fast and efficient.
- this transform will be called every single time any rendering or user interaction with the graph occurrs so BE efficient.
- All incomming polar data is to be formatted through this transform and the resulting cartesian data will be rendered in your offset DC fron the control.
There is of course a lot more to it, especially when you consider user interaction, zooming, flicker free panning etc. But that is all pretty standard stuff.
If you want to see a very good example of an XY or polar plot, check out our company website at
homepage - www.zsystems.ca
Active x - www.zsystems.ca/devtools.htm
ZAX download - http://www.zsystems.ca/downloads.htm
Download the ZAX demo and play around with the XY/Polar plot in there.
If you have any questions on how we did anything, feel free to contact me directly.
Good luck
George W
Software Developer
www.zsystems.ca
|
|
|
|
|
Thanks for the advice guys!
This will give me a starting point.
I may have more questions...
John
|
|
|
|
|
John - I don't know how deep your pockets are, but you may want to look into a third party library. That might be faster and a lot easier than building your own charting capability. you might check out the Dundas Chart gizmo; it's advertised here on Code Project.
Software Zen: delete this;
|
|
|
|
|
|
Hi there
I am currently working on a project in which i need to detect whether a file and/or folder is being deleted.
I have used CopyHook Handler but it asks whether to delete a folder or not.
I have used SHChangeNotifyRegister but it works only for files and not for folders.
Also it gives me multiple notificatioin for the same file.
Please if anybody has some solution then help me.
Its my "Semester Project " and the time is running out.
Your fellow programmer
modified 21-Apr-21 21:01pm.
|
|
|
|
|
FindFirstChangeNotification(....);
WaitForSingleObject(...);
FindNextChangeNotification(...);
FindCloseChangeNotification(...);
Use this in a thread(AfxBeginThread(...)) and post a message to your app when something changes.
|
|
|
|