|
Your project is set to build a console-mode app (that is, command line) and therefore requires a main() function as the starting point for the app. To build a GUI-mode app, change the linker switch /subsystem:console to /subsystem:windows
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hey thanks that worked! Thanks a lot
Aidman » over and out
|
|
|
|
|
I was wondering if someone could message me on AIM and help me determain exactly what a few of these assembler codes do and stuff like that. I have a few codes written in inline assembler and I want to make sure they dont do anything bad could someone message me on aim : LiquidIceKnight
- LiquidKnight
|
|
|
|
|
I have some classes that I have exported but unfortunately I can't access the public members of the parent class. Example
(Assume that dllexport/imports are set up correctly and all include files are included)
class __declspec( dllexport/import ) A
{
public:
A();
MethodA();
};
class __declspec( dllexport/import ) B : public A
{
public:
B();
MethodB();
};
The above is compiled into a mfc dll.
Then from another class in my application:
class C
{
B b;
public:
C();
MethodC()
{
b.MethodB();
b.MethodA();
}
};
What can I do about this? Surely one can get access to the base class methods.
Cheers,
Clint
|
|
|
|
|
clintsinger wrote:
Surely one can get access to the base class methods.
Most certainly. There is something you are not telling us about your code.
|
|
|
|
|
Hi!
I am working on an interesting project using OpenGL and MFC.
This project as different part (independant applications) So I would like to make a launcher (using MFC) that can direct me on the good App.
The way I see it, I could have an App with many button. If I click on the first button, the first app is launched. If I click on the second button, the second app is launched. etc...
Anybody knows how to do that?
Thanks!!
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Go to http://www.jrsoftware.org[^] and download "Inno Setup 3.0.6"
I use it. It is a free and a great tool.
-Mahesh Shimpi
Ideas multiply by sharing!!
|
|
|
|
|
CreateProcess, ShellExecute, system - just to name a few.
|
|
|
|
|
Hello,
I've problem to understanding two parameters of
CryptGenKey
I've read MSDN but it's still complex for me !
Lookat second and third parameters.
second parameter, i've to choose an algorithm for
encryption !
am i right ?
But what's best choose for me ?
the speed is important for me !
and thrid, i didn't understand anything about it !
If possible explain more about both parameters
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi,
I create a user manual in a Word Document.
I would like to convert it in a .chm or .hlp files for use it with the F1 key.
Please, it is possible to do that if yes anyone can help me ?
Best regards
youssef
|
|
|
|
|
|
Hi all,
I'm still working on a CTreeCtrl View that is a variation of the Drive view in windows explorer. My problem is this:
I put in a CD rom, and then proceed to "expand" the folders of the cd rom. With the folders still expanded (in view), I remove the CD and insert a NEW cd with a different directory structure. I then Hit my refresh key and Viola! I'm still looking at the old folders from the first CD. This is unacceptable. here's the code in my OnRefresh:
//
// Get all the views
//
CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
CDriveView* pDriveView = pFrame->GetDriveViewPane();
CFileView* pFileView = pFrame->GetFileViewPane();
//
// Get the current path
//
CString path = pDriveView->GetPathFromItem(pDriveView->GetTreeCtrl().GetSelectedItem ());
//
// Update all the views
//
pDriveView->GetDocument()->UpdateAllViews((CView*)this, 0x5A,NULL);
pFileView->GetDocument()->UpdateAllViews((CView*)this, 0x5A, (CObject*) (LPCSTR) path);
So what the heck am I doing wrong? If I collapse the folder and then re-expand them, the new folders show up. I've been fighting for 3 hours with this one.
Any help/suggestions or comments are greatly appreciated
Dan Willis
Code Project Rocks!
|
|
|
|
|
It sounds like your CViews' OnUpdate handlers are not verifying the existence of new/non-existing folders, since the last cache of nodes was created. It does sound like this is happening when expand events are happening, though, for child subtrees. Perhaps you need to add further verification code outside of expand events. I do not know the details of your updating code, so this is just a guess.
Cheers
|
|
|
|
|
Yup, That makes sense. Looking a little further into it I found that I can force the redraw. I got an idea of what to do now. My next question is Does anyone know of a windows message that gets sent out when a cd is changed? That would make my life alot easier. Do you know of anything?
Dan Willis
|
|
|
|
|
|
Can it be done?
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Not really since the mapping isn't one to one. However, for any given process ID, should be able to get a list of all root windows attached to the process by using GetWindowThreadProcessId on all the children of the processes windows desktop.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
You might try using EnumWindows API. Compare the PID of each top-level window to the one you are searching for.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"AAAAAAAAAHHHHHH!!!!! Those leaks are driving me crazy! How does one finds a memory leak in a garbage collected environment ??! Daniel Turini Nov. 2, 2002.
|
|
|
|
|
I've tried this but it doesn't work:
HDC dc = GetDC(wndMainWin);
HRGN r = CreateRoundRectRgn(1,1,WND_WIDTH-1,WND_HEIGHT-1,10,10);
SetWindowRgn(wndMainWin, r, TRUE);
HBRUSH br = CreateSolidBrush(RGB(0,255,0));
FrameRgn(dc, r, br, 10, 10);
DeleteObject(r);
ReleaseDC(wndMainWin,dc);
It's my main window I'm trying to put a black frame on.
What am I doing wrong here?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Are you doing this in your Erasebackground or WM_PAINT handler. Possibly what you are writing is getting erased?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Neither of them!
I want the user to choose if he want a round window with black frame or the standard region.
If I mark a flag and then call WM_PAINT/WM_ERASEBK.. then it should work if my WM_PAINT/WM_ERASEGk.. check if the user want round window or not?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
What am I doing wrong here?
Not reading the documentation?
After a successful call to SetWindowRgn, the system owns the region specified by the region handle hRgn. The system does not make a copy of the region. Thus, you should not make any further function calls with this region handle. In particular, do not close this region handle.
Your code violates both of the the only two documented restrictions.
|
|
|
|
|
Mike Nordell wrote:
Not reading the documentation?
Not that careful...
Mike Nordell wrote:
Your code violates both of the the only two documented restrictions
Which means?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
Mike Nordell wrote:
Your code violates both of the the only two documented restrictions
Which means?
That your code did both of the only two documented things discouraged and/or forbidden.
Your displayed code, after a (hopefully) successful call to SetWindowRgn :
1) did use the region handle.
2) deleted the region.
I wouldn't expect 1 to make (that much of) a difference in this case, but 2 sure does.
Let's visit the documented restrictions again, but this time I'll underline what I think are the important passages:
After a successful call to SetWindowRgn, the system owns the region specified by the region handle hRgn. The system does not make a copy of the region. Thus, you should not make any further function calls with this region handle. In particular, do not close this region handle.
|
|
|
|
|
I'm trying to figure out how to use a file passed or used to start my application when started by a file association through either double-clicking a data file or launched from an attachment from an email. The command line passes the pathname of the file that opened the app, however since the data file is locked I can not access the data through normal file opserations. Somehow the dataptr or filehandle is being passed or managed somewhere. Can someone explain how I can get access to that handle so I can read the data file?
|
|
|
|