|
Hi,
Is it possible to download ATL 7.0 to use it under VC++ 6.0?
WTL 7.0 is available but not ATL 7.0.
Thanks,
Francisco
|
|
|
|
|
Sadly not.
Michael
Errata 1: p. 154, section 'Defusing'. For 'red wire' read 'blue wire'.
|
|
|
|
|
This is how it's done: I create a CScrollBar object within a window (new / Create / ShowWindow / SetScrollRange), and it looks OK, but although it responds to mouse inputs it doez NOT change its position, but... If I use SetScrollPos it moves to the specified position. The problem is, that it stays there all the time and user cannot move it. It can be used, but when you release your mouse button the tracking box returns to it's previous position. Strange... I suppose I missed something, but I can't figure out what it is.
I would like to use only GetScrollPos/SetScrollPos and in some cases SetScrollRange/SetScrollInfo (when data changes or window resizes)
Krzysztof Szczech [CoY0te]
k_szczech@o2.pl
|
|
|
|
|
This is not a problem - it's a feature. Your program should set the scrollbar position in WM_HSCROLL/WM_VSCROLL handlers.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
It helped. Now i just have to process these LINE/PAGE/THUMB codes.
Thank You.
Krzysztof Szczech [CoY0te]
|
|
|
|
|
I want to I want manipulate it's size when the toolbar was floating .But I found that it can not success when I use function MoveWindow().
how can I do?
Don't look at me in that way!
|
|
|
|
|
I don't know the problem exactly ,but maybe this would help:
WINDOWPLACEMENT Place;
Place.rcNormalPosition.left = ... ;
Place.rcNormalPosition.right = ... ;
Place.rcNormalPosition.top = ... ;
Place.rcNormalPosition.bottom = ... ;
// Window must be a CWnd object
Window->SetWindowPlacement(&Place);
This function allows to manipulate all dimensions of a window simulatenously. I don't know if You use MFC or windows API, so I can't tell You more...
Krzysztof Szczech [CoY0te]
|
|
|
|
|
Floating toolbars are hosted in CMiniFrameWnd windows - so you really need to resize the frame window. To get a pointer to CMiniFrameWnd, call CControlBar::GetDockingFrame, then use MoveWindow.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
I want draw text on position of cursor/
How i can quick draw text without full invalidate?
|
|
|
|
|
I don't think that SetROP2 will work for you with [Ext]TextOut or DrawText[Ex]. I'd draw the text to off-screen bitmap, then use BitBlt with SRCINVERT.
Also, you could try creating a path, using ExtTextOut or TextOut, then setting SetROP2 and calling StrokePath/FillPath. Never tried this personally, however.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
|
Hi,
I'm making this DLL that has about 60 exported functions. Some of them work perfectly in the client app, but not all. I've discovered that it's the functions with 'const std::wstring&' parameters that don't work properly. When I compile the client app, I get the following error:
unresolved external symbol "bool __cdecl TASFileDup(class std::basic_string,class std::allocator > const &)"
I have no idea why some of the functions work and others don't. I get no errors or warnings when I compile the DLL.
I've tried writing 'using namespace std' in the client app, but that had no effect. Any suggestions?
Jarle
|
|
|
|
|
If you are not aware of it already: If you pass or return any of these classes by value you must use the DLL version of the CRT (mixing heaps spells d-i-s-a-s-t-e-r).
My guess why only some functions are failing is that it's just these functions that make use of not yet instantiated class templates.
In my experience the std:: types unfortunately fits like a foot in a glove when mentioned in module (such as DLL) interfaces. What you have experienced now is just the tip of the iceberg.
|
|
|
|
|
Can someone help me in the right direction? I am really stuck trying to create my own linked list base class.
The problem shows up when I derive a class from the linked list base class.
Because within the baseclass I want to manage the list and add new nodes, but these are forced be like ' new CBaseClassList'. So that derived classes do not truly inherit the linked list ability, since only base class nodes are added. I hope I made my problem clear. Let my try to explain better in simple code:
class CBaseClassList
{
CBaseClassList *liststart_node;
AddNode();
int basedata;
}
CBaseClassList::AddNode()
{
liststart_node = new CBaseClassList();
}
class CDerivedClass : public CBaseClassList
{
int deriveddata;
DoStuff();
}
CDerivedClass::DoStuff()
{
// Adding a new node from within the derived class will only create
// a node based on the baseclass!!
// So I am not able to use CDerivedClass datamembers
AddNode();
// OK:
liststart_node->basedata = 10;
// impossible:
liststart_node->deriveddata
}
Please note that I really want the baseclass to stay as absract as possible so that I neednt create multiple linked list code in my project and that I can use it for pretty much anything. Just one baseclass linked list to derive and inherrit linked list ability from. I do know about STL, but I need my own baseclass list construction in this project (in relation to fast code).
|
|
|
|
|
Bug wrote:
do know about STL, but I need my own baseclass list construction in this project (in relation to fast code).
In relation to fast code, you should use STL anyway. Unless this is kind of homework, of course.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Why are you not using a template class?
|
|
|
|
|
I'm trying using templates now. Thanks.
|
|
|
|
|
I have a thread function and I define it as global function:
This function get the focused window and change the position of it.
BOOL bdown = false ;
UINT ThreadFunc(LPVOID pparam)
{
WINDOWINFO info;
HWND hwnd;
DWORD dword;
hwnd = (HWND)GetForegroundWindow();
GetWindowThreadProcessId( hwnd , &dword);
AttachThreadInput( dword , GetCurrentThreadId() ,true);
hwnd = GetFocus();
if(hwnd != NULL)
GetWindowInfo( hwnd ,&info );
else
{
hwnd = (HWND)GetForegroundWindow();
GetWindowInfo( hwnd ,&info );
}
if(hwnd!=NULL)
{
int x = info.rcWindow.left;
int y = info.rcWindow.top;
int width = (info.rcWindow.right-info.rcWindow.left);
int height = (info.rcWindow.bottom-info.rcWindow.top) ;
if(bdown)
y -= 90;
else
y += 90;
SetWindowPos(hwnd , HWND_NOTOPMOST , x , y , width ,height , SWP_SHOWWINDOW);
if(bdown)
bdown = false;
else
bdown = true;
Sleep(1000);
}
return 0;
}
I start thread in my OnInitDialog of my class like this:
AfxBeginThread(ThreadFunc, 0);
The problem is that if when I call the function without starting thread it works and change the position but when I start the thread nothing happend.also when I debug my application it change the postion for one time and it seems that it does not called another time.Any idea?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Your thread function executes once and then returns - the thread finishes. Some kind of loop is missing.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Yes,thank you man.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Hi,
My application does not have a title bar due to space constraints.
I need to add the minimize, maximize and close buttons (which are normally on the title bar) to the menu bar.
Any ideas on how I can do this would be greatly appreciated.
Thanks.
|
|
|
|
|
you could draw some bitmaps and import them to your resources and use the CButtonST class to give the button a normal look. Take a look the follwing article about CButtonST http://www.codeproject.com/buttonctrl/cbuttonst.asp
Hope this helps...
Best Regards
Sonu Kapoor
|
|
|
|
|
|
|
I have searched a single tutorial which will explain me a simple device driver in vC++.
But I could'nt found any tutorial as such.
Does any body knows
|
|
|
|