Click here to Skip to main content
15,879,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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

Questionwindow Position C++ win32 Pin
arun_pk5-May-10 22:14
arun_pk5-May-10 22:14 
AnswerRe: window Position C++ win32 Pin
CPallini5-May-10 22:20
mveCPallini5-May-10 22:20 
GeneralRe: window Position C++ win32 Pin
arun_pk5-May-10 23:39
arun_pk5-May-10 23:39 
GeneralRe: window Position C++ win32 Pin
CPallini6-May-10 0:13
mveCPallini6-May-10 0:13 
AnswerRe: window Position C++ win32 Pin
Michel Godfroid5-May-10 22:22
Michel Godfroid5-May-10 22:22 
GeneralRe: window Position C++ win32 Pin
arun_pk5-May-10 23:39
arun_pk5-May-10 23:39 
AnswerRe: window Position C++ win32 Pin
Stuart Dootson6-May-10 0:14
professionalStuart Dootson6-May-10 0:14 
QuestionCreating API for my application... Pin
Shy Agam5-May-10 22:09
Shy Agam5-May-10 22:09 
AnswerRe: Creating API for my application... Pin
CPallini5-May-10 22:14
mveCPallini5-May-10 22:14 
AnswerRe: Creating API for my application... Pin
Michel Godfroid5-May-10 22:26
Michel Godfroid5-May-10 22:26 
QuestionDll pacement Pin
krishna_CP5-May-10 21:56
krishna_CP5-May-10 21:56 
AnswerRe: Dll pacement Pin
CPallini5-May-10 22:12
mveCPallini5-May-10 22:12 
AnswerRe: Dll pacement Pin
Cedric Moonen5-May-10 22:14
Cedric Moonen5-May-10 22:14 
GeneralRe: Dll pacement Pin
CPallini5-May-10 22:18
mveCPallini5-May-10 22:18 
GeneralRe: Dll pacement Pin
Covean5-May-10 22:31
Covean5-May-10 22:31 
GeneralRe: Dll pacement Pin
«_Superman_»6-May-10 6:53
professional«_Superman_»6-May-10 6:53 
GeneralRe: Dll pacement Pin
krishna_CP5-May-10 22:33
krishna_CP5-May-10 22:33 

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.