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

C / C++ / MFC

 
GeneralRe: standard behavior for Alt key to show/hide Menu bar Pin
KingsGambit6-May-10 19:02
KingsGambit6-May-10 19:02 
GeneralRe: standard behavior for Alt key to show/hide Menu bar Pin
Emilio Garavaglia6-May-10 23:57
Emilio Garavaglia6-May-10 23:57 
QuestionFolder of self-delete executable not delete. Pin
Le@rner6-May-10 2:23
Le@rner6-May-10 2:23 
AnswerRe: Folder of self-delete executable not delete. Pin
Rajesh R Subramanian6-May-10 2:33
professionalRajesh R Subramanian6-May-10 2:33 
GeneralRe: Folder of self-delete executable not delete. Pin
CPallini6-May-10 2:40
mveCPallini6-May-10 2:40 
AnswerRe: Folder of self-delete executable not delete. Pin
David Crow6-May-10 2:50
David Crow6-May-10 2:50 
JokeRe: Folder of self-delete executable not delete. Pin
Code-o-mat6-May-10 22:17
Code-o-mat6-May-10 22:17 
QuestionGeo Location Pin
john56326-May-10 2:06
john56326-May-10 2:06 
AnswerRe: Geo Location Pin
CPallini6-May-10 2:23
mveCPallini6-May-10 2:23 
GeneralRe: Geo Location Pin
john56326-May-10 2:26
john56326-May-10 2:26 
GeneralRe: Geo Location Pin
markkuk6-May-10 2:42
markkuk6-May-10 2:42 
GeneralRe: Geo Location Pin
john56326-May-10 2:49
john56326-May-10 2:49 
GeneralRe: Geo Location Pin
markkuk6-May-10 3:40
markkuk6-May-10 3:40 
GeneralRe: Geo Location Pin
Cedric Moonen6-May-10 20:16
Cedric Moonen6-May-10 20:16 
QuestionRe: Geo Location Pin
David Crow6-May-10 2:58
David Crow6-May-10 2:58 
AnswerRe: Geo Location Pin
Emilio Garavaglia7-May-10 0:05
Emilio Garavaglia7-May-10 0:05 
QuestionSet size and postion of contols in c++ win 32 Pin
arun_pk5-May-10 23:47
arun_pk5-May-10 23:47 
AnswerRe: Set size and postion of contols in c++ win 32 Pin
csrss5-May-10 23:57
csrss5-May-10 23:57 
GeneralRe: Set size and postion of contols in c++ win 32 Pin
arun_pk6-May-10 0:00
arun_pk6-May-10 0:00 
GeneralRe: Set size and postion of contols in c++ win 32 Pin
CPallini6-May-10 0:15
mveCPallini6-May-10 0:15 
GeneralRe: Set size and postion of contols in c++ win 32 Pin
enhzflep6-May-10 0:25
enhzflep6-May-10 0:25 
GeneralRe: Set size and postion of contols in c++ win 32 Pin
arun_pk6-May-10 2:17
arun_pk6-May-10 2:17 
GeneralRe: Set size and postion of contols in c++ win 32 Pin
enhzflep6-May-10 10:24
enhzflep6-May-10 10:24 
QuestionRe: Set size and postion of contols in c++ win 32 Pin
David Crow6-May-10 3:00
David Crow6-May-10 3:00 
Questionwin32 and gtk+ (vista glass) :( Pin
csrss5-May-10 23:30
csrss5-May-10 23:30 
Ok, this is pretty specific question. What i am trying to do is to implement vista glass effect in my gtk+ windows app. But, i just can't Frown | :( gtk+ code can be easily mixed with win32 APIs, so for example here is the code which draws a black rectangle on the specified area (the area where app border extends to client window):

PAINTSTRUCT ps;
RECT lpRect;
.....
case WM_PAINT:
{
HDC hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &lpRect);
HBRUSH Brush=CreateSolidBrush(RGB(0,0,0));
lpRect.bottom = 30;
FillRect(hdc, &lpRect, Brush);
EndPaint(hwnd, &ps);
}

This works fine, but only in case of pure win32 api based app, while in gtk+ for some reason it doesn't.
As code can be mixed i have tried it this way:

HWND hwnd = (HWND)gdk_win32_drawable_get_handle (window->window);
HDC hdc = GetDC(hwnd);
if(!hdc)MessageBox(0,"err getting hdc","err",0); // hdc is not null...

the rest of the code is the same actually. Result is negative.
Another way of getting HDC was:

hdc = gdk_win32_hdc_get (window->window, window->style->black_gc, mask);
But i simply got no idea how to use this function, because as 2nd parameter - there are tons of options and i dont know gtk that good.
So maybe you can help me or maybe you know some resource where i can get help on win32 gtk programming.
I know there are standard methods for doing this in wx(?), Qt, win32, mfc, .Net, etc, but gtk+ is the only options in this case.
Thanks in advance
011011010110000101100011011010000110100101101110
0110010101110011

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.