|
I think you are giving the wizard way too much credit when you write
"When I generated my recordset using the class wizard it set the type of these fields as CString, which I assume is because the ODBC driver does not support the numeric datatype. Thus it tries to convert the numeric to a string when reading from the database, and back to a numeric when writing. All this is beyond my control"
You probably need to change the field bindings to numeric fields (if you were unable to do this with the wizard you may have to do it manually) I have found that it is extrememly important to have the data types match or I will experience the same types of exceptions
|
|
|
|
|
1.How the MDIFrameWnd find "Window" menu.
2.How are the ChildWnd titles added to "Window" menu
In other words: how the "Window" Menu works?
Meng
|
|
|
|
|
1) It looks for the rightmost popup containing the item ID from the range AFX_IDM_WINDOW_FIRST..AFX_IDM_WINDOW_LAST.
CMDIFrameWnd::GetWindowMenuPopup does the job.
2) This is done with Win32 API - check WM_MDISETMENU docs for details.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hello,
pls help me how to make a custom dialogbased application with buttons in title bar.
|
|
|
|
|
Checkout http://www.codeguru.com/buttonctrl/ccaptionbutton.html.
/Tommy
|
|
|
|
|
I would like to make a combobox that allows you to resize the list part of the combo box by dragging the little grip icon in the bottom right corner of the list part, just like internet explorer allows you to do if you start to type in the address search bar.
What is the best way to do this? I tried subclassing the control and painting to the device context in the onctlcolor function, but it wouldn't let me draw to the dc. It let me resize the list part of it from there, but not draw do it?
anyone have any suggesstions for me?
thanks
Greg ellis
|
|
|
|
|
void CWhateverclass::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rect;
GetTheRectangleForTheGripFunction(&rect);
dc.DrawFrameControl(&rect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
}
This should do the trick. (Or was it in OnNCPaint?? Am not sure now.)
cheers
|
|
|
|
|
I want to port a windows' program to macintosh's,how can I do?
Give my best wishs to anyone who gives me any tip!
|
|
|
|
|
I am designing an electronic whiteboard. In this program,I want to embed OLE controls such as bitmaps,audio clips in the whiteboard and then transfer them on the Internet via CSocket class. But i don't know how to transfer the OLE controls . please help me.
I am a beginner.
|
|
|
|
|
when i debug one component from vb client,the vc debuger popup one box "user breakpoint called from code at 0x*******",and only can see the asm code,what is the meaning ,and how can this be?
thank you
sandos
|
|
|
|
|
hy!
I think there is a breakpoint set in your component ( i don'y know for sure because i never do vb programming ...;P )
Bye,
BogdanO
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
I am trying to compare 2 colours having the COLORREF value, and specifying a tolerance, to decide if a pen of color 1 will be different enough to be visible if drawn on a background color 2.
Do you know of a reference where I my be able find information about this. I thought about using variation of the algorithm I have for finding the nearest color from a palette. However it is not working for me in trying to work out a reasonable value for 'dist' in the code below.
int blue = (GetRValue(dwColor) - GetRValue(sE->seRGB));
blue *= blue;
int green = (GetGValue(dwColor) - GetGValue(sE->seRGB));
green *= green;
int red = (GetBValue(dwColor) - GetBValue(sE->seRGB));
red *= red;
int dist = red + green + blue;
Happy programming!!
|
|
|
|
|
try using ABS so that red green and blue are always positive. Otherwise 0,0,255 and 255,0,0 will have a dist ==0, this way it would be 510.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
That's great
Thank you
Happy programming!!
|
|
|
|
|
As Tomaz pointed out, this was wrong, because you square the value and so a negative * a negative = a positive.
What may work for you is to look at a greyscale algorithm to get an idea of how the eye percieves blue, green and red (i.e. how strong each colour is ) and weight them accordingly.
I think you're going to have some trouble though - darker colours obviously need to be more distant from one another than lighter colours, and a greater weight distance in one colour will give better differentiation than the same distance spread over all three, for example.
How many colours do you need ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
The could be anything almost.
The software is for designing embroidery patterns, and in Cross stitch block mode I would like give an indication of the presence of a stitch even if the colours are close together. In real thing the eye would of course still see the stitch because of texture.
The result therefore does not have to be perfect but is intended to be a guide, and make previewing a little easier.
Happy programming!!
|
|
|
|
|
So you don't need a lot of colours, you're trying to show the stitch which will be a similar colour and want it to be visible ? You basically need to calculate a similar colour that will be visible ?
Why don't you do a 3D rect type thing ? Make the stitch visible by drawing in a lighter colour across one edge and darker across the other to give an illusion of depth, which is how the stitches will eventually be percieved ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
try using ABS so that red green and blue are always positive.
This will not change anything. red, green and blue are always positive - he's using square distance (without square root).
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Oh... that's what I get for not looking too closely. *sheepish grin*
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi... I'm wondering if there is a way to 1) figure out what the default web browser on a person's computer is and 2) open a HTML doc with it.
I want to put a website on a cd, and have the people pop it into their drive and have autoplay open the index for them... any help would be appriciated.
Thanks
|
|
|
|
|
::ShellExecute will do it for you if you pass in the html document path, by running it in the program associated with it.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
ow to get Windows Nt Server Information(such as user profiles,group, directory size , backups, mointoring etc.) using Visual C++ APIs
|
|
|
|
|
Much of that information is available in the Network Management Functions. NetUserGetGroups for example. If you have MSDN you can find them.
|
|
|
|
|
ow to get Windows Nt Server Information(such as user profiles,group, directory size , backups, mointoring etc.) using Visual C++ APIs
|
|
|
|
|
Hi there,
I am trying to add an icon to my Delete dialog box. I would like this
icon to be the same as the one microsoft uses in its Window 2000 Delete dialog boxes within its Windows Explorer.
How do I find this icon on my desktop programmatically? I have searched my directories but i can't find anything like it and I am not sure which exe i need to extract to retrieve this info from.
thanks
|
|
|
|