|
please help me
i want to print a grid (flex grid ver 8.0) in a dialog in MFC
please help me
|
|
|
|
|
Hello,
How can I getting the background color of the system tray. I is looked in the listing of system colors but this is not being there. I is sawed this before so I knowing this is possible.
Thank you
|
|
|
|
|
I dont know why you really want to do that, any ways you have to subclasswinddow the wndproc and do any appropriate drawing of the background color...
the systray windproc can be found using this wndclass "TrayNotifyWnd"
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Thank you. Is works, but not in XP. XP is uses a nother draw. I thinks is bitmap. How is getting this bitmap so I can using it to fill?
Is greatful for you doing much helpful
|
|
|
|
|
You need to get hold of the window name, in XP it must be different, or it must using some other way of drawing the taskbar.
Use Spy++ to get the window name.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
I have created a dialog based appl. but I wanna add more pages but can't seem to get it right
I have tried to do that with adding dialogs but I'm getting problems
can someone help me
|
|
|
|
|
hi
im just starting to learn mfc and i cant
find how to do the stuff i need, what i need to do
is something like explorer(not iexplorer).
i need a clean window with only a start button+task bar, pressing start will open a dialog above it and let you choose from availble programs, pressing a program will run and and also show up in the task bar, just like the interface of windows ( no need for quick-lunch yet)
since im new , please give me full answers including what controls do i need to use and any suggestion, if someone did something similar, an example will be great
Gonen
|
|
|
|
|
gonenb wrote:
since im new , please give me full answers including what controls do i need to use and any suggestion, if someone did something similar, an example will be great
no.
Since you're just starting learning MFC ( and maybe programming ), I suggest to learn the basics before doing stuff like that.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
i find your answer rude
i may be new to mfc , but im a software engineer, this is a side project i wanna do
at my free time, and this is what i need, i have read a book about mfc and the basics seems really simple, but i cant find advanced stuff i need.
please give me good answer to the point and not another smart guy with answer similar to the last one, this answers are not helping !!
Gonen
|
|
|
|
|
What you are trying to do is basic thing
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Your question is a little vague.
Is this what you are looking for?
http://www.microsoft.com/msj/archive/S274.aspx[^]
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
ill try to be explain what i need a little better.
im a software engineer in the embedded market working on a multi-media co-processor
during development , we have an evaluation board to test this processor( it has an embedded arm processor), this board is something like a small computer , it can run applications, and has a filesystem, and has many configurations.
my company uses a very ugly interface to test it, and as a side project i wanna rewrite the interface, currently is looks like giant dialog box with many buttons, and is very hard to understand.
my idea was to write a program that will look like windows, the main window will have
a start button, pressing it will open a dialog that will give me choises of the applications + button for control panel to change the different configurations.
one application will be file explorer that will look like windows explorer but the file system will be the one on the evaluation board.
if you got better idea how the interface should look or how can i implement it please help.
Gonen
|
|
|
|
|
#include "stdafx.h"
#include <windows.h> // Sleep
#include <conio.h> // _getch, kbhit
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int state = 0;
int exit = 0;
while(1)
{
if(kbhit())
{
exit = _getch();
if(exit == 27) // ESC
break;
}
if(state == 0)
cout<< "\n STOP.\n";
else if(state == 1)
cout<< "\n Prepare to GO.\n";
else if(state == 2)
cout<< "\n GO.\n";
else if(state == 3)
cout<< "\n Prepare to STOP.\n";
state++;
if(state == 4) state = 0;
Sleep(1000);
}
return 1;
}
|
|
|
|
|
I am currently trying to write a simple program that allows the user to click in the "view" to define the start of a line, draw a line from the start to the mouse (where ever the mouse moves to and while it moves) and then complete the line when the user clicks in the view again.
The only hangup that I'm having is that after I click in the view and begin to move the mouse, I end up drawing lines to everywhere the mouse goes and eventually the screen looks a mess with lines all over it. I understand why this happens, I just don't know how not to make it happen.
In psuedocode, my code goes something like this.
OnLButtonDown
CreateStartPoint
GetScreenCoord
OnMouseMove(POINT point)
LineTo(StartPoint, point)
OnLButtonDown
CreateEndPoint
GetScreenCoord
LineTo(StartPoint,EndPoint)
I'm missing something to "brush" over the old mouse position each time OnMouseMove is called. I've looked at some sample code but haven't been able to get it to work.
Other samples have mentioned using Memory DC's and Storing the view as a Bitmap.
Anyone out there got a simple solution?
I'm fairly confident that once someone explains how to accomplish this, I'll be able to figure out the rest.
Thanks
|
|
|
|
|
There is a sample project called as DRAW that comes with VC installation.
This project will provide all the inputs needed for ur application.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
I don't have a "DRAW" sample. I have a "DRAWCLI" sample.
If these are the same then I know what you're talking about. However, the code isn't very portable and is way to complex for what I'm trying to do. The DRAWCLI sample uses OLE and ties the drawtool objects into the drawview cview so tightly that it becomes very difficult to pull just the drawtool object into a project and put it to use. Eventually I suppose I could trim the code down and disect it to where it fit my needs.
|
|
|
|
|
An easy solution is to use an XOR pen. When you draw your line it'll be XORed with whatever is already on the screen. When the mouse moves draw the previous line again using the XORed pen (this will remove the previous line) and then draw the new line, again using the XORed pen.
This works because XOR is it's own inverse.
To actually code this you'll need to use the api function SetROP2 before drawing. This determines how GDI merges pens (and some other drawing objects too) with what's already on the screen.
The only disadvantge is that an XOR pen isn't a solid colour, rather it appears as the inverse of the colour on the screen. Of course, this might actually be a good thing as it ensures your line is always visible no matter what you draw over.
Hope that helps.
|
|
|
|
|
hello,Please tell me what CALLBACK doing?thanks.
human
|
|
|
|
|
callback functions are static functions in your code that the operating system calls to notify you of some condition, such as a timer firing
"there is no spoon" biz stuff about me
|
|
|
|
|
l a u r e n wrote:
callback functions are static functions in your code
callback functions are not static functions... It is defined as follows
#define CALLBACK __stdcall
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Think twice, what about in C++?
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Well i did do some RnD before posting tht , as long as it is VC++ i dont think its a static function unless i missed something.
or you could show me something that says its static.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Rickard Andersson19 wrote:
Think twice
surely in VC++ CALLBACK is not a static function at all.
and
Rickard Andersson19 wrote:
what about in C++?
Is VC++ not C++ ??
so really i dont know which C++ compiler you are talking about, but in VC++ callback is not a static function, its only a calling convention.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Mr.Prakash wrote:
Is VC++ not C++ ??
VC++ is a compiler. C++ is a language.
In C++ (the language) you must declare a method as static before you can use as a callback.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Rickard Andersson19 wrote:
VC++ is a compiler. C++ is a language.
VC++ compiles code writen in C++ so If you write something in C++ that VC++ cannot compile then its not a VC++ code.
what ever that meant.
using static functions as callback is one thing and in VC++
CALLBACK is different not callback but CALLBACK (something the original poster has asked the question about).
I hope now its clear.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|