|
|
It was console application.
There hasn't any resource view....
|
|
|
|
|
I say a more time : CONSOLE APPLICATION
|
|
|
|
|
|
I've just tried to do this, and managed to get it to work. Here's what you do...
In VC++, select the following menu item: "Project" -> "Add To Project" -> "New..."
From the resulting window select to add a Resource Script (give it any name, I don't think it matters). You'll now have a "Resources" tab added to your project from which you can right-click and do "Insert...", and select Icon from the resulting box. Then just edit your icon.
Worked for me.
I guess it would work just as well if you selected "Import..." instead of "Insert...", and selected a pre-defined .ico file.
Hope this helps, 'bod
|
|
|
|
|
riversea wrote:
I say a more time : CONSOLE APPLICATION
So what? You might stop repeating that. Being a console application, or even a "CONSOLE APPLICATION" if you don't mind me yelling back at you, has nothing to do with whether your application can contain resources or not.
Maybe you created your application with one of the wizards and it didn't add a resource to it. But I already suggested adding a resource yourself using the VS IDE, and you said many people told you the same before. Instead, you just keep repeating that it's a console application as if that were of any relevance.
I simply told you to add a resource to your project and put your icon there, because I didn't think you needed step by step instructions on how to find the appropriate menu option in the IDE to do so. However if you can't find it yourself, feel free to ask and somebody may help you.
Simply repeating and yelling "CONSOLE APPLICATION" just make you look err... well, let's just say it doesn't look very good.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hey all,
I recently got MS VC++ 6 Pro and Im having a problem when compiling. I even tried uninstalling it, reinstalling intro, and i still have the same problem here. Its a Win32 dialog app. Here's the problem:
--------------------Configuration: pro1 - Win32 Release--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
pro1.cpp
pro1Dlg.cpp
Generating Code...
Linking...
LINK : error : Internal error during ReadSymbolTable
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 004623F2
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 00000008
CONTEXT:
Eax = 003C04B4 Esp = 0012E6D8
Ebx = 00000002 Ebp = 00990126
Ecx = 003C04B4 Esi = 009D0064
Edx = 00000000 Edi = 009D0064
Eip = 004623F2 EFlags = 00010246
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 0000003B SegGs = 00000000
Dr0 = 0012E6D8 Dr3 = 00000002
Dr1 = 00990126 Dr6 = 003C04B4
Dr2 = 00000000 Dr7 = 00000000
Error executing link.exe.
Tool execution canceled by user.
What can cause this? Everything looks the same as it was in the settings. Any ideas? Thanks
Dave
|
|
|
|
|
Like the message says, it's a linker internal error.
Have you installed the latest service pack (SP6, I think)?
Is any of your .obj particularly large?
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Im downloading the update right now. However, I don't think that has to do with it. When i reinstalled intro version, it was coming up with the same error and Ive been using that for years now! I've tried making just a new project and starting from scratch... just a little dialog-based app. Still get the same problem. So no big file sizes. Any help?
|
|
|
|
|
Nope, didn't work. Still same errors. In settings, under link, this is what it says in the project options:
/nologo /subsystem:windows /incremental:no /pdb:"Release/123.pdb" /machine:I386 /out:"Release/123.exe"
This should be good, right? Thanks
|
|
|
|
|
Nevermind. I installed the wrong update. Apparently, the 60 meg one is the one I needed. DOne and Done. Thanks
|
|
|
|
|
|
I have read the API on how to use the SetWindowsHookEx() function and I was able to interrupt other keyboard keypresses in Windows 98 but I still can't trap Alt-Tab. Thank you.
|
|
|
|
|
To trap Alt+Tab you have to catch the message before the OS process it. A simple way to achieve it is to register Alt+Tab as a hotkey:
<br />
BOOL CYourDlg::OnInitDialog()<br />
{<br />
...<br />
m_nHotKeyID = 100;
BOOL m_isKeyRegistered = RegisterHotKey(GetSafeHwnd(), m_nHotKeyID, MOD_ALT, VK_TAB);<br />
...<br />
}<br />
To process the hotkey PreTranslate WM_HOTKEY:
<br />
BOOL CYourDlg::PreTranslateMessage(MSG* pMsg) <br />
{<br />
...<br />
if((pMsg->message == WM_HOTKEY) &&<br />
(pMsg->wParam == m_nHotKeyID))<br />
MessageBox("Alt+Tab trapped");<br />
.... <br />
}<br />
Remember to unregister it before existing the app:
<br />
BOOL CYourDlg::OnDestroy()<br />
{<br />
...<br />
UnregisterHotKey(GetSafeHwnd(), m_nHotKeyID);<br />
...<br />
}<br />
Read Lock Windows Desktop[^], there are some references that shows it.
I hope it helps,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
compiler: VC++ 6.0, SP 6
I subclassed CComboBox into CMyComboBox, then setup up event handlers for several of the reflected events -- one being CBN_CLOSEUP event. I have an object of type CMyComboBox in an MFC program, which also needs to catch the CBN_CLOSEUP event. I used ClassWizard to create all event handlers.
Problem: The event handler in CMyComboBox works ok, but the handler in the application program never gets called. I tried having the event handler in CMyBomcoBox post a message to parent, but parent never got it.
Is there a way around this problem?
|
|
|
|
|
Try using ON_xxx_REFLECT_EX inplace of ON_xxx_REFLECT. The _EX macro returns a BOOL, which determines whether the parent receives the message.
There's a blurb about it here:
http://www.microsoft.com/msj/1198/c/c1198.aspx
(I found you have to return FALSE, not TRUE as the article states)
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
Perfect -- thank you so very much!
|
|
|
|
|
I need a code in c++ to unlock user accounts in Windows NT/2000.
Or some similar solution.
Thank you very much!
|
|
|
|
|
But I don't WANT 'guest' unlocked on my computer ...
|
|
|
|
|
You'd have to login as the Admin, then you would have to use the tools built into the os
If you can't login as the Admin then you can get around it but don't ask me
|
|
|
|
|
I do can login in as Admin.
What I want is a code of an application in C++ (or Visual C++) that unlocks users accounts of a dominion in WinNT4 and Win2000.
Thanks
|
|
|
|
|
|
As you know, the windows standard for select all is Control-A.
There is a program I am workin at creating a 3rd party app for that uses Ctrl-A for another purpose. I am wanting to, within my app, remap ctrl-a back to the standard, and assign a new sequence to the old task it once did.
I am creating a DLL hook in my app and can capture single keyboard events, but I am having trouble determining how to capture and remap ctrl-A for this application.
In it's simplest form, the following is what I am trying to achieve. If (Control & A), display messagebox!
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(<br />
int nCode, <br />
WPARAM wParam, <br />
LPARAM lParam)<br />
{<br />
if (wParam==0x041 & VK_CONTROL) <br />
MessageBox(0, Success!, "Message", MB_OK);<br />
<br />
LRESULT RetVal = CallNextHookEx( hkb, nCode, wParam, lParam ); <br />
return RetVal;<br />
}
Thanks for any assistance!
Jeff
|
|
|
|
|
Instead, try catching all the key events related to the 'A' character and use GetAsyncKeyState to see if the CTRL is down at the same time.
|
|
|
|
|
Thanks!
I thought I had tried that, but must have messed something up.
Here it is again altered to the current state, and working....
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(<br />
int nCode, <br />
WPARAM wParam, <br />
LPARAM lParam)<br />
{<br />
if (((DWORD)lParam & 0x40000000) &&(HC_ACTION==nCode)) <br />
{ <br />
if (wParam==0x041)
{<br />
BOOL bControlKeyDown = FALSE;<br />
bControlKeyDown=GetAsyncKeyState(VK_CONTROL)>>((sizeof(SHORT) * 8) - 1);<br />
if (bControlKeyDown != 0)<br />
MessageBox(0, "Success!, "Message", MB_OK);<br />
}<br />
}<br />
<br />
LRESULT RetVal = CallNextHookEx( hkb, nCode, wParam, lParam ); <br />
return RetVal;<br />
}
|
|
|
|