|
I have some problem
problem #1 I am unable to write in Hkey_current_user thorugh service but i am able run to write same code for hkey local machine.when i try to write in hkey_current user it get wriiten in HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\System pls help.
is windows service don't authorize to write in HKEY_CURRENT_USER.
problem #2 i want to display the dialog box trough service,but till now i am unable to display the dialog box trough service.
is windows service authorize to show dialog box
problem #3
i am unable to use WinExec api call to execute the program thorugh service,they run but they don't show up to desktop,but they running as a background process which can seen in taskmgr, how to show them
thanks in advance
Alok Gupta
visit me at http://alok.stormpages.com
|
|
|
|
|
for executing try the CreateProcess function or ShellExecute because they are morfe efficient. If you are unable to write in the current user in registry you do not have the appropriate privilages to write to the certain user. Anyway it is better to write to HKEY local machine.
gabby
|
|
|
|
|
Hi friends,
I am trying to devlop a Single Document (Document/View Architecture) MFC application, which has Three frames. Left frame has a Hierarchy tree and on selection of any leaf node, number (not fixed) of images be displayed on the right upper frame (four picture per row) dynamically as shown below.
-----------------------------------------
| | |
| | |
| Tree | Images |
| | |
| | |
| |--------------------------------
| | |
| | Discription |
| | |
-------- -------------- -----------------
On click of an image its description should be displayed in right lower frame
My first priority is to display images dynamically.
Example: when there are 10 images, it should display 4 in first row, 4 in second row and last 2 in third row.
If any material/example/sample code/suggestion, Please reply me.
I need it very argently. Please help me.
Thanx
|
|
|
|
|
I am making a user interface with Outlook98-like bar in codeguru,now I'd like to put a bmp
picture as the background of left view,the code like follow which put on the
void CGfxOutBarCtrl::OnPaint().
CDC dcMem;
CBitmap bmpLogo;
BITMAP bitmap;
dcMem.CreateCompatibleDC(pDC);
bmpLogo.LoadBitmap(IDB_LEFTBACK);
bmpLogo.GetObject(sizeof(BITMAP), &bitmap);
CSize size(bitmap.bmWidth,bitmap.bmHeight);
CBitmap *pBmpOld = dcMem.SelectObject(&bmpLogo);
//GetClientRect(&rectClient);
pDC->StretchBlt(rc.left,rc.top,rc.Width(),rc.Height(),
&dcMem,0,0,size.cx,size.cy,SRCCOPY);
dcMem.SelectObject(pBmpOld);
dcMem.DeleteDC();
the IDB_LEFTBACK is the resource ID,but the color of the bmp picture is not normal,how can
I settle this question?
hi all
|
|
|
|
|
someone have told me that in this website there are a example or article which demonstrate the procedure to simulate the surface in vc IDE,that in debug,set a breakpoint,then on the left margin of the code view area shows a red point.....who can tell me the location in this website?
|
|
|
|
|
As a matter of a fact, you could use my line-numbering edit control, http://www.codeproject.com/editctrl/linenumberedit.asp[^] to accomplish this
You could, for example, add an array of the "breakpoints" to the line-number static.
You find code to draw on a specific line in the control. There is also code to select an entire line when you click in the margin, which you could use to get/set the "breakpoints".
|
|
|
|
|
Hello,
Please help me with information where could I make a free download of e-book named "Windows NT Shell Scripting"
I need it badly
Thanks!
|
|
|
|
|
I m previewing and capturing video in ASF Froamt using
VC++ and DirectShow + ASF_ Writer...
Now i want to send it on Network...using socket
How can i do it
how can i buffer if it required to send..
or Which interfaces or API's
or example source
thanx
|
|
|
|
|
Hi all
I understand that XP has thumbnail icons associated with file types an dthey're 48x48 pixels.
I was wondering what is the best way to extract say, the default shell thumbnail icon for an mp3 or other such file. I've been extracting the standard icons, but i was wondering how to extract the thumbnail icons
cheers
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
hi,
i'm new here, can somebody help me, please..
heres the situation: i'm trying to run an exe file say test.exe, but this exe has still a file to open in order to fully function this exe. so what i wnat is to create another executable to launch the exe without manually opening the file associated to this exe.
|
|
|
|
|
Try ShellExecute()
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I am having issues while writing a file renamer program using Visual c++. The problem is I can not replace non-unicode char to the unicode ones, for example i (not i) Visual c++ doesnt even let me to declare non-unicode chars.
If somebody has a clue or exprienced this before, please let me know.
Thnx...
Ilker TANLI
www.tanli.net
|
|
|
|
|
What do you mean "doesn't even let me declare non-unicode chars"? Why won't it? Is it giving you an error message of some sort? If so what's the error? What type of project are you trying to build? What version of Visual C++ are you using?
Without more information how do you expect anyone to help you?
Regards,
John
|
|
|
|
|
Hello,
I am new to this forum and new to HTML Help too. I have created a .chm file from the HTML Help Workshop. Now, i am trying to implement it in MFC program. I am stuck here with the context sensitive help where i have a "Help" button in a dialog box and should display the appropriate help provided for the dialog box. I can't understand how to create the context ids and how to pass between the HTML Help workshop file (.chm) and MFC. Any sample would be really helpful. Could anyone please help me to do this. Its quite urgent
Thanks in advance,
Regards
Priya
|
|
|
|
|
Hi,
I don't know is it possible to fetch the context IDs programmatically from the CHM-file. I have always used hardcoded values (and the people who have made the help-files have ofcourse used those same values).
So, make a header file. e.g. HelpIDs.h where you define the IDs:
<br />
#define HID_MAINVIEW 100<br />
#define HID_SOMEOTHERVIEW 101<br />
#define HID_YETANOTHERVIEW 102<br />
Then include this file and just invoke html help with the correct id
<br />
HtmlHelp( GetDesktopWindow(), "helpfile.chm", HH_HELP_CONTEXT, HID_MAINVIEW) ;<br />
I have no experience from making the chm-files though..
|
|
|
|
|
Thanks for the reply. There is a .hm file created by the project which has the following IDH_*
IDH_MAINFRAME 0x20080
IDH_HTML_HTYPE 0x20081
IDH_ABOUTBOX 0x20064
and as u told, i created the HelpID.h and defined the ids. While compiling it gives the following error.
error C2065: 'HID_MAINFRAME' : undeclared identifier
I looked into the article in http://www.codeguru.com/Cpp/W-P/help/html/print.php/c6513/ and he has done it without using OnHelp functions but could access any topics which i couldn't understand how.
Can anyone done such help projects with HTML Help? Or can anyone explain how the context ids are working?
Thanks
Priya
|
|
|
|
|
Lakshmi Priya Musuvathy wrote:
error C2065: 'HID_MAINFRAME' : undeclared identifier
I'd quess that you simply don't include the header file correctly or that you have a typo somewhere. Should it be IDH_MAINFRAME for example?
|
|
|
|
|
Hi,
Yes, it was IDH_MAINFRAME and i was not giving the correct header file. it worked now.
many thanks,
Regards
Priya
|
|
|
|
|
I want to migrate a MFC doc/view application to an activex control. I create the CMainFrame(inherited from CMDIFrameWnd) object when the activeX control is Created. but when i open a document, access violation occured in user.dll and no source code. i found the error is from CMDIChildFrame::OnSize. the following is my code :
BOOL CMultiDocOCXCtrl::CreateMDIFrame()
{
if(m_pFrameWnd != NULL)
return FALSE;
CRect rc;
GetClientRect(&rc);
CMultiDocTemplate* pDocTemplate = new CMultiDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMyDocument),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CMyView));
AfxGetApp()->AddDocTemplate(pDocTemplate);
//
CString sClassName = AfxRegisterWndClass(CS_DBLCLKS);
CMainFrame * pFrame = new CMainFrame;
if(!pFrame->Create(sClassName, NULL, WS_CHILD|WS_VISIBLE, rc, this,
MAKEINTRESOURCE(IDR_MAINFRAME), 0, NULL))
{
delete pFrame;
return FALSE;
}
pFrame->ShowWindow(SW_SHOW);
pFrame->RecalcLayout();
//
m_pFrameWnd = pFrame;
//
AfxGetApp()->m_pMainWnd = m_pFrameWnd;
theApp.OnNewFile();
//
return TRUE;
}
Is anybody know how this problem occur?
c++ : my dream
|
|
|
|
|
hi, guys
Is there any functions in Visual C++ which have the same function like DoEvents in VB or doEvents in Java?
I have to make the program get response to a windows message when it is running in a infinite loop.
Is there any fuction can achieve this?
thank u very much in advance!
|
|
|
|
|
Create a secondary (worker) thread and run the infinite loop in there.
|
|
|
|
|
The following implemented VB DoEvents function:
<br />
BOOL DoEvents()<br />
{<br />
static MSG msg;<br />
while (::PeekMessage(&msg,NULL,0,0,PM_NOREMOVE)) {<br />
if (!AfxGetApp()->PumpMessage()) {<br />
::PostQuitMessage(0);<br />
return FALSE;<br />
} <br />
}<br />
return TRUE;<br />
}<br />
|
|
|
|
|
I am writing a software about tape backup.When u write the data into the tape, u can use the file mark to partiton the file.
But I don't understand the file mark.Who can tell me what the long file mark and short file mark are?How can I use them?
|
|
|
|
|
From MSDN:
A short filemark contains a short erase gap that cannot be overwritten unless the write operation is performed from the beginning of the partition or from an earlier long filemark.
A long filemark contains a long erase gap that allows an application to position the tape at the beginning of the filemark and to overwrite the filemark and the erase gap.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
And I also read these information.I have uesd the file mark to realize the R/W code of the tape backup.I use the file mark to do it.Now I want to know the advantage of the long file mark and the short file mark.Then how to use them.I can use the file mark to realize the function.If I use the long file mark and the short file mark,what benefit can I get?Thanks!
|
|
|
|