|
Your Post.[^]
Looks like you've already found your answer
|
|
|
|
|
You can use Registry values for it. The installer can write approbiate HKLM values. And the run state makes more sense per user -> HKCU.
Greetings from Germany
|
|
|
|
|
"_$h@nky_" wrote: i want if my application is run on any computer firstime than it shows an message and create a user,after this it works normally.
So wouldn't the presence of said user indicate whether your application has been ran or not?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Experts,
How can I select the tree item on right click of mouse?
|
|
|
|
|
i want to delete all strings(items) in combobox list
how is that can possible
|
|
|
|
|
"Clear()" use this method to delete all the items in a combo bax
|
|
|
|
|
it is not working
it does not delete deletes all item of combo box
i am using is this way
CComboBox *b=(CComboBox*)GetDlgItem(IDC_PATIENT);
b->Clear();
|
|
|
|
|
The best option i can give is iterate to nuuber of items and remove() individual item.
|
|
|
|
|
ResetContent()
CComboBox *b=(CComboBox*)GetDlgItem(IDC_PATIENT);
b->ResetContent();
|
|
|
|
|
That method clears the current selection, if any, in the edit control of the combo box. How does that help the OP?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The same way pipes solve the inter-thread communication problem
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I want to trim a wstring, like "Two words" as "Twowords". How it is possible.
Thanks.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You have to go through every character in a string and find the space alpha numeric and remove from the
string.
So u need one temp string;
char* pData = Two Roes;
char* tmpData;
while(!pData++) // while string reach to last
{
if(pData != NULL)
tmpData = pData;
}
return pData = tmpData;
|
|
|
|
|
Actually I used isspace() to find all spaces in a wstring. But in that case I have to go through a loop, for each letter of the string. I'm try to avoid it and see any solution on trim.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Trimming usually implies removing from the ends, not the middle.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Ya, that's true. I'm looking that it's possible to trim middle spaces.
And also, I have a similar question. How can I trim a standard string in C++ for the end spaces.
Like this.
"One " trim to "One"
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: How can I trim a standard string in C++ for the end spaces.
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i want to know the method to work with internet explorer event .i.e when user change url address in address bar then some functionality of my application do the work accordingly in application.If any one have idea about the method for capturing the internet explorer6,7,8 then pls. share your idea.
Thanks.
|
|
|
|
|
How do I add the popup button like MapEditor of Company of Heroes.
Like as below:
http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/wb1.JPG
http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/wb2.JPG
|
|
|
|
|
The error I'm getting:
1>c:\users\john\documents\visual studio 2008\projects\torch\torch\main.cpp(18) : error C2065: 'lpBuffer' : undeclared identifier
I've seen plenty of examples where ReadConsoleInput is setup to read only 1 INPUT_RECORD and then return, but I'm trying to set it up so that if multiple events occur at once, so they will be placed into a vector array instead. The trouble is that everything stops once ReadConsoleInput starts and I have no easy way of referencing the variable to be stored. Here is my code:
#include "includeall.h"
using namespace std;
int main(int argc, char **argv)
{
HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD NumRead;
BOOL eventloop = FALSE;
vector<INPUT_RECORD>InputRecs;
printf("Welcome to Bloodhound 1.0a (torch).\n");
printf("Press the ESC key at any time to exit.\n");
do
{
X| if(ReadConsoleInput(hIn, InputRecs.push_back(lpBuffer), (DWORD)InputRecs.capacity(), &NumRead) != 0)
{
}
else
{
printf("Unable to read from console error number (%d)", GetLastError());
printf(".\n");
eventloop = FALSE;
}
InputRecs.clear();
}while(eventloop == TRUE);
return 0;
}
Ideas?
|
|
|
|
|
CoffeeAddict19 wrote: Ideas?
Yes. You need to declare lpBuffer .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Im writing a program that is going to store A LOT! of parameters in a temporary ODBC database when running. My question is whenever I start the program or load a new document I need to completely delete the entire database to have a clean slate. Is there an easy way to do this, or do I need to just write a function to go delete everything through row by row. Im still new to MFC and the recordset class and have had problems deleting.
Thanks everyone has really helped me learn a lot on here.
|
|
|
|
|
Cozmo23 wrote: Is there an easy way to do this...
You mean easier than deleting the database file(s)?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You will be using AddNew() method to add the records.which will create huge temp files.
You have to use Insert() function to avoid temp files.
|
|
|
|
|
In my application, in browse dialog box i was doing all sort of random
things.
eg: Create file.
rename file.
visit network folders.
show by list,details,icons.
open unrecognised files etc.
and somewhere my application crashes I am not what is the specific reason
that causes this.
The Report of Process dump is a below.
Report for notepad2696.dmp
Type of Analysis Performed Crash Analysis
Machine Name XYZ
Operating System Windows XP Service Pack 2
Number Of Processors 2
Process ID 2692
Process Image D:\myproj\notepad\nodepad.exe
System Up-Time 01:30:05
Process Up-Time 01:27:36
Thread 0 - System ID 2696
Entry point nodepad+134e56
Create time 2008-07-22 3:01:31 PM
Time spent in user mode 0 Days 0 :4.796
Time spent in kernel mode 0 Days 0 :15.140
Function Arg 1 Arg 2 Arg 3 Source
ole32!CoSetErrorInfo+54 00000000 00000000 001a11c0
ole32!wCoUninitialize+134 0012d9fc 00000000 00163990
ole32!CoUninitialize+5b 001a11c0 0012dac0 00000000
comdlg32!NewGetFileName+24f 00000001 00000001 0012da70
comdlg32!NewGetOpenFileName+f 0012dac0 00000000 001a11c0
comdlg32!GetFileName+35d 0012dac0 763c7705 00000001
comdlg32!GenericGetFileNameA+475 0012ebe4 763c7705 7e41be71
comdlg32!GetOpenFileNameA+23 0012ebe4 00000001 0012f36c
mfc42!CFileDialog::DoModal+96 00547820 00354c50 73dd25e8
Broker+233b9 0012f36c 00000234 00000000
mfc42!CCmdTarget::OnCmdMsg+10a 00000234 00000000 00000000
mfc42!CPropertySheet::OnCmdMsg+1d 00000234 00000000 00000000
mfc42!CWnd::OnCommand+53 00000000 00030446 0012f36c
mfc42!CWnd::OnWndMsg+2f 00000111 00000234 00030446
mfc42!CWnd::WindowProc+24 00000111 00000234 00030446
mfc42!AfxCallWndProc+91 0012f36c 00000000 00000111
mfc42!AfxWndProc+36 0005040e 00000111 00000234
mfc42!AfxWndProcBase+39 0005040e 00000111 00000234
user32!InternalCallWinProc+28 73e68444 0005040e 00000111
user32!UserCallWinProcCheckWow+150 00000000 73e68444 0005040e
user32!SendMessageWorker+4a5 00816a30 007b0960 00000234
user32!SendMessageW+7f 0005040e 00000111 00000234
user32!xxxButtonNotifyParent+41 00816fd8 00000000 00816fd8
user32!xxxBNReleaseCapture+f8 00193b98 00000001 00000000
user32!ButtonWndProcWorker+6d5 00816fd8 00000202 00000000
user32!ButtonWndProcA+5d 00030446 00000202 00000000
user32!InternalCallWinProc+28 7e43affe 00030446 00000202
user32!UserCallWinProcCheckWow+150 00000000 7e43affe 00030446
user32!DispatchMessageWorker+306 0058decc 00000000 0012f278
user32!DispatchMessageW+f 0058decc 0058decc 0058ded4
user32!IsDialogMessageW+572 0005040e 00816fd8 0058decc
user32!IsDialogMessageA+fd 0005040e 0058decc 0012f36c
mfc42!CWnd::IsDialogMessageA+31 0058decc 73de675a 0058decc
mfc42!CWnd::PreTranslateInput+29 0058decc 0058decc 0005040e
mfc42!CDialog::PreTranslateMessage+96 0058decc 0058decc 00c70ed0
mfc42!CWnd::WalkPreTranslateTree+21 000301ba 0058decc 0058de98
mfc42!CWinThread::PreTranslateMessage+31 0058decc 00000000
0012f36c
mfc42!CWinThread::PumpMessage+2a 00000004 0012f36c 0012f354
mfc42!CWnd::RunModalLoop+d9 00000004 7e41b72f 00c7c970
mfc42!CDialog::DoModal+e8 0012f45c 00c7c970 00547340
Broker+1ef11 00000000 00000001 00020466
user32!NtUserCallOneParam+c 00000000 0000bd11 00000000
mfc42!CCmdTarget::OnCmdMsg+df 00000000 00000000 00000000
mfc42!CWnd::ReflectChildNotify+6f 00537c21 00000002 73dd24c0
0x0012f574 0012f5c8 7e440457 7e418830
mfc42!AfxUnlockGlobals+1e 00000000 00020466 00c7c970
mfc42!CWnd::OnWndMsg+2f 00000111 00000193 00020466
mfc42!CWnd::WindowProc+24 00000111 00000193 00020466
mfc42!AfxCallWndProc+91 00c7c970 00000000 00000111
mfc42!AfxWndProc+36 00080426 00000111 00000193
mfc42!AfxWndProcBase+39 00080426 00000111 00000193
user32!InternalCallWinProc+28 73e68444 00080426 00000111
user32!UserCallWinProcCheckWow+150 00000000 73e68444 00080426
user32!SendMessageWorker+4a5 008160f0 007b0960 00000193
user32!SendMessageW+7f 00080426 00000111 00000193
user32!xxxButtonNotifyParent+41 00816358 00000000 00816358
user32!xxxBNReleaseCapture+f8 00161bc0 00000001 00000000
user32!ButtonWndProcWorker+6d5 00816358 00000202 00000000
user32!ButtonWndProcA+5d 00020466 00000202 00000000
user32!InternalCallWinProc+28 7e43affe 00020466 00000202
user32!UserCallWinProcCheckWow+150 00000000 7e43affe 00020466
user32!CallWindowProcAorW+98 7e43affe 00020466 00000202
user32!CallWindowProcA+1b 7e43affe 00020466 00000202
mfc42!CWnd::DefWindowProcA+44 00000202 00000000 000b0041
mfc42!CWnd::WindowProc+3b 00000202 00000000 000b0041
mfc42!AfxCallWndProc+91 00c7cad8 00000000 00000202
mfc42!AfxWndProc+36 00020466 00000202 00000000
mfc42!AfxWndProcBase+39 00020466 00000202 00000000
user32!InternalCallWinProc+28 73e68444 00020466 00000202
user32!UserCallWinProcCheckWow+150 00000000 73e68444 00020466
user32!DispatchMessageWorker+306 0058decc 00000000 0012fb08
user32!DispatchMessageW+f 0058decc 0058decc 0058ded4
user32!IsDialogMessageW+572 00080426 00816358 0058decc
user32!IsDialogMessageA+fd 00080426 0058decc 00c7c970
mfc42!CWnd::IsDialogMessageA+31 0058decc 73de675a 0058decc
mfc42!CWnd::PreTranslateInput+29 0058decc 0058decc 00c7c970
mfc42!CDialog::PreTranslateMessage+96 0058decc 0058decc 00080426
Broker+1f398 0058decc 0058decc 00c70ed0
mfc42!CWnd::WalkPreTranslateTree+21 000301ba 0058decc 0058de98
mfc42!CWinThread::PreTranslateMessage+31 0058decc 00000000
00c77060
mfc42!CWinThread::PumpMessage+2a 00000004 00c77060 0012fbf4
mfc42!CWnd::RunModalLoop+d9 00000004 00c70ed0 0058de98
mfc42!CDialog::DoModal+e8 00000000 00c77060 0012fc84
Broker+185f 0000193b 00000000 00545f10
mfc42!CWnd::WindowProc+24 0000193b 00000000 00000000
mfc42!AfxCallWndProc+91 00c70ed0 00000000 0000193b
mfc42!AfxWndProc+36 000301ba 0000193b 00000000
mfc42!AfxWndProcBase+39 000301ba 0000193b 00000000
user32!InternalCallWinProc+28 73e68444 000301ba 0000193b
user32!UserCallWinProcCheckWow+150 00000000 73e68444 000301ba
user32!DispatchMessageWorker+306 0058decc 00000001 0058decc
user32!DispatchMessageA+f 0058decc 00000000 00c70ed0
mfc42!CWinThread::PumpMessage+3c 00000004 00c70ed0 0012fed0
mfc42!CWnd::RunModalLoop+d9 00000004 00c910d0 0058de98
mfc42!CDialog::DoModal+e8 0058de98 0058de98 0012ffc0
Broker+177c 0035f9cc 00c3d76c 00c3d6ac
0x00c3da14 00c3d76c 00c3d6ac 00c7e9e8
0x0035f9cc 00c3d6ac 00c7e9e8 00c67c24
0x00c3d76c 0008013d 0035f9c8 1001cc10
0x00020003 00000000 00000000 1009676c
OLE32!COSETERRORINFO+54In notepad2696.dmp the assembly instruction at
ole32!CoSetErrorInfo+54 in C:\WINDOWS\system32\ole32.dll from Microsoft
Corporation has caused an access violation exception (0xC0000005) when
trying to read from memory location 0x01c92a58 on thread 0
Module Information
Image Name: C:\WINDOWS\system32\ole32.dll Symbol Type: PDB
Base address: 0x774e0000 Time Stamp: Tue Jul 26 10:09:47 2005
Checksum: 0x0013dc6b Comments:
COM DLL: True Company Name: Microsoft Corporation
ISAPIExtension: False File Description: Microsoft OLE for Windows
ISAPIFilter: False File Version: 5.1.2600.2726 (xpsp_sp2_gdr.050725-1528)
Managed DLL: False Internal Name: OLE32.DLL
VB DLL: False Legal Copyright: C Microsoft Corporation. All rights
reserved.
Loaded Image Name: ole32.dll Legal Trademarks:
Mapped Image Name: Original filename: OLE32.DLL
Module name: ole32 Private Build:
Single Threaded: False Product Name: MicrosoftR WindowsR Operating
System
Module Size: 1.24 MBytes Product Version: 5.1.2600.2726
Symbol File Name:
c:\symcache\ole32.pdb\683B65B246F4418796D2EE6D4C55EB112\ole32.pdb Special
Build: &
Can anyone suggest why this would have happened and how to solve the
problem.
Thanks in advance
|
|
|
|