Click here to Skip to main content
15,915,703 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Drag'n'Drop to Explorer windows? Pin
Michael Dunn20-Jan-02 6:56
sitebuilderMichael Dunn20-Jan-02 6:56 
GeneralBYTE concatenation and strcat() questions Pin
Kuniva20-Jan-02 3:28
Kuniva20-Jan-02 3:28 
GeneralRe: BYTE concatenation and strcat() questions Pin
Michael Dunn20-Jan-02 6:58
sitebuilderMichael Dunn20-Jan-02 6:58 
GeneralWin2000 Registry Problem Pin
John Clump20-Jan-02 2:02
John Clump20-Jan-02 2:02 
GeneralRe: Win2000 Registry Problem Pin
Michael Dunn20-Jan-02 7:02
sitebuilderMichael Dunn20-Jan-02 7:02 
GeneralHelp a Newbie please!!!:confused: Pin
20-Jan-02 1:16
suss20-Jan-02 1:16 
GeneralRe: Help a Newbie please!!!:confused: Pin
Michael P Butler20-Jan-02 2:08
Michael P Butler20-Jan-02 2:08 
GeneralPb Copy/Pasting DIB with Alpha Channel Pin
yarp19-Jan-02 21:35
yarp19-Jan-02 21:35 
I made a small editor whose purpose is just to load/save files with a special format. Modifications are made by any graphic editor and Bitmaps datas are exchanged via the clipboard.
The inner format of my application is a DIB (from paintlib).
Recently I decided to add the capability to save pictures with Alpha Channel. But when I paste the datas in Paint Shop Pro it says there's no Alpha Channel in the picture. I'm sure there is and I am working under 32 bits, W98 SP2. I said I am sure there is because I made the same thing with a batch converting fucntion (from file to file) and it does work fine.
I wonder wether it could come from the clipboard or Paint Shop or me Roll eyes | :rolleyes: . Probably I need to set something particular for Alpha Channel DIBs ?
Below is the copy to clipboard code. Has someone any idea ?

<br />
  if (::OpenClipboard(NULL)) {<br />
    ::EmptyClipboard();<br />
<br />
    HANDLE hDIB;<br />
<br />
    int MemUsed = GetMemNeeded(GetWidth(), GetHeight(), GetBMI()->biBitCount);<br />
<br />
    hDIB = (HANDLE)::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, MemUsed);<br />
    if (hDIB == NULL)<br />
     throw (CTextException (ERR_NO_MEMORY, "Can't allocate global memory block."));<br />
<br />
    long* lpCopy = (long *)::GlobalLock((HGLOBAL)hDIB);<br />
    memcpy(lpCopy, m_pBMI, MemUsed);<br />
<br />
    ::GlobalUnlock((HGLOBAL) hDIB);<br />
<br />
    ::SetClipboardData(CF_DIB, hDIB);<br />
    ::CloseClipboard();<br />


Yarp
GeneralRe: Pb Copy/Pasting DIB with Alpha Channel Pin
Christian Graus19-Jan-02 22:52
protectorChristian Graus19-Jan-02 22:52 
GeneralRe: Pb Copy/Pasting DIB with Alpha Channel Pin
yarp19-Jan-02 23:28
yarp19-Jan-02 23:28 
GeneralRe: Pb Copy/Pasting DIB with Alpha Channel Pin
Christian Graus19-Jan-02 23:35
protectorChristian Graus19-Jan-02 23:35 
GeneralRe: Pb Copy/Pasting DIB with Alpha Channel Pin
yarp20-Jan-02 11:35
yarp20-Jan-02 11:35 
GeneralRe: Pb Copy/Pasting DIB with Alpha Channel Pin
Christian Graus20-Jan-02 11:55
protectorChristian Graus20-Jan-02 11:55 
GeneralRe: Pb Copy/Pasting DIB with Alpha Channel Pin
yarp20-Jan-02 12:06
yarp20-Jan-02 12:06 
Generaltask manager Pin
Mazdak19-Jan-02 21:34
Mazdak19-Jan-02 21:34 
GeneralRe: task manager Pin
SergueiP19-Jan-02 22:38
SergueiP19-Jan-02 22:38 
GeneralRe: task manager Pin
Mazdak20-Jan-02 1:04
Mazdak20-Jan-02 1:04 
GeneralRe: task manager Pin
Christopher Lord20-Jan-02 11:41
Christopher Lord20-Jan-02 11:41 
Questionabout MSFlexgrid? Pin
anju19-Jan-02 20:58
anju19-Jan-02 20:58 
AnswerRe: about MSFlexgrid? Pin
Christian Graus19-Jan-02 22:53
protectorChristian Graus19-Jan-02 22:53 
AnswerRe: about MSFlexgrid? Pin
Qadddd21-May-02 6:17
Qadddd21-May-02 6:17 
GeneralHook Keyboard! Pin
Mazdak19-Jan-02 18:46
Mazdak19-Jan-02 18:46 
GeneralRe: Hook Keyboard! Pin
Phil F21-Jan-02 14:59
Phil F21-Jan-02 14:59 
GeneralRe: Hook Keyboard! Pin
Mazdak21-Jan-02 22:22
Mazdak21-Jan-02 22:22 
GeneralRe: Hook Keyboard! Pin
Mazdak23-Jan-02 18:45
Mazdak23-Jan-02 18:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.