|
|
I would imagine that a triangle would be most suitable for that.
But why not do it just like CColorDialog or photoshop[^]?
--
Keep talking! You're the fool, I'm the preacher.
|
|
|
|
|
msdn:
Client Requires :Windows "Longhorn", Windows XP, Windows 2000 Professional, Windows Me, or Windows 98.
Server Requires :Windows Server "Longhorn", Windows Server 2003, or Windows 2000 Server.
###what is different between client requires and server requires?
that is meant it can work in win98 or can't?
why the code can't work in win98:
BOOL GetRegistryProperty(HDEVINFO DeviceInfoSet,
PSP_DEVINFO_DATA DeviceInfoData,
ULONG Property,
PVOID Buffer,
PULONG Length)
{
while (!SetupDiGetDeviceRegistryProperty(DeviceInfoSet,
DeviceInfoData,
Property,
NULL,
(PVOID)*(TCHAR **)Buffer,
*Length,
Length
))
{
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
//
// We need to change the buffer size.
//
if (*(LPTSTR *)Buffer)
LocalFree(*(LPTSTR *)Buffer);
*(LPTSTR *)Buffer = LocalAlloc(LPTR,*Length);
}
else
{
//
// Unknown Failure.
//
if (GetLastError() != ERROR_INVALID_DATA)
{
}
return FALSE;
}
}
return (*(LPTSTR *)Buffer)[0];
}
here is the exception :
if (*(LPTSTR *)Buffer)
LocalFree(*(LPTSTR *)Buffer);
*(LPTSTR *)Buffer = LocalAlloc(LPTR,*Length);
thanks!
-- modified at 9:43 Sunday 25th September, 2005
|
|
|
|
|
hi,
i want to position the dialog box at a certain position
wat is the funtion member in CDialog class for that.
thanx
|
|
|
|
|
|
|
A very simple way to position your
dialogbox if u have created the dialog
by resource editor,
Open the dialogbox in resource editor
Just right click on the dialobox goto properties
in the General Tab u will find at the botom Xpos & Ypos,
thats it change that's it
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I'm using VC++ .NET, and I want to dinamicaly create a char * string.
I use the following code, but when I try to make the project, I have a error, exactly a link error not a build error!!!!!
char *c = new char [serialNumber->Length];
error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
Help me please!!!
Best regards.
|
|
|
|
|
I've only used VC++.NET once so i'm not sure if this is the right way to fix it, but when I got the same error... adding msvcrt.lib to the project settings solved the problem.
|
|
|
|
|
i have a progress bar in the modal dialog.
i want show status progress copying file concurrent with copying whit thisdialog.
please help me.
whit special thanks.
|
|
|
|
|
The basic idea is to move copying to another thread. If you don't want to do it, you can still display progress by regulary processing paint messages. Check sources section of this site (CP, I mean), there are plenty of ready-to use progress dialogs, you will get the idea.
Igor Green
http://www.grigsoft.com/
Compare It! + Synchronize It! - files and folders comparison never was easier!
|
|
|
|
|
If you'd rather not use a separate thread, this[^] article may help.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
The following OnPaint code works very well with single buffering. With it I can zoom in and out, and pan the view. The drawing code doesn't have to be aware of the zoom factor or any other coordinate. But how do I turn this into double buffering ? what mapping mode whould I use on the memory dc ?
CPaintDC outputdc( this );
// Client rect (size of window on screen)
CRect clientRect;
GetClientRect( &clientRect );
// Virtual rect (page coordinates)
CRect virtualRect;
virtualRect.left = m_CenterPos.x - (clientRect.Width()*m_fZoomFactor)/2;
virtualRect.right = m_CenterPos.x + (clientRect.Width()*m_fZoomFactor)/2;
virtualRect.top = m_CenterPos.y - (clientRect.Height()*m_fZoomFactor)/2;
virtualRect.bottom = m_CenterPos.y + (clientRect.Height()*m_fZoomFactor)/2;
// Sets the mapping mode for the specified center position and zoom factor
SetMapMode(outputdc, MM_ISOTROPIC);
SetWindowExtEx(outputdc, virtualRect.Width(), virtualRect.Height(), NULL);
SetViewportExtEx(outputdc, clientRect.Width(), clientRect.Height(), NULL);
SetWindowOrgEx(outputdc, virtualRect.left, virtualRect.top, NULL);
// Draw
EraseBackground( &outputdc, virtualRect );
m_GraphData.DrawData(&outputdc);
|
|
|
|
|
You should create a memory DC compatible with your output DC,
draw whatever you need in the memory DC, then blit iits content on the output DC.
SkyWalker
|
|
|
|
|
Try applying the exact same transformations and drawing to the memory DC only. When done, call bitblt like this:
outputdc.BitBlt(0, 0, clientRect.Width(), clientRect.Height(), &memdc, 0, 0, SRCCOPY);
|
|
|
|
|
Hello,
I got code from a book to create/store preferences. The user's variables are stored in the CMainFrame class. How can I retrieve this data from another class, such a dialog box that uses user's preferences??
Please advise!!!
thanks in advance.
Roberto.
|
|
|
|
|
<br />
#include "mainfrm.h"<br />
<br />
...<br />
<br />
CMainFrame* pMain = (CMainFrame*)AfxGetMainWnd();<br />
ASSERT_VALID(pMain);<br />
int nVariable = pMain->GetMyIntVariable();<br />
<br />
"When you know you're going to eat crow, it's best to eat it while it's still warm." - Reader's Digest
|
|
|
|
|
Jack,
THANK YOU!!!!! It worked fine
Roberto.
|
|
|
|
|
hi,everyone
i have some .dbf files, and i want to unite them to a single .dbf file.
how?
|
|
|
|
|
You can use ODBC\OLEDB providers to work with files on database level. Alternatively just parse dbf files manually - the structure is quite simple, so if structure is identical (!) it is no problems to join files.
|
|
|
|
|
Is there any essential diffrence? Which is more effecient?
|
|
|
|
|
No offence
Seeing all your questions around, I think you
should start by reading some ... books.... first. Mmmhh?
Again, I didn't want to be unfriendly
SkyWalker
-- modified at 12:13 Sunday 25th September, 2005
|
|
|
|
|
If you use GetDC you should then remember to call ReleaseDC when you are done with it. CClientDC encapsulates just that: it calls GetDC in the constructor and ReleaseDC in the destructor, so that you don't forget the release. You can trust the compiler optimizations to make using CClientDC as efficient as directly using GetDC
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi, does anyone know how to make your c++ application minized on startup?
|
|
|
|
|
ShowWindow(SW_MINIMIZE)
Good music: In my rosary[^]
-- modified at 18:28 Saturday 24th September, 2005
|
|
|
|