|
Gosh that's a whole lot of work. Why not delete the .clw file and let VC regenerate it ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
You are right. That works and is lot easier! Thanks Christian.
|
|
|
|
|
Hi!
I am a newbie to vc++ and I am currently trying to write a small database application. I looked in almost everything i can find about databases I could find and got along nicely so far. I am using the application wizard creating a sdi application connected to a database via odbc. this enables me to look at one table of the database. And here my troubles start: I want the user to not only look at one table, but at several if possible, having the user switch between the tables with the menu for example. So far I am adding a new class which inherets from CRecordSet and one that inherets from CRecordView which is connected to a new dialog resource. And at this point I am completly lost on how to switch between those two dialogs for the tables. Help would be much appreciated on how to solve this problem (and also if there are better approaches to make it possible to look at a second table).
Thanks
|
|
|
|
|
Have a look at the following. This allows you to create recordsets dynamically rather than the MFC way of building a recordset that is bound to one table.
http://www.codeproject.com/database/caaodbcclass.asp
Dave.
|
|
|
|
|
Hello everybody,
is there anybody who can tell me how can build a docking windows, I mean that windows that could be attached to one of the border of the main application and that can contain some dialogs or something more?
Thank you
|
|
|
|
|
|
It is easy to access the dc of a radiobutton / checkbutton - Via onctlcolour() / WM_CTLCOLORSTATIC. However who can tell me how to override the default drawing of the WHITE CIRCLE / SQUARE and its CHECK / TICK ONLY. Where the hell is it drawn and how? I want to be able to change the colour of the dot in the radio button or tick in a checkbox while leaving the rest of its processing as default. I know how I could implement this with an owner draw class and bitmaps, but I cant find ANY information as to how the default drawing occurs. Where is it hidden? Does ANYBODY know
"Life begins at 140"
|
|
|
|
|
Those weren't made to be customizable (well, pre-XP at least). The button part is drawn by the common controls library. In XP it's handled by the visual styles ("themes") system.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Bill Gates Antimatter Particle wrote:
Bill Gates Antimatter Particle
Wait till John Simmons sees your nick!
Just wait!!!
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I was wondering can I pass a vector reference as an argumnet to a function?
Like
I can do the following: void myfunction(int & myarray[10][10])
there by passing reference to a two dimensional array as function argument.
But when I try the folloing I get compilation error
I have a class called 'Myclass'
In this class I declare a function called 'Myfunct' the declaration is as follows:
void Myfunct(vector |Myclass| &mc);
//I am trying to pass a reference to a vector of type 'Myclass'
//I get error message
Does this mean I cannot pass reference to a vector as argument?
|
|
|
|
|
What's the error ? I just did this:
#include "stdafx.h"
#include <vector>
#include <iostream>
using namespace std;
int MyFunc(vector<int> & vec)
{
return vec.size();
}
int main(int argc, char* argv[])
{
printf("Hello World!\n");
vector<int> MyVector;
MyVector.push_back(1);
MyVector.push_back(3);
MyVector.push_back(72);
cout << MyFunc(MyVector);
return 0;
}
and it works fine.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi friends!
Do you know the GradientFill function at Visual C++?
I have acquainted with this function when studying graphic.
And the contents are like below.
( for more information, please refer to MSDN )
/////////////////////////////////////////////
”Drawing a Shaded Triangle”
TRIVERTEX vert [4] ;
GRADIENT_TRIANGLE gTri;
vert [0] .x = 0;
vert [0] .y = 0;
vert [0] .Red = 0x0000;
vert [0] .Green = 0x0000;
vert [0] .Blue = 0x0000;
vert [0] .Alpha = 0x0000;
vert [1] .x = 100;
vert [1] .y = 0;
vert [1] .Red = 0x0000;
vert [1] .Green = 0x0000;
vert [1] .Blue = 0xff00;
vert [1] .Alpha = 0x0000;
vert [2] .x = 100;
vert [2] .y = 32;
vert [2] .Red = 0x0000;
vert [2] .Green = 0x0000;
vert [2] .Blue = 0xff00;
vert [2] .Alpha = 0x0000;
vert [3] .x = 0;
vert [3] .y = 32;
vert [3] .Red = 0xff00;
vert [3] .Green = 0xff00;
vert [3] .Blue = 0xff00;
vert [3] .Alpha = 0x0000;
gTRi[0].Vertex1 = 0
gTRi[0].Vertex2 = 1
gTRi[0].Vertex3 = 2
gTRi[1].Vertex1 = 0
gTRi[1].Vertex2 = 2
gTRi[1].Vertex3 = 3
GradientFill(hdc,vert,4,&gTRI,1,GRADIENT_FILL_TRIANGLE);
///////////////////////////////////////////////
And I have two questions.
1.GradientFill(hdc,vert,4,&gTRI,1,GRADIENT_FILL_TRIANGLE);
I’m curious to know the internal algorism of Visual C++’s materializing (as a picture) when there is given arguments on GradientFill().
2.vert [3] .Green = 0xff00;
I know RGB rule express 256 colors, from 0 to 255.
But GradientFill controls the color through hexadecimal.
I’d like to know how I can turn colors by hexadecimal into RGB 256 colors.
Maybe, there is a rule. I’d like to know what it is.
|
|
|
|
|
1. I dunno, but I'd imagine it's just the obvious one.
2. Green = 00ff00 because 0xFF = 255, so it's just a case of 0 Red, 255 Green, 0 Blue = Green. COLORREFs are created with the RGB macro which just shifts the values passed in to create the DWORD that holds it ( COLORREF is a typedef for DWORD ). To get the red/green/blue values out of a COLORREF ( which .xff00 is, just stated in hex ), just use the GetRValue/GetGValue/GetBValue macros.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Thanks!
But I want to know more information the first problem.
Please Help me!
|
|
|
|
|
At risk of stating the obvious, as M$ do not give us the source, I really cannot tell you more than the MSDN tells you.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
T.T.......................
I quite agree.
But I need to little a hint.
Please...................^^
|
|
|
|
|
jin sok cho wrote:
But I need to little a hint.
I'm confused as to why you think I know more than I have said. Do you know what linear means ? The MSDN says it's a linear transition, which is what I meant when I said it's probably the most obvious way. If you had 255 pixels you needed to do a gradient on, and you needed, for example, your red value to move from 0 to 255, how would *you* do it ? I'd step by 1 every pixel. If I had 510 pixels, I'd step by 1 every second pixel and if I had 127, I'd step by 2 every pixel. Extrapolate that to values that are a bit harder to calculate on the fly and that's about as much as I can tell you.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
jin sok cho wrote:
But I need to little a hint.
Here's a hint for you - if you're going to use a fake email address, at least don't ask for a cc email when people reply to you.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I am not sure this is the right section.
I am having a problem with the VS installer. I am creating a simple install file for a project with one executable. I have a shortcut in the start menu.
What I want to do is create an uninstall shortcut right next to the programs shortcut. I can't figure out how and I can't find any sources.
Can anyone help me, please?
|
|
|
|
|
I don't know, but FWIW I'll point out two things:
1/ the installer that comes with VC is a cut down version of Install Shield. Apart from being hard to use, the cut down version was useless in my opinion. We moved to Setup Factory.
2/ M$ recommend not doing what you want to do, because not all programs do it, and so expecting it stops users from realising there is an add/remove programs area in the Control Panel, which is where they should be going.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi,
all
Now I use this StretchBlt() function to display a
Rectangle bitmap ,It works perfect.But if I just want to
display the Ellispe inside the Rectange bitmap, how I
should do then. Perhaps, are theree other functions can
achieve this goal?
Thank you for your advanced help.
Regards.
|
|
|
|
|
You need to do one of the following:
1/ Not target Windows 95, then you can use TransparentBlt or GDI+
2/ Get my code from the WDJ site for the Sept 2000 issue, it includes a version of TransparentBlt that works with W95
3/ Do it yourself, this involves generating a mask bitmap in order to do the transparent blt. MSDN explains how, or again refer to my code from the WDJ site.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
|
Hi,
I have download your sept 2000 source code ,but
can not find the special souce code about the use of TransparentBlt. Can you give me a more detail
url.
Thanks again.
|
|
|
|
|
How can I put a CStatusBar in a simple CDialog???? I've tried hundreds of times but it doesn't works. Please help!
|
|
|
|