|
|
Up |
|
|
  |
Author: Benoit808Benoit808
Date: May 8, 2007 21:47
Many users of my app are complaining about a crash in advapi32.dll. It
says that the program has encountered a problem and needs to close.
I've been unable to duplicate but it seems to coincide with a call to
a function that writes to the registry according to the reports.
I know this is happening on XP but unfortunately I don't know if this
is happening with other OSes.
First of all, is my assumption that this is registry related
plausible?
Second, does it sound like it could be related to user access to the
registry? If yes, is there a way to force user write access to the
registry?
Finally, if it wouldn't make sense for it to be registry related or
user access related, any other ideas?
Thanks a lot
Ben
|
| |
|
| |
no comments
|
|
  |
Author: Larry LindstromLarry Lindstrom
Date: May 8, 2007 17:21
Christian ASTOR wrote:
> Larry Lindstrom wrote:
>
>> But right now I'm wondering how I determine if a treeview item is
>> selected during a
>> custom draw.
>
> LPNMTREEVIEW pnmtv = (LPNMTREEVIEW)lParam;
> LPNMTVCUSTOMDRAW pnmcd =(LPNMTVCUSTOMDRAW)lParam;
> switch(pnmtv-> hdr.code)
> {
> case NM_CUSTOMDRAW:
> switch (pnmcd->nmcd.dwDrawStage)
> {
> case CDDS_PREPAINT:
> return CDRF_NOTIFYITEMDRAW;
> case CDDS_ITEMPREPAINT:
> if (pnmcd->nmcd.uItemState == (CDIS_FOCUS | CDIS_SELECTED))
> {
> pnmcd->clrText = RGB(255, 255, 0); ...
|
| Show full article (2.56Kb) |
|
| |
no comments
|
|
  |
Author: ks.dipuks.dipu
Date: May 8, 2007 15:19
I have a dll written in C++ running in a Linux machine. Now i want to
move that dll to
a Windows system and use it with a Windows application.
How can i do that?
Can you please tell what all are the performance issues i face?
What all are the dependencies?
Thanks in advance
|
| |
|
1 Comment |
|
  |
Author: gw7ribgw7rib
Date: May 8, 2007 14:21
I'm trying to create a shortcut menu, to give a list of options when
the user presses the right mouse button. It's not quite working -
hopefully it is something simple... The code is adapted from MSDN.
I have two sorts of window - a main window and notes. These each have
different shortcut menus.
In the window function I have:
case WM_CONTEXTMENU:
if (!OnContextMenu(hWnd, LOWORD(lParam), HIWORD(lParam),
IsMainWindow))
return DefWindowProc(hWnd, message, wParam, lParam);
break;
and I also have two further functions as follows:
BOOL WINAPI OnContextMenu(HWND hwnd, int x, int y, BOOL IsMain) {
RECT rc; // client area of window
POINT pt = { x, y }; // location of mouse click
// Get the bounding rectangle of the client area.
GetClientRect(hwnd, &rc);
// Convert the mouse position to client coordinates.
ScreenToClient(hwnd, &pt);
|
| Show full article (2.55Kb) |
|
1 Comment |
|
  |
Author: [Jongware][Jongware]
Date: May 8, 2007 06:22
>>>>>>>>>> BitBlt(hDC,1,1,20,18,hMemDC,0,0,SRCCOPY);
>>>>>>>>> -- whereas for the text you correctly use
>>
>>>>>>>>>> ExtTextOut(dis->hDC, dis->rcItem.left+ 33,
>>>>>>>>>> dis->rcItem.top +
> I have found what was causing the problem, working through your
> example helped - it was the order we were doing things, in my initial
> design the call to BitBlt comes before the call to TextOut - however
> when this is reversed and bitblt is called After TextOut - there are
> no problems and it works as expected!
-- which is hardly what I expected. As you know where to look (which is,
believe me, a huge advantage!), I suggest you try and find out WHY the order
is important. This kind of routine tends to get copied to other locations,
and before you know it, it will fail again somewhere else "for no apparent
reason".
Still, 'appy to 'ave 'elped you out.
[Jongware]
|
| |
|
no comments
|
|
  |
Author: hconnellhconnell
Date: May 8, 2007 05:28
>>>>>>>>> BitBlt(hDC,1,1,20,18,hMemDC,0,0,SRCCOPY);
>>>>>>>> -- whereas for the text you correctly use
>
>>>>>>>>> ExtTextOut(dis->hDC, dis->rcItem.left+ 33, dis->rcItem.top +
I have found what was causing the problem, working through your
example helped - it was the order we were doing things, in my initial
design the call to BitBlt comes before the call to TextOut - however
when this is reversed and bitblt is called After TextOut - there are
no problems and it works as expected!
|
| |
|
no comments
|
|
  |
Author: Larry LindstromLarry Lindstrom
Date: May 8, 2007 04:19
Hi Folks:
Developing on XP Media, VC6, WIN32, no MFC.
I've done a lot of work with Owner Draw List Boxes and Combo Boxes,
but I'm doing a TreeView and I'm unfamiliar with Custom Draw.
I've set the TreeView to draw white text on a blue background.
When drawing an item that is selected, I'd like to reverse those
colors, blue text on white.
I've made a little progress, after using SetWindowLongPtr() to
return CDRF_NOTIFYITEMDRAW. That was advice from the archives, and
MSDN offered no hint that it wasn't just a simple return value from
WM_NOTIFY.
So now I'm receiving a CDDS_ITEMPREPAINT. I want to get the
state of the treeview item from NMCUSTOMDRAW's uItemState. I've
isolated one of the treeview items, whose parameter is an enumeration
MENU_ITEM_EVENTS, and selected it. But like all of the items, it's
uItemState is zero.
|
| Show full article (3.80Kb) |
|
1 Comment |
|
  |
Author: Fernando RodriguezFernando Rodriguez
Date: May 8, 2007 01:07
Hi,
I want to write a small utility that detects when I press a certain key combination
and the pastes a given text into the active window handle. What's the best
way to simulate this pasting? The ideal solution for me would be to send
rtf and ascii text and let the window chose which one it supports.
Thanks,
Fernando
|
| |
|
1 Comment |
|
  |
Author: Fernando RodriguezFernando Rodriguez
Date: May 8, 2007 01:00
Hi,
Is there a way to know what api calls a process is making?
Thanks,
Fernando
|
| |
|
1 Comment |
|
  |
|
|
  |
Author: Gernot FrischGernot Frisch
Date: May 8, 2007 00:47
>> I want to draw to the desktop, but clip all the application windws
>> that are above it.
>> Sort of - draw onto the wallpaper.
>>
>> GetD(NULL); can draw over all windows, but I want to clip them.
>
> I don't understand what does it mean to clip the windows.
> Try to minimize all windows and then draw. Or make a fake/clone
> desktop window, minimize all windows and draw to the desktop and
> then
> destroy the clone.
I want to draw "in between" the currently open windows and the
wallpaper.
If it's not possible, I'll create a window that's bottommost.
|
| |
|
no comments
|
|
|
|
|
|
|